
/*
Theme Name: GeneratePress Child
Theme URI: http://example.com/
Description: GeneratePress Child Theme
Author: Your Name
Template: generatepress
Version: 1.0
*/
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ================================================
   HEADER
================================================ */
.site-header {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 9999;
    background: #fff;
    height: 57px;
    border-bottom: 1px solid transparent;
    transition: box-shadow 0.4s ease, border-bottom 0.4s ease;
    display: flex;
    align-items: center;
}

.site-header.scrolled {
    box-shadow: 0 4px 5px 0 rgba(0, 0, 0, .14), 0 1px 10px 0 rgba(0, 0, 0, .12), 0 2px 4px -1px rgba(0, 0, 0, .2);
    border-bottom: 1px solid #ddd; /* line appears on scroll */
    background-color: rgba(255, 255, 255, 1);
}

.google-help-header {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 10px;
}

/* ================================================
   LOGO
================================================ */
.google-help-logo img {
    height: 48px;
    width: auto;
    position: relative;
    top: 4px;   /* very subtle drop */
}

/* ================================================
   MENU BUTTON (hamburger)
================================================ */
.google-menu-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.google-menu-btn svg {
    width: 24px;
    height: 24px;
    fill: #444;
}

/* ================================================
   SEARCH — DESKTOP (GOOGLE STYLE)
================================================ */
.google-search-box {
    margin-left: auto;
    flex: 1;
    max-width: 720px;
    display: flex;
}

.google-search-box form {
    width: 100%;
    position: relative;
}

.google-search-box input[type="search"] {
    width: 100%;
    height: 42px;
    border-radius: 8px;
    border: 1px solid transparent;
    padding: 0 40px 0 14px;
    background: #f1f3f4;
    transition: background .15s ease, border-color .15s ease;
    font-size: 15px;
}

.google-search-box input[type="search"]:focus {
    background: #fff;
    border-color: #d2d6da;
    outline: none;
}

/* ================================================
   MOBILE SEARCH — ICON & BACK BUTTON
================================================ */

.mobile-search-toggle,
.mobile-search-back {
    background: none;
    border: none;
    padding: 4px;
}

.mobile-search-toggle svg,
.mobile-search-back svg {
    width: 24px;
    height: 24px;
    fill: #444;
}

/* Default */
.mobile-search-toggle {
    display: inline-flex;
}

.mobile-search-back {
    display: none;
}

/* Search open */
body.mobile-search-active .mobile-search-toggle {
    display: none;
}

body.mobile-search-active .mobile-search-back {
    display: inline-flex;
}


/* -------------------------------------------------------
   MOBILE BUTTON HOVER (Google-style)
   Applies to:
   - Hamburger menu (.google-menu-btn)
   - Search icon (.mobile-search-toggle)
-------------------------------------------------------- */
@media (max-width: 768px) {

    .google-menu-btn,
    .mobile-search-toggle {
        width: 42px;
        height: 42px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        transition: background-color .18s ease;
        cursor: pointer;
        background: transparent;
        border: none;
    }

    /* Light circular hover */
    .google-menu-btn:hover,
    .mobile-search-toggle:hover {
        background-color: rgba(60, 64, 67, 0.08);
    }

    /* Active press effect */
    .google-menu-btn:active,
    .mobile-search-toggle:active {
         background-color: rgba(60, 64, 67, 0.16);
    }

    /* Icon color + size */
    .google-menu-btn svg,
    .mobile-search-toggle svg {
        width: 24px;
        height: 24px;
        fill: #5f6368;
        pointer-events: none;
    }
}


/* ================================================
   MOBILE INLINE SEARCH BAR
================================================ */
.mobile-inline-search {
    display: none;
    flex: 1;
}

.search-active .mobile-inline-search {
    display: block;
}

.mobile-inline-search-form {
    width: 100%;
}

/* ================================================
   MOBILE SEARCH BOX — SAME STYLE AS DESKTOP
================================================ */
@media(max-width: 768px) {

    /* Wrapper stays same */
    .mobile-inline-search {
        flex: 1;
    }

    /* Apply desktop style */
    #mobile-inline-input {
        width: 100%;
        height: 42px;
        border-radius: 8px;
        border: 1px solid transparent;
        padding: 0 14px;
        background: #f1f3f4;
        font-size: 15px;
        transition: background .15s ease, border-color .15s ease;
    }

    #mobile-inline-input:focus {
        background: #fff;
        border-color: #d2d6da;
        outline: none;
    }
}

/* ============================================================
   CENTER LOGO IN MOBILE HEADER (Google-style)
============================================================ */
@media (max-width: 768px) {

    /* Make header items use full width with spacing */
    .google-help-header {
        position: relative;
        justify-content: center;
    }

    /* Center the logo perfectly */
    .google-help-logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    /* Keep menu button on the left */
    .google-menu-btn {
        position: relative;
        z-index: 10;
    }

    /* Keep search icon on the right */
    .mobile-search-toggle {
        position: relative;
        margin-left: auto;
        z-index: 10;
    }
}


/* =================================================
   SLIDE MENU – FINAL STABLE VERSION
================================================= */

.mobile-slide-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background: #ffffff;
    transition: left .3s ease;
    z-index: 100000;
    box-shadow: 0 2px 3px rgba(48,48,48,.30),
                0 6px 10px rgba(48,48,48,.15);
    overflow-y: auto;
}

.mobile-slide-menu.open {
    left: 0;
}

/* ================= HEADER ================= */

.slide-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 57px;
    min-height: 57px;
    padding: 0 16px;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 1px solid #eaeaea;
}

.close-slide {
    font-size: 28px;
    cursor: pointer;
    background: transparent;
    border: none;
    color: #000;
}

/* ================= MENU ITEMS ================= */

.mobile-slide-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-slide-menu .menu-item {
    display: flex;
    align-items: center;
    flex-wrap: wrap; /* REQUIRED for submenu width */
}

/* MAIN MENU LINK */
.mobile-slide-menu .menu-item > a {
    flex: 1;
    padding: 14px 0 14px 40px;
    font-size: 15px;
    color: #0b57d0;
    text-decoration: none;
    border-bottom: 1px solid #eee;
}

/* Desktop-like spacing */
@media (min-width: 30rem) {
    .mobile-slide-menu .menu-item > a {
        padding: 19px 0 19px 66px;
        font-size: 16px;
    }
}

/* SUBTLE ROW HOVER (very light) */
.mobile-slide-menu .menu-item:hover {
    background-color: rgba(60, 64, 67, 0.04);
}

.mobile-slide-menu .menu-item:active {
    background-color: rgba(60, 64, 67, 0.08);
}

/* ================= SUBMENU ARROW ================= */
/* VISUAL ONLY – FUNCTION UNCHANGED */

/* ================= SUBMENU ARROW – CLEAN & ALIGNED ================= */

.submenu-arrow {
    display: inline-flex;
    align-items: center;      /* vertical alignment with text */
    justify-content: center;
    padding: 0;               /* no extra space */
    margin-right: 14px;       /* space from right edge */
    background: none !important;
    border: none;
    cursor: pointer;
    line-height: 1;           /* IMPORTANT: fixes vertical mismatch */
    color: #32373c !important;
}

/* REMOVE hover / active background completely */
.submenu-arrow:hover,
.submenu-arrow:active,
.submenu-arrow:focus {
    background: none !important;
}

/* SVG arrow smooth rotation */
.submenu-arrow svg {
    display: block;
    transition: transform .25s ease, color .2s ease;
}

/* Open state */
.menu-item-has-children.submenu-open > .submenu-arrow svg {
    transform: rotate(90deg);
    color: #1a73e8;
}


/* Hover feedback */
.submenu-arrow:hover {
    background-color: rgba(60, 64, 67, 0.08);
}

/* SVG animation (rotation controlled by existing JS class) */
.submenu-arrow svg {
    transition: transform .25s ease, color .2s ease;
}

.menu-item-has-children.submenu-open > .submenu-arrow svg {
    transform: rotate(90deg);
    color: #1a73e8;
}

/* ================= SUBMENU ================= */

#mobileSlideMenu .sub-menu {
    display: none;
    width: 100%;
    padding: 6px 0 6px 66px;
    background: #fafafa;
    border-left: 2px solid #eaeaea;
}

#mobileSlideMenu .menu-item-has-children.submenu-open > .sub-menu {
    display: block;
}

#mobileSlideMenu .sub-menu a {
    display: block;
    padding: 12px 0;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #eee;
}

/* ================= OVERLAY ================= */

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    opacity: 0;
    visibility: hidden;
    transition: .3s;
    z-index: 99999;
}

.menu-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* ================= ACCESSIBILITY ================= */

.screen-reader-text {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}


#mobileSlideMenu .sub-menu {
    display: none;
}

#mobileSlideMenu .menu-item-has-children.submenu-open > .sub-menu {
    display: block;
}



/* ===== HIDE DEFAULT WP / GP SUBMENU TOGGLE (MOBILE + DESKTOP) ===== */

.mobile-slide-menu .submenu-toggle,
.mobile-slide-menu .dropdown-menu-toggle,
.mobile-slide-menu .menu-item-has-children > a::after {
    display: none !important;
}




/* ===================================================================
   RESPONSIVE
=================================================================== */
@media(max-width: 768px) {

    /* Hide desktop search */
    .google-search-box {
        display: none;
    }

    .mobile-search-toggle {
        display: flex;
        margin-left: auto;
    }

    .mobile-search-back {
        display: none;
    }

    /* When search active */
    .search-active .mobile-search-back {
        display: flex;
    }

    .search-active .google-help-logo,
    .search-active .google-menu-btn,
    .search-active .mobile-search-toggle {
        display: none !important;
    }
}

@media(min-width: 769px) {

    /* Desktop: hide mobile search toggle/back */
    .mobile-search-toggle,
    .mobile-search-back,
    .mobile-inline-search {
        display: none !important;
    }
}


/* -------------------------------------------------------
   GOOGLE STYLE DESKTOP SEARCH ICON (FINAL FIX)
-------------------------------------------------------- */
@media (min-width: 769px) {

    .google-search-box form {
        position: relative !important;
    }

    .google-search-box form::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 14px;
        width: 18px;
        height: 18px;
        transform: translateY(-50%);
        pointer-events: none;

        background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="%23666" viewBox="0 0 24 24"><path d="M20.49 19l-5.73-5.73C15.53 12.2 16 10.91 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.41 0 2.7-.47 3.77-1.24L19 20.49 20.49 19zM5 9.5C5 7.01 7.01 5 9.5 5S14 7.01 14 9.5 11.99 14 9.5 14 5 11.99 5 9.5z"/></svg>');
        background-repeat: no-repeat;
        background-size: contain;
    }
    
    @media(min-width: 769px) {
    .google-search-box form::before { /* keep desktop only */ }
}

    .google-search-box input[type="search"] {
        padding-left: 40px !important;
    }
}

/* -------------------------------------------------------
   Desktop Search Box — Google Style Icon Hover
-------------------------------------------------------- */
@media (min-width: 769px) {

    /* Create a hoverable area over the icon */
    .google-search-box form::before {
        z-index: 5;
        padding: 6px;
        margin-left: -8px; /* makes circular area centered */
        border-radius: 50%;
        transition: background-color .18s ease;
    }

    /* Hover effect */
    .google-search-box form:hover::before {
        background-color: rgba(60, 64, 67, 0.08); /* light Google grey */
    }

    /* Slightly darker on click */
    .google-search-box form:active::before {
        background-color: rgba(60, 64, 67, 0.16);
    }
}

/* -------------------------------------------------------
   DESKTOP MENU LIGHT HOVER (Google style)
-------------------------------------------------------- */
@media (min-width: 769px) {

    /* Apply hover to menu button + nav links */
    .google-menu-btn,
    .main-navigation .main-nav ul li > a {
        transition: background-color .18s ease, color .18s ease;
        border-radius: 8px;
    }

    /* Soft hover */
    .google-menu-btn:hover,
    .main-navigation .main-nav ul li > a:hover {
        background-color: rgba(60, 64, 67, 0.08);
    }

    /* Active click effect */
    .google-menu-btn:active,
    .main-navigation .main-nav ul li > a:active {
        background-color: rgba(60, 64, 67, 0.16);
    }
}
/* ==================================================
   FIX: REMOVE DESKTOP SEARCH ICON ON MOBILE
================================================== */
@media (max-width: 768px) {
    .google-search-box form::before {
        content: none !important;
        display: none !important;
    }
}
/* =========================================================
   CRITICAL FIX: REMOVE CSS-GENERATED SEARCH ICON ON MOBILE
========================================================= */
@media (max-width: 768px) {

    /* Desktop search pseudo-icon MUST NOT exist on mobile */
    .google-search-box form::before,
    .google-search-box form::after {
        content: none !important;
        display: none !important;
        background: none !important;
    }

}