/*
 * Foremost Shortcodes – Header CSS
 * Replicates Header.tsx styles. All classes prefixed with fm- to avoid Elementor conflicts.
 */

/* ── 0. WP/Elementor reset overrides ─────────────────────────────────────── */

/* Remove fuchsia outline/focus on all interactive elements */
.fm-header a,
.fm-header a:focus,
.fm-header a:active,
.fm-header a:visited,
.fm-header button,
.fm-header button:focus,
.fm-header button:active,
.fm-header input,
.fm-header input:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Reset: button { border: 1px solid #c36; color: #c36; background-color: transparent }
   Reset: button:hover/focus { background-color: #c36; color: #fff }
   → Strip ALL button reset styles inside the header */
.fm-header button,
.fm-header [type="button"],
.fm-header [type="submit"] {
    border: none !important;
    border-radius: 0 !important;
    background-color: transparent !important;
    color: inherit !important;
    font-weight: inherit !important;
    padding: 0 !important;
    font-size: inherit !important;
    text-align: inherit !important;
    white-space: normal !important;
    transition: none !important;
}

/* Restore hamburger: use .fm-header .fm-hamburger (0,2,0) to beat
   the blanket button reset at (0,1,1) */
.fm-header .fm-hamburger,
.fm-header button.fm-hamburger {
    background-color: var(--fm-orange-1) !important;
    color: #ffffff !important;
    border-radius: 9999px !important;
    padding: 16px !important;
    width: 48px !important;
    height: 48px !important;
    transition: opacity 0.2s ease !important;
}

.fm-header .fm-hamburger:hover,
.fm-header .fm-hamburger:focus,
.fm-header .fm-hamburger:active {
    background-color: var(--fm-orange-1) !important;
    color: #ffffff !important;
}

/* Mobile menu: set base white so links/buttons inherit correctly via
   ".fm-header a { color: inherit }" and ".fm-header button { color: inherit }" */
.fm-header .fm-mobile-menu {
    color: #ffffff !important;
}

/* Reset: a { color: #c36 } / a:hover { color: #336 }
   → Catch-all for any missed links inside the header nav bar.
     Links inside .fm-mobile-menu will inherit white from above. */
.fm-header a {
    color: inherit !important;
}

/* Reset: input[type=email] { border: 1px solid #666; border-radius: 3px; width: 100% } */
.fm-header input[type="email"],
.fm-header input[type="text"] {
    border: none !important;
    border-radius: 0 !important;
    width: auto !important;
    padding: 0 !important;
}

/* ── 1. Header Wrapper ────────────────────────────────────────────────────── */

.fm-header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 20;
    width: 100%;
}

/* ── 2. Nav Bar ──────────────────────────────────────────────────────────── */

.fm-header__nav {
    position: relative;
    z-index: 10;
    width: 100%;
    background-color: #ffffff;
    border-bottom: 1px solid #E5E5E5;
    padding: 8px 0;
    transition: background-color 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                border-color 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fm-header__inner {
    width: 91.666%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

/* ── 3. Logo ─────────────────────────────────────────────────────────────── */

.fm-header__logo-link {
    display: flex;
    align-items: center;
    text-decoration: none !important;
    flex-shrink: 0;
}

.fm-header__logo-link:hover {
    text-decoration: none !important;
}

.fm-header__logo {
    width: 192px; /* w-48 */
    height: auto;
}

/* ── 4. Desktop Menu ─────────────────────────────────────────────────────── */

.fm-header__menu {
    display: none;
    align-items: center;
    gap: 64px; /* gap-x-16 */
    list-style: none;
    margin: 0;
    padding: 0;
}

@media (min-width: 1024px) {
    .fm-header__menu {
        display: flex;
    }
}

.fm-nav-item {
    position: relative;
    cursor: pointer;
}

.fm-nav-item__link {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 300;
    color: #000000 !important;
    text-decoration: none !important;
    white-space: nowrap;
    transition: color 0.1s ease-in-out;
}

.fm-nav-item__link:hover {
    color: #000000 !important;
    text-decoration: none !important;
}

@media (min-width: 1280px) {
    .fm-nav-item__link {
        font-size: 16px;
    }
}

.fm-nav-item__chevron {
    width: 14px;
    height: 8px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

/* Hover border effect (replicates scale-90 → scale-100 border) */
.fm-nav-item__border {
    position: absolute;
    inset: 0;
    z-index: 0;
    border: 1px solid #000000;
    border-radius: 8px;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.15s ease, transform 0.15s ease;
    pointer-events: none;
}

.fm-nav-item:hover .fm-nav-item__border {
    opacity: 1;
    transform: scale(1);
}

/* ── 5. Desktop CTAs ─────────────────────────────────────────────────────── */

.fm-header__ctas {
    display: none;
    align-items: center;
    gap: 24px;
}

@media (min-width: 1024px) {
    .fm-header__ctas {
        display: flex;
    }
}

.fm-cta-icon {
    display: flex;
    align-items: center;
    color: var(--fm-gray-1) !important;
    text-decoration: none !important;
    transition: color 0.15s ease;
}

.fm-cta-icon:hover {
    color: var(--fm-blue-1) !important;
    text-decoration: none !important;
}

.fm-icon {
    width: 24px;
    height: 24px;
}

.fm-icon--blue {
    color: var(--fm-blue-1);
}

/* CONTACT US button
   Use .fm-header a.fm-btn-contact (0,2,1) to beat the catch-all
   .fm-header a { color: inherit !important } which is (0,1,1) */
.fm-header a.fm-btn-contact,
.fm-header .fm-btn-contact {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: var(--fm-blue-1) !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    min-height: 56px !important;
    min-width: 186px !important;
    max-width: 350px !important;
    padding: 12px 8px !important;
    border-radius: 9999px !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: opacity 0.2s ease !important;
    overflow: hidden !important;
    position: relative !important;
}

.fm-header a.fm-btn-contact:hover,
.fm-header .fm-btn-contact:hover {
    color: #ffffff !important;
    text-decoration: none !important;
    opacity: 0.95 !important;
}

.fm-btn-contact__inner {
    white-space: nowrap;
}

.fm-btn-contact:hover .fm-btn-contact__inner {
    /* marquee effect */
    display: inline-flex;
    animation: fm-marquee 1.5s linear infinite;
    white-space: nowrap;
}

@media (min-width: 1280px) {
    .fm-header a.fm-btn-contact,
    .fm-header .fm-btn-contact {
        font-size: 16px !important;
        padding: 16px 8px !important;
    }
}

/* ── 6. Mobile Hamburger ─────────────────────────────────────────────────── */

.fm-header .fm-hamburger,
.fm-header button.fm-hamburger {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: var(--fm-orange-1) !important;
    color: #ffffff !important;
    width: 48px !important;
    height: 48px !important;
    aspect-ratio: 1 !important;
    border-radius: 9999px !important;
    border: none !important;
    cursor: pointer !important;
    padding: 16px !important;
    flex-shrink: 0 !important;
}

@media (min-width: 1024px) {
    .fm-header .fm-hamburger,
    .fm-header button.fm-hamburger {
        display: none !important;
    }
}

/* ── 7. Mega Menu Desktop ────────────────────────────────────────────────── */

.fm-mega {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    padding-top: 7rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.fm-mega.fm-mega--visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.fm-mega__panel {
    display: none;
}

.fm-mega__panel.fm-mega__panel--active {
    display: flex;
    flex-direction: column;
}

/* Grid layout panel (Tropical Plants) */
.fm-mega__panel--grid.fm-mega__panel--active {
    padding: 0 40px;
    background-color: #ffffff;
}

/* Tabs */
.fm-mega__tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    margin-bottom: 20px;
}

.fm-mega__tab {
    position: relative;
    padding-bottom: 20px;
    font-size: 24px;
    font-weight: 300;
    color: #7D7D7D !important;
    text-decoration: none !important;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.2s ease, font-weight 0.2s ease;
}

.fm-mega__tab:hover,
.fm-mega__tab.fm-mega__tab--active {
    color: var(--fm-blue-1) !important;
    font-weight: 500;
    text-decoration: none !important;
}

.fm-mega__tab-underline {
    position: absolute;
    bottom: -1px;
    left: 0;
    height: 3px;
    background-color: var(--fm-blue-1);
    width: 0;
    transition: width 0.25s ease-out;
}

.fm-mega__tab.fm-mega__tab--active .fm-mega__tab-underline,
.fm-mega__tab:hover .fm-mega__tab-underline {
    width: 100%;
}

/* Image grid */
.fm-mega__grid {
    display: none;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    margin-top: 16px;
    padding-bottom: 48px;
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    background-color: #ffffff;
}

.fm-mega__grid.fm-mega__grid--active {
    display: grid;
}

.fm-grid-item {
    display: block;
    text-decoration: none !important;
    cursor: pointer;
}

.fm-grid-item:hover {
    text-decoration: none !important;
}

.fm-grid-item__img-wrap {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 40px 0 40px 0; /* rounded-tl-[40px] rounded-br-[40px] */
}

.fm-grid-item__img-wrap img {
    width: 100%;
    height: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.fm-grid-item:hover .fm-grid-item__img-wrap img {
    transform: scale(1.1);
}

.fm-grid-item__name {
    margin-top: 16px;
    text-align: center;
    font-size: 18px;
    font-weight: 500;
    color: #1f2937 !important;
}

/* List layout panel (Our Roots) */
.fm-mega__panel--list.fm-mega__panel--active {
    padding: 0 40px 32px;
    background-color: #ffffff;
}

.fm-mega__list {
    display: flex;
    flex-direction: column;
    gap: 40px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.fm-mega__list-item {
    opacity: 0.5;
    transform: translateX(0);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.fm-mega__list-item:hover {
    opacity: 1;
    transform: translateX(10px);
}

.fm-mega__list-link {
    position: relative;
    display: inline-block;
    font-size: 36px; /* text-4xl */
    color: #000000 !important;
    text-decoration: none !important;
}

.fm-mega__list-link:hover {
    color: #000000 !important;
    text-decoration: none !important;
}

.fm-mega__list-underline {
    position: absolute;
    bottom: -6px;
    left: 0;
    height: 2px;
    background-color: #000000;
    border-radius: 2px;
    width: 0;
    transition: width 0.25s ease-out;
}

.fm-mega__list-link:hover .fm-mega__list-underline {
    width: 100%;
}

/* ── 8. Mobile Menu ──────────────────────────────────────────────────────── */

.fm-mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 40;
    background-color: var(--fm-blue-1);
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    padding: 24px;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

.fm-mobile-menu.fm-mobile-menu--open {
    transform: translateX(0);
}

@media (min-width: 1024px) {
    .fm-mobile-menu {
        display: none !important;
    }
}

.fm-mobile-menu__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fm-mobile-menu__nav {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Mobile search bar */
.fm-mobile-search {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #ffffff !important;
    border-radius: 12px;
    padding: 16px 24px;
    margin-bottom: 20px;
    font-size: 16px;
    color: #000000 !important;
    text-decoration: none !important;
}

.fm-mobile-search:hover {
    color: #000000 !important;
    text-decoration: none !important;
}

/* Mobile nav list */
.fm-mobile-menu__list {
    flex: 1;
    list-style: none;
    margin: 0;
    padding: 0;
}

.fm-mob-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.fm-mob-item__link {
    display: block;
    padding: 16px 0;
    font-size: 20px;
    font-weight: 600;
    color: #ffffff !important;
    text-decoration: none !important;
}

.fm-mob-item__link:hover {
    color: #ffffff !important;
    text-decoration: none !important;
}

/* Use .fm-mobile-menu .fm-mob-item__btn (0,2,0) to beat blanket reset (0,1,1) */
.fm-mobile-menu .fm-mob-item__btn {
    display: flex !important;
    width: 100% !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 16px 0 !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    cursor: pointer !important;
    text-align: left !important;
    transition: none !important;
}

.fm-mobile-menu .fm-mob-item__btn:hover,
.fm-mobile-menu .fm-mob-item__btn:focus,
.fm-mobile-menu .fm-mob-item__btn:active {
    background-color: transparent !important;
    color: #ffffff !important;
    border: none !important;
}

.fm-mob-item__chevron {
    width: 14px;
    height: 8px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.fm-mob-item--accordion[aria-expanded="true"] .fm-mob-item__chevron,
.fm-mob-item__btn[aria-expanded="true"] .fm-mob-item__chevron {
    transform: rotate(180deg);
}

/* Accordion collapse */
.fm-mob-item__collapse {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    padding-bottom: 0;
}

.fm-mob-item__collapse.fm-mob-item__collapse--open {
    max-height: 2000px;
    opacity: 1;
    padding-bottom: 16px;
}

/* Pills (sub-items) */
.fm-mob-subitem {
    padding: 8px 0;
}

/* Use .fm-mobile-menu .fm-mob-pill (0,2,0) to beat blanket reset (0,1,1) */
.fm-mobile-menu .fm-mob-pill {
    display: block !important;
    width: 83.333% !important;
    margin: 0 auto !important;
    background-color: #ffffff !important;
    color: var(--fm-blue-1) !important;
    border-radius: 9999px !important;
    padding: 12px 24px !important;
    text-align: center !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    border: none !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease, color 0.2s ease !important;
}

.fm-mobile-menu .fm-mob-pill:hover {
    color: var(--fm-blue-1) !important;
    text-decoration: none !important;
}

.fm-mobile-menu .fm-mob-pill--toggle {
    display: block !important;
    border: none !important;
    border-radius: 9999px !important;
}

.fm-mobile-menu .fm-mob-pill--toggle.fm-mob-pill--active {
    background-color: var(--fm-orange-1) !important;
    color: #ffffff !important;
}

/* Sub-accordion */
.fm-mob-subitem--sub-accordion {
    display: flex;
    flex-direction: column;
}

/* Mobile grid (2 columns) */
.fm-mob-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    width: 91.666%;
    margin: 16px auto 0;
}

.fm-mob-grid-item {
    display: block;
    text-decoration: none !important;
}

.fm-mob-grid-item:hover {
    text-decoration: none !important;
}

.fm-mob-grid-item__img {
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 1;
}

.fm-mob-grid-item__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fm-mob-grid-item p {
    margin-top: 8px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: #ffffff !important;
}

.fm-mob-grid-explore {
    grid-column: span 2;
    text-align: center;
}

.fm-mob-grid-explore a {
    color: #ffffff !important;
    text-decoration: underline !important;
    font-size: 14px;
}
