/*
Theme Name: andEverywhere
Author: andEverywhere
Description: Stay awesome.
Version: 1.0
Text Domain: andEverywhere-theme
*/

/*#wpadminbar { display: none !important; }*/
@media screen { html { margin-top: 0px !important; } }

html .main-wrapper { overflow: hidden; }
html .container,
html .container-lg,
html .container-md,
html .container-sm,
html .container-xl,
html .container-xxl {
    width: 100%;
    max-width: 100%;
    padding: 0px;
}

/* =========================================
   HEADER & MENU LAYOUT
   ========================================= */
.custom-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 3;
    font-family: 'Livvic', sans-serif;
}
.custom-header .header-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 15px;
    display: flex;
    align-items: center;
}
.custom-header .menu {
    margin: 0 0 0 auto;
    display: flex;
    align-items: center;
}
.custom-header .menu .main-menu {
    display: flex;
    gap: 40px;
    padding: 0;
    align-items: center;
    margin-bottom: 0;
}
.custom-header .menu li { list-style-type: none; }
.custom-header .menu li a {
    line-height: normal;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.3s ease;
    white-space: nowrap;
    font-family: 'Livvic', sans-serif;
}
.custom-header .menu li a:hover { opacity: 0.8; }

/* =========================================
   EXPANDING SEARCH FIELD
   ========================================= */
.custom-header .menu .search-menu {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: 20px;
}
.custom-header .menu .search-menu .search-toggle {
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
    z-index: 2;
    font-family: 'Livvic', sans-serif;
}
.custom-header .menu .search-menu .search-toggle svg {
    width: 18px;
    height: 18px;
    stroke: #ffffff;
    stroke-width: 2;
    transition: all 0.3s ease;
}
.custom-header .menu .search-menu::after {
    content: "";
    display: block;
    width: 0;
    transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.custom-header .menu .search-menu form {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 44px;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 25px;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1;
}
.custom-header .menu .search-menu.active::after {
    width: 280px;
}
.custom-header .menu .search-menu.active form {
    width: 280px;
    opacity: 1;
    visibility: visible;
    padding: 0 15px;
}
.custom-header .menu .search-menu.active .search-toggle {
    opacity: 0;
    pointer-events: none;
}
.custom-header .menu .search-menu form input {
    width: 100%;
    border: 0;
    padding: 0;
    color: #2e8b57;
    background: transparent;
    outline: none;
    font-size: 16px;
    font-weight: 500;
    font-family: 'Livvic', sans-serif;
}
.custom-header .menu .search-menu form input::placeholder {
    color: #2e8b57;
    opacity: 0.7;
}
.custom-header .menu .search-menu form button {
    background: transparent;
    border: 0;
    padding: 0;
    margin-left: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
}
.custom-header .menu .search-menu form button svg {
    stroke: #2e8b57;
    width: 20px;
    height: 20px;
}

/* =========================================
   SUBMENUS (Desktop)
   ========================================= */
.custom-header .menu .main-menu .menu-item-has-children {
    position: relative;
    padding-right: 15px;
}
.custom-header .menu .main-menu .menu-item-has-children::after {
    position: absolute;
    content: "";
    top: 9px;
    right: -3px;
    width: 10px;
    height: 10px;
    background: url("assets/images/menu-down.svg") no-repeat center center/contain;
    display: block;
    transition: all .5s ease-in-out;
    transform: rotate(180deg);
    cursor: pointer;
    filter: brightness(0) invert(1);
}
.custom-header .menu .main-menu .menu-item-has-children:hover::after {
    transform: rotate(0deg);
}
.custom-header .menu .main-menu .menu-item-has-children .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
    padding: 10px 15px;
    min-width: 200px;
    background-color: rgba(0, 0, 0, 0.85);
    border-radius: 6px;
    margin-top: 5px;
}
.custom-header .menu .main-menu .menu-item-has-children .sub-menu li { padding: 6px 0; }
.custom-header .menu .main-menu .menu-item-has-children .sub-menu li a {
    font-size: 15px;
    font-weight: 500;
    font-family: 'Livvic', sans-serif;
}
.custom-header .menu .main-menu .menu-item-has-children:hover .sub-menu {
    visibility: visible;
    opacity: 1;
}

/* =========================================
   MOBILE MENU TOGGLE (Hamburger)
   ========================================= */
.menu-toggle {
    display: none;
    gap: 5px;
    flex-direction: column;
    cursor: pointer;
    position: absolute;
    right: 15px;
    z-index: 99;
    width: 30px;
    height: 30px;
    top: 28px;
    text-decoration: none;
}
.menu-toggle span {
    width: 24px;
    height: 2px;
    background-color: #fff;
    transition: all 0.4s ease-in-out;
    display: block;
}

/* =========================================
   FOOTER (White)
   ========================================= */
.custom-footer {
    background: url("assets/images/footer-image.webp") no-repeat center center / cover;
    position: relative;
    padding: 150px 0;
    min-height: 580px;
    font-family: 'Livvic', sans-serif;
}
.custom-footer * { 
    color: #ffffff;
    font-family: 'Livvic', sans-serif;
}
.custom-footer a { 
    color: #ffffff;
    text-decoration: none; 
    transition: all 0.5s ease-in-out; 
}
.custom-footer a:hover { opacity: 0.8; }
.custom-footer ul { list-style-type: none; padding: 0; }
.custom-footer .footer-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 69, 44, 0.3);
}
.custom-footer .footer-content {
    max-width: 1200px;
    margin-inline: auto;
    display: grid;
    grid-template-columns: 1fr 0.5fr 0.5fr 0.5fr;
    gap: 30px;
    position: relative;
    padding-inline: 15px;
}

.custom-footer .footer-content h3,
.custom-footer .footer-content ul li a{
    color: white !important;
}

.custom-footer .footer-content ul { margin-left: 0; }
.custom-footer .footer-content ul li { 
    margin-bottom: 5px; 
    color: #ffffff;
}
.footer-column.footer-brand { width: 370px; }
.custom-footer .site-footer-logo { margin-bottom: 20px; }
.custom-footer .social-icons { margin-top: 50px; display: flex; gap: 20px; }
.custom-footer .social-icons a { font-size: 30px; color: #ffffff; }

/* =========================================
   RESPONSIVE – TABLET & MOBILE (max 1024px)
   ========================================= */
@media screen and (max-width: 1024px) {
    .custom-footer { padding: 100px 0; min-height: auto; }
    .custom-footer .footer-content { grid-template-columns: 1fr 1fr; gap: 80px; }

    .menu-toggle { display: flex; }

    /* Off-canvas mobile menu */
    .custom-header .menu {
        position: fixed;
        top: 0;
        left: 100%;
        width: 100%;
        height: 100vh;
        background-color: #C2E5D6;
        z-index: 9;
        padding-top: 96px;
        display: flex !important;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        flex-wrap: nowrap;
        visibility: hidden;
        overflow-y: auto;
        transition: left 0.4s ease-in-out, visibility 0.4s;
    }
    .custom-header .menu.active {
        left: 0;
        visibility: visible;
    }
    .custom-header .menu .main-menu {
        flex-direction: column;
        width: 100%;
        height: auto;
        gap: 0;
        padding: 0 20px;
        align-items: flex-start;
    }
    .custom-header .menu .main-menu > li {
        width: 100%;
        border-bottom: 1px solid rgba(33, 37, 41, 0.1);
    }
    .custom-header .menu .main-menu > li > a {
        display: block;
        font-size: 22px;
        color: #212529;
        padding: 15px 0;
        font-family: 'Livvic', sans-serif;
    }

    /* --- MOBILE SUBMENUS (class-driven, no !important conflicts) --- */
    .custom-header .menu .main-menu .menu-item-has-children { 
        padding-right: 25px; 
        position: relative;
    }

    /* Arrow styling */
    .custom-header .menu .main-menu .menu-item-has-children::after {
        top: 22px;
        right: 0;
        width: 15px;
        height: 15px;
        filter: brightness(0);
        transform: rotate(180deg);
        transition: transform 0.3s ease;
    }

    /* Rotate arrow when open */
    .custom-header .menu .main-menu .menu-item-has-children.menu-open::after {
        transform: rotate(0deg);
    }

    /* Hide submenus by default (no !important) */
    .custom-header .menu .main-menu .menu-item-has-children .sub-menu {
        position: static;
        background: transparent;
        padding: 0 0 0 20px;
        margin: 0;
        min-width: 100%;
        border-radius: 0;
        display: none;
        opacity: 1;
        visibility: visible;
        transition: none;
    }

    /* Show submenus when parent has .menu-open */
    .custom-header .menu .main-menu .menu-item-has-children.menu-open .sub-menu {
        display: block;
    }

    .custom-header .menu .main-menu .menu-item-has-children .sub-menu li a {
        color: #212529;
        font-size: 18px;
        font-weight: 500;
        padding: 10px 0;
        display: block;
        font-family: 'Livvic', sans-serif;
    }

    /* Mobile Search */
    .custom-header .menu .search-menu {
        width: 100%;
        padding: 20px;
        margin-left: 0;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }
    .custom-header .menu .search-menu::after { display: none; }
    .custom-header .menu .search-menu .search-toggle {
        color: #212529;
        font-size: 22px;
        display: flex;
        font-family: 'Livvic', sans-serif;
    }
    .custom-header .menu .search-menu .search-toggle svg {
        stroke: #212529;
        width: 22px;
        height: 22px;
    }
    .custom-header .menu .search-menu form {
        position: static;
        transform: none;
        width: 100%;
        max-width: 100%;
        height: auto;
        opacity: 1;
        visibility: visible;
        border-color: #212529;
        background: transparent;
        padding: 10px 15px;
        display: none;
        margin-top: 10px;
    }
    .custom-header .menu .search-menu.active form {
        display: flex;
        width: 100%;
        max-width: 100%;
    }
    .custom-header .menu .search-menu.active .search-toggle {
        opacity: 1;
        pointer-events: auto;
    }
    .custom-header .menu .search-menu form input { 
        color: #212529; 
        font-family: 'Livvic', sans-serif;
    }
    .custom-header .menu .search-menu form input::placeholder { color: #212529; }
    .custom-header .menu .search-menu form button svg { stroke: #212529; }

    /* Hamburger → X animation */
    .custom-header.toggle-menu .menu-toggle span { background-color: #212529; }
    .custom-header.toggle-menu .menu-toggle span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .custom-header.toggle-menu .menu-toggle span:nth-child(2) { opacity: 0; }
    .custom-header.toggle-menu .menu-toggle span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

    .custom-header .header-container { justify-content: space-between; }
    .custom-header .custom-logo { width: 200px; object-fit: contain; }
}

/* =========================================
   RESPONSIVE – PHONE (max 767px)
   ========================================= */
@media screen and (max-width: 767px) {
    .custom-footer { padding: 50px 0; }
    .custom-footer .footer-content { gap: 27px; grid-template-columns: 1fr; }
    .custom-footer .footer-content ul { margin-bottom: 0; }
    .footer-column.footer-brand { width: 100%; }
    .footer-column {
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        padding-bottom: 20px;
    }
    .custom-header .header-container { padding: 20px 15px; }
    .custom-logo { width: 200px; object-fit: contain; }
    .row { padding: 0 !important; }
    .custom-header .menu-toggle { top: 22px; }
}