/*
Theme Name:   Hollins
Description:  Hollins Child Theme
Template:     blockbase
Version:      0.0.0
Text Domain:  hollinschild
*/

/* =====================================
   ADMIN BAR ADJUSTMENTS
===================================== */
.admin-bar #header-wrapper {
    padding-top: 32px;
}

@media (max-width: 782px) {
    .admin-bar #header-wrapper {
        padding-top: 62px;
        padding-bottom: 16px;
    }
}

/* =====================================
   HEADER WRAPPER
===================================== */
#header-wrapper {
    position: relative;
    z-index: 999;
    background: #006f54;
}

@media (max-width: 1024px) {
    #header-wrapper {
        position: fixed;
        width: 100%;
        top: 0;
        left: 0;
    }
}

/* =====================================
   TOP BAR (LOGO + HEADER LINKS)
===================================== */
.header-top-bar {
    background: transparent;
    padding: 0;
}

.header-top-bar .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-top-bar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
    gap: 30px;
}

/* Logo Styling */
.header-logo-link {
    display: block;
    flex-shrink: 0;
}

.header-logo-link .header-logo {
    margin: 0;
    padding: 10px 0;
}

.header-logo-link .header-logo img {
    max-height: 50px;
    width: auto;
    display: block;
}

/* Header Links - Pill Style */
.header-links-nav {
    margin-left: auto;
}

.header-links-nav .header-links-ul {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 10px;
}

.header-links-nav .header-links-ul li {
    margin: 0;
}

.header-links-nav .header-links-ul li a {
    display: inline-block;
    padding: 4px 8px;
    text-decoration: none;
    color: #333;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #fff;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.header-links-nav .header-links-ul li:first-child a {
    background: #F0BF03;
    color: #000 !important;
}

.header-links-nav .header-links-ul li:first-child a:hover {
    background: #F0BF03;
}

.header-links-nav .header-links-ul li:not(:first-child) a:hover {
    background: #f5f5f5;
    color: #006f54;
}

/* =====================================
   MAIN NAVIGATION
===================================== */
.header-main-nav {
    background: transparent;
    border-bottom: none;
    position: relative;
}

.header-main-nav .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.primary-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

body .primary-menu-ul {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    gap: 5px;
}

.primary-menu-item > a {
    display: block;
    padding: 20px 20px 10px;
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    transition: all 0.3s ease;
    position: relative;
}

.primary-menu-item > a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: #F0BF03;
    transition: width 0.3s ease;
}

.primary-menu-item > a:hover {
    color: #F0BF03 !important;
}

.primary-menu-item > a:hover:after,
.primary-menu-item.current-menu-item > a:after,
.primary-menu-item.current-menu-ancestor > a:after {
    width: 80%;
}

/* =====================================
   MEGA MENU DROPDOWN
===================================== */
.primary-menu-item .mega-menu-dropdown,
.primary-menu-item .mega-menu-dropdown ul,
.primary-menu-item .mega-menu-columns,
.primary-menu-item .mega-menu-column {
    visibility: visible !important;
    height: auto !important;
    opacity: 1 !important;
    overflow: visible !important;
    width: auto;
}

.mega-menu-dropdown {
    position: absolute;
    top: 95%;
    left: 10%;
    transform: translateX(-50%);
    width: 100vw;
    max-width: 1400px; /* Match your container max-width */
    min-width: 980px;
    background: #e2e0d8;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    padding: 30px 40px;
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
    display: none;
}

.primary-menu-item:hover .mega-menu-dropdown {
    opacity: 1;
    visibility: visible;
    max-height: 800px;
    display: block;
}

.mega-menu-columns {
    display: flex;
    gap: 60px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.mega-menu-column {
    flex: 1;
    min-width: 200px;
}

.mega-menu-column-title {
    font-size: 20px;
    font-weight: 800;
    line-height: normal;
    margin: 0 0 12px 0;
    color: #0b5936;
    text-transform: none;
    position: relative;
    padding: 0;
}

.mega-menu-column-title a {
    text-decoration: none;
    letter-spacing: normal;
}

.mega-menu-column-title::after {
    content: " »";
    font-weight: 800;
    padding-left: 4px;
}

.mega-menu-column-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mega-menu-column-items li {
    margin: 0 0 5px !important;
}

.mega-menu-column-items li a {
    color: #2d2d2d;
    text-decoration: none;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    transition: all 0.3s ease;
    display: block;
    position: relative;
    padding-left: 0;
}

.mega-menu-column-items li a:before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 2px;
    background: #EFBE05;
    transition: width 0.3s ease;
}

.mega-menu-column-items li a:hover {
    color: #0b5936;
    padding-left: 20px;
}

.mega-menu-column-items li a:hover:before {
    width: 12px;
}

/* =====================================
   SEARCH FUNCTIONALITY (DESKTOP)
===================================== */
.primary-menu-search {
    position: relative;
    margin-left: 15px;
}

.primary-menu-search .search-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 20px 20px;
    background: none;
    border: none;
    cursor: pointer;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    transition: color 0.3s ease;
}

.primary-menu-search .search-toggle svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.primary-menu-search .search-toggle:hover {
    color: #EFBE05;
}

.primary-menu-search .search-toggle:hover svg {
    transform: scale(1.1);
}

.primary-menu-search .search-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #e6e4de;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    padding: 25px;
    min-width: 420px;
    border: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.25s ease;
    z-index: 1001;
}

.primary-menu-search .search-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.primary-menu-search .search-dropdown .search-form {
    margin: 0;
    position: relative;
}

.primary-menu-search .search-dropdown .search-form::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23996f28' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 18px 18px;
}

.primary-menu-search .search-dropdown .search-field {
    width: 100%;
    background: #ffffff;
    border: 2px solid #ffffff;
    border-radius: 3px;
    padding: 12px 15px 12px 42px;
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.primary-menu-search .search-dropdown .search-field:focus {
    outline: none;
    border-color: #d9d8d3;
}

.primary-menu-search .search-dropdown .search-submit {
    opacity: 0;
    position: absolute;
    pointer-events: none;
}

/* =====================================
   MOBILE/DESKTOP VISIBILITY
===================================== */
.h-mobile-only {
    display: none;
}

.desktop-only {
    display: block;
}

@media (max-width: 1024px) {
    .h-mobile-only {
        display: block;
    }

    .desktop-only {
        display: none;
    }
}

/* =====================================
   MOBILE MENU BUTTON (HAMBURGER)
===================================== */
.mobile-menu-button {
    background: #fff;
    border: 1px solid #4e4d49;
    border-radius: 50px;
    cursor: pointer;
    padding: 10px;
    z-index: 3001;
    position: relative;
}

.mobile-hamburger {
    width: 64px;
    height: 18px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0 4px;
    gap: 4px;
}

.hamburger-stripes {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 28px;
}

.mobile-hamburger .hamburger-stripes div {
    height: 3px;
    background: #996f28;
    width: 100%;
    transition: 0.3s ease;
}

.search-icon svg {
    stroke: #996f28;
}

.mobile-menu-button.active .hamburger-stripes div:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-button.active .hamburger-stripes div:nth-child(2) {
    opacity: 0;
}

.mobile-menu-button.active .hamburger-stripes div:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* =====================================
   MOBILE SEARCH
===================================== */
.mobile-search-wrapper {
    padding: 10px;
    background: #f2f2f2;
    border-bottom: 1px solid #ddd;
}

.mobile-search-form {
    position: relative;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.mobile-search-form .mobile-search-input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    background: #fff;
    border: 2px solid #d5d5d5;
    border-radius: 4px;
    font-size: 16px;
}

.mobile-search-submit {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    cursor: pointer;
    color: #EFBE05;
}

/* =====================================
   MOBILE MENU DROPDOWN
===================================== */
@media (max-width: 1024px) {
    #mobile-menu-dropdown {
        width: 100%;
        background: #fff;
        overflow: hidden;
        max-height: 0;
        transition: max-height 0.35s ease;
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 3000;
        border-bottom: 1px solid #ddd;
    }

    #mobile-menu-dropdown.active {
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* For admin bar users */
    .admin-bar #mobile-menu-dropdown.active {
        max-height: calc(100vh - 100px - 62px); /* Subtract header + admin bar */
    }

    body.mobile-menu-open {
        overflow: hidden;
        position: fixed;
        height: 100vh;
        top: 0;
    }
}


/* =====================================
   MOBILE MENU SECTIONS
===================================== */
.mobile-menu-section {
    padding: 20px;
}

.mobile-menu-primary {
    background: #ffffff;
}

.mobile-menu-secondary {
    background: #006f54;
    color: #ffffff;
}

.mobile-menu-list li,
.mobile-menu-list-secondary li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu-link {
    display: inline-block;
    padding: 10px 0;
    font-size: 18px;
    text-decoration: none;
    color: inherit;
}

.mobile-menu-secondary .mobile-menu-link {
    color: #ffffff;
}

.mobile-menu-item > .mobile-menu-item-wrap > .mobile-menu-link {
    font-weight: 800;
}

.mobile-menu-list-secondary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

/* =====================================
   MOBILE SUBMENU ACCORDION
===================================== */
.mobile-submenu {
    display: none;
    padding-left: 20px;
}

.mobile-submenu.open {
    display: block;
}

.mobile-submenu .mobile-menu-link {
    font-weight: normal;
    font-size: 16px;
}

.mobile-submenu-toggle {
    background: none;
    border: none;
    margin-left: 10px;
    cursor: pointer;
}

.mobile-submenu-toggle .toggle-icon {
    font-size: 22px;
    color: #006f54;
    transition: transform 0.3s ease;
}

.mobile-submenu-toggle.open .toggle-icon {
    transform: rotate(90deg);
}

/* Make the toggle-icon span able to show a pseudo-element */
.mobile-submenu-toggle .toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;   /* match your font-size or button size */
    height: 22px;
    color: #006f54;
}

/* Base (closed) icon */
.mobile-submenu-toggle .toggle-icon::before {
    content: "";
    width: 16px;
    height: 16px;
    display: block;
    background-color: currentColor;

    mask-repeat: no-repeat;
    mask-size: contain;
    mask-position: center;

    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 5v6H5v2h6v6h2v-6h6v-2h-6V5z'/%3E%3C/svg%3E");
    transform: rotate(90deg);
}

/* OPEN STATE: swap the icon */
.mobile-submenu-toggle.open .toggle-icon::before {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 11h14v2H5z'/%3E%3C/svg%3E");
}

/* Mobile menu backdrop */
.mobile-menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 998; /* Below mobile menu (999) but above content */
}

.mobile-menu-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Ensure mobile menu is above backdrop */
header.wp-block-template-part {
    z-index: 999 !important;
}

/* Prevent horizontal scroll */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

/* Fix for mega menu on desktop */
@media (min-width: 1025px) {
    .mega-menu-dropdown {
        width: 100%;
        max-width: 100vw;
        left: auto;
        transform: none;
        right: 0;
    }
}

/* Ensure mobile menu doesn't cause overflow */
@media (max-width: 1024px) {
    #mobile-menu-dropdown {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .mobile-menu-backdrop {
        max-width: 100vw;
    }

    .mobile-menu-secondary .mobile-menu-link {
        padding: 0;
    }
}

body .hollins-footer-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: flex-start;
    gap: 3rem;
}

.footer-logo-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-menu-column__title {
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff !important;
    font-size: 1.125rem;
    text-transform: uppercase;
    margin-top: 0;
    padding-top: 0;
    font-family: inherit;
    letter-spacing: normal;
}

.footer-column-ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-column-ul li a {
    color: #fff;
    text-decoration: none;
}

.footer-column-ul li a:hover {
    color: #e6e4df !important;
}

/* Stack columns on mobile */
@media (max-width: 768px) {
    body .hollins-footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* =====================================
   MAIN NAVIGATION
===================================== */
.header-main-nav {
    background: transparent;
    border-bottom: none;
    position: relative;
}

.header-main-nav .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative; /* Add this */
}

.primary-navigation {
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Change from space-between to flex-end */
    position: relative;
}

body .primary-menu-ul {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 0 1 auto; /* Change from flex: 1 */
    gap: 5px;
}

/* Align icon with text */
.header-links-ul .external-link > a {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
}

/* Add external‑link icon using a CSS mask */
.header-links-ul .external-link > a::after,
.primary-navigation .external-link > a::after,
.mobile-menu-link.external-link::after {
    content: "";
    width: 0.9em;
    height: 0.9em;
    display: inline-block;
    background-color: currentColor; /* Icon inherits link color */

    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;

    /* SVG mask (URL‑encoded) */
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.0002 5H8.2002C7.08009 5 6.51962 5 6.0918 5.21799C5.71547 5.40973 5.40973 5.71547 5.21799 6.0918C5 6.51962 5 7.08009 5 8.2002V15.8002C5 16.9203 5 17.4801 5.21799 17.9079C5.40973 18.2842 5.71547 18.5905 6.0918 18.7822C6.5192 19 7.07899 19 8.19691 19H15.8031C16.921 19 17.48 19 17.9074 18.7822C18.2837 18.5905 18.5905 18.2839 18.7822 17.9076C19 17.4802 19 16.921 19 15.8031V14M20 9V4M20 4H15M20 4L13 11' /%3E%3C/svg%3E");
}

.primary-navigation .external-link > a::after {
    position: relative;
    left: auto;
    margin-left: 8px;
}

.header-links-ul .external-link > a::after {
    width: 1.1em;
    height: 1.1em;
}