/**
 * Green Thread Network - Theme Custom Styles
 * Shared styles extracted from reference HTML inline <style> blocks.
 */

/* ========================================
   Typography
   ======================================== */
body {
    font-family: 'Open Sans', sans-serif;
}
h1, h2, h3, h4, h5, h6 {
    font-family: 'Raleway', sans-serif;
}

/* ========================================
   Header / Menu Button Overrides
   ======================================== */
.header-wrapper .main-menu .menu-btn a {
    background-color: #00807A;
    border-color: #00807A;
}
.header-wrapper .main-menu .menu-btn a:hover {
    background-color: var(--white);
    border-color: #00807A;
}
.header-wrapper .main-menu .menu-btn a:hover span,
.header-wrapper .main-menu .menu-btn a:hover i {
    color: #00807A;
}

/* Menu underline hover effect */
.header-wrapper .main-menu > li:not(.menu-btn) > a {
    position: relative;
}
.header-wrapper .main-menu > li:not(.menu-btn) > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #00693C;
    transition: width 0.3s ease;
}
.header-wrapper .main-menu > li:not(.menu-btn) > a:hover::after {
    width: 100%;
}

/* Global container max-width override (1360px cap) */
@media (min-width: 1200px) {
    .container,
    .container-lg,
    .container-md,
    .container-sm,
    .container-xl,
    .container-xxl {
        max-width: 1360px;
    }
}

/* Header container full-width override */
.header-section .container {
    max-width: 100%;
    padding-left: calc((100% - 1360px) / 2 + 0.75rem - 25px);
    padding-right: calc((100% - 1360px) / 2 + 0.75rem - 25px);
}
@media (max-width: 1360px) {
    .header-section .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

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

@media (max-width: 1199px) {
    .header-wrapper {
        padding-right: 15px;
    }
}

.menu-btn a {
    white-space: nowrap;
}

/* ========================================
   Footer Social Icons
   ======================================== */
.footer-two__item .social-icon a,
.footer-two__item .social-icon span {
    color: var(--white);
    background-color: transparent;
}
.footer-two__item .social-icon a:hover {
    background-color: var(--white) !important;
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}
.footer-two__item .social-icon a:hover i {
    color: var(--primary-color) !important;
}

/* ========================================
   Work Item Icon Color
   SVGs are green (#4BAF47) by default; filter
   shifts to teal/riverside to match reference.
   ======================================== */
.work__item-icon img {
    filter: brightness(0) saturate(100%) invert(38%) sepia(95%) saturate(456%) hue-rotate(137deg) brightness(93%) contrast(101%);
}

/* ========================================
   Work Item Hover
   ======================================== */
.work .work__item h3 a:hover {
    color: var(--heading-color);
}

/* ========================================
   Work Item Description (WYSIWYG output)
   Replaces <p> wrapper to avoid nested <p> from
   WYSIWYG. Matches original .work__item p styles.
   ======================================== */
.work__item .work__item-desc {
    margin: 20px 0;
    flex-grow: 1;
}
.work__item .work__item-desc p {
    margin: 0;
}

/* ========================================
   Work Item Arrow — Dynamic button text
   Uses data-text attr to override the hardcoded
   ::before "Learn More" with custom text from ACF.
   Same hover animation as reference: hidden by
   default, slides in from left on card hover.
   ======================================== */
.work__item-arrow[data-text]::before {
    content: attr(data-text);
}

/* ========================================
   Testimonial Carousel Pagination
   ======================================== */
.gtn-testimonial-swiper {
    position: relative;
    padding-bottom: 50px;
}
.gtn-testi-pagination {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
}
.gtn-testi-pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    opacity: 0.3;
}
.gtn-testi-pagination .swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--primary-color);
}

/* ========================================
   Page Heading — Full-width wavy lines
   ======================================== */
.page-hero {
    overflow: visible;
}

/* ========================================
   Visually Hidden (Accessibility)
   ======================================== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========================================
   Skip Link (Accessibility)
   ======================================== */
.skip-link {
    position: absolute;
    top: -9999px;
    left: -9999px;
    background: var(--primary-color, #00693C);
    color: #fff;
    padding: 8px 16px;
    z-index: 100000;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}
.skip-link:focus {
    top: 0;
    left: 0;
}

/* ========================================
   Subscribe Slide-down Panel
   ======================================== */
.subscribe-panel {
    max-height: 0;
    overflow: hidden;
    background: var(--sub-bg);
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    padding: 0;
}
.subscribe-panel.open {
    max-height: 200px;
    padding: 20px 0;
}
.subscribe-panel-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}
.subscribe-panel-text {
    color: var(--accent-rich-soil);
    font-size: 15px;
    font-weight: 600;
    margin: 0;
}
.subscribe-panel .input-area {
    display: flex;
    align-items: center;
    background: var(--white);
    border-radius: 100px;
    padding: 5px 5px 5px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.subscribe-panel .input-area input {
    border: none;
    outline: none;
    padding: 10px 0;
    font-size: 14px;
    width: 220px;
    background: transparent;
}
.subscribe-panel .input-area input::placeholder {
    color: var(--span);
}
.subscribe-panel .input-area button {
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
}
.subscribe-panel .input-area button:hover {
    background: var(--accent-riverside);
}
.subscribe-panel .input-area button i {
    color: var(--white);
    font-size: 14px;
}
.subscribe-panel .close-btn {
    background: none;
    border: none;
    color: var(--accent-rich-soil);
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}
.subscribe-panel .close-btn:hover {
    opacity: 1;
}
.subscribe-link.active {
    color: var(--primary-color) !important;
}

/* ========================================
   Scroll-up Light Variant (green backgrounds)
   ======================================== */
.scroll-up.light {
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.3);
}
.scroll-up.light::after {
    color: var(--white) !important;
}
.scroll-up.light .scroll-circle path {
    stroke: var(--white) !important;
}

/* ========================================
   CTA Band Button Styles
   ======================================== */
.cta-band-btn {
    background-color: var(--white) !important;
    border-color: var(--white) !important;
}
.cta-band-btn span,
.cta-band-btn i {
    color: var(--primary-color) !important;
}
.cta-band-btn:hover {
    background-color: var(--white) !important;
    border-color: var(--white) !important;
}
.cta-band-btn:hover span,
.cta-band-btn:hover i {
    color: var(--accent-rich-soil) !important;
}

/* ========================================
   Tablet Break Utility
   ======================================== */
.tablet-break {
    display: none;
}
@media (min-width: 768px) and (max-width: 1199px) {
    .tablet-break {
        display: inline !important;
    }
}

/* ========================================
   WP Nav Wrapper Fix
   wp_nav_menu() wraps <ul> in <nav> which breaks
   the header-wrapper flex layout. display:contents
   makes <nav> transparent to flexbox.
   ======================================== */
.header-wrapper > nav {
    display: contents;
}

/* ========================================
   Mobile / Tablet Header Responsive Fixes
   ======================================== */

/* ========================================
   Admin Bar Fix
   ======================================== */
body.admin-bar .header {
    top: 32px;
}
@media screen and (max-width: 782px) {
    body.admin-bar .header {
        top: 46px;
    }
}

/* ========================================
   Responsive Spacing — Scale on tablet & mobile
   Preset classes: ~75% on tablet, ~50% on small mobile.
   Custom values via CSS custom properties scale similarly.
   Base theme already handles pt-130/pb-130 at ≤424px.
   ======================================== */
@media screen and (max-width: 768px) {
    .pt-130 {
        padding-top: 80px;
    }
    .pb-130 {
        padding-bottom: 80px;
    }
    .pt-100 {
        padding-top: 65px;
    }
    .pb-100 {
        padding-bottom: 65px;
    }
    .pt-65 {
        padding-top: 45px;
    }
    .pb-65 {
        padding-bottom: 45px;
    }
    /* Custom spacing — scale to ~65% on tablet */
    .gtn-custom-spacing {
        --gtn-sp-scale: 0.65;
    }
}
@media screen and (max-width: 424px) {
    .pt-100 {
        padding-top: 50px;
    }
    .pb-100 {
        padding-bottom: 50px;
    }
    .pt-65 {
        padding-top: 35px;
    }
    .pb-65 {
        padding-bottom: 35px;
    }
    /* Custom spacing — scale to ~50% on small mobile */
    .gtn-custom-spacing {
        --gtn-sp-scale: 0.5;
    }
}

/* ========================================
   Event date — white text color fix
   ======================================== */
.event-date .day,
.event-date .month,
.event-date .year {
    color: var(--white);
}

/* ========================================
   Blog tag — ensure inline bg-color wins
   ======================================== */
.blog__tag {
    background-color: transparent;
}

/* ========================================
   CTA Band — 50px vertical padding (reference)
   ======================================== */
.cta-band {
    padding-top: 50px;
    padding-bottom: 50px;
}

/* ========================================
   WYSIWYG paragraph spacing
   The base CSS resets p { margin: 0; } which
   removes spacing between paragraphs in rich
   text content. Restore it for block content.
   ======================================== */
.gtn-block p + p {
    margin-top: 20px;
}

/* ========================================
   Anchor Link Offset — Fixed Header
   When navigating to #section anchors, offset the
   scroll position so the fixed header doesn't hide
   the section heading.
   ======================================== */
section[id] {
    scroll-margin-top: 100px;
}

/* ========================================
   Button Group — Center on mobile/tablet
   Flex containers override text-center inheritance,
   so we explicitly center below the lg breakpoint.
   ======================================== */
@media (max-width: 991px) {
    .gtn-btn-wrap:not(.justify-content-start):not(.justify-content-end) {
        justify-content: center;
    }
}

/* ========================================
   Eventbrite Plugin — Match Theme Event Layout
   Override plugin default styles so Eventbrite
   events look identical to the CPT event cards.
   ======================================== */

/* Container — match CPT events section width & padding */
section.wfea.eaw-block,
.entry-content section.wfea.eaw-block,
.widget section.wfea.eaw-block {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    max-width: 1360px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    overflow: visible !important;
}

/* Event list wrapper */
section.wfea .event-list,
.entry-content section.wfea .event-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
    padding: 50px 0 !important;
}

/* Event card */
section.wfea .event-item.eventbrite-event,
.entry-content section.wfea .event-item.eventbrite-event {
    display: flex !important;
    align-items: stretch !important;
    background: #fff !important;
    border-radius: 12px !important;
    box-shadow: 0px 4px 25px rgba(0, 0, 0, 0.08) !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    border: none !important;
    border-bottom: none !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 290px;
}
/* Eventbrite filter buttons */
section.wfea .category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
    justify-content: center;
}
section.wfea .category-tag {
    display: inline-block;
    padding: 3px 21px;
    border-radius: 27px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid var(--primary-color, #00693C);
    background: transparent;
    color: var(--primary-color, #00693C);
    transition: all 0.3s ease;
}
section.wfea .category-tag:hover {
    background: var(--primary-color, #00693C);
    color: #fff;
    transform: translateY(-2px);
}
section.wfea .category-tag.active {
    background: var(--primary-color, #00693C);
    color: #fff;
}

/* Eventbrite event category badge — exact match with CPT events-listing block */
section.wfea .event-content .event-category,
.entry-content section.wfea .event-content .event-category {
    display: inline-block !important;
    padding: 7px 12px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    border-radius: 20px !important;
    margin: 0 0 10px 0 !important;
    width: fit-content !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    text-decoration: none !important;
    color: #ffffff !important;
    box-sizing: border-box !important;
    vertical-align: baseline !important;
    height: auto !important;
    min-height: 0 !important;
}

/* Eventbrite no-events message — hidden by default, shown by JS */
section.wfea .no-events-message,
.entry-content section.wfea .no-events-message {
    display: none;
}
section.wfea .no-events-message.show,
.entry-content section.wfea .no-events-message.show {
    display: block;
}

/* Hide paged events (View More) */
section.wfea .event-item.eventbrite-event.eb-paged-hidden,
.entry-content section.wfea .event-item.eventbrite-event.eb-paged-hidden {
    display: none !important;
}

/* View More button */
.eb-view-more-btn {
    display: inline-block;
    margin-bottom: 30px;
    padding: 15px 40px;
    background: var(--primary-color, #00693C);
    color: #fff;
    border: 2px solid var(--primary-color, #00693C);
    border-radius: 100px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
}
.eb-view-more-btn:hover {
    background: #fff;
    color: var(--primary-color, #00693C);
}

/* Hide filtered-out Eventbrite events with smooth transition */
section.wfea .event-item.eventbrite-event,
.entry-content section.wfea .event-item.eventbrite-event {
    transition: opacity 0.3s ease, max-height 0.3s ease, margin 0.3s ease, padding 0.3s ease !important;
    opacity: 1;
    max-height: 500px;
    overflow: hidden;
}
section.wfea .event-item.eventbrite-event.eb-hidden,
.entry-content section.wfea .event-item.eventbrite-event.eb-hidden {
    opacity: 0 !important;
    max-height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    box-shadow: none !important;
    border: none !important;
    pointer-events: none;
}

section.wfea .event-item.eventbrite-event:hover,
.entry-content section.wfea .event-item.eventbrite-event:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0px 8px 35px rgba(0, 0, 0, 0.12) !important;
}

/* Date badge */
section.wfea .event-item .event-date,
.entry-content section.wfea .event-item .event-date {
    min-width: 120px !important;
    background-color: var(--primary-color, #00693C) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px 15px !important;
    text-align: center !important;
    flex-shrink: 0 !important;
}
section.wfea .event-item .event-date .full-date,
.entry-content section.wfea .event-item .event-date .full-date {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #fff !important;
    white-space: nowrap !important;
}
section.wfea .event-item .event-date .day,
.entry-content section.wfea .event-item .event-date .day {
    font-size: 42px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    font-family: 'Raleway', sans-serif !important;
    color: #fff !important;
    background: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
section.wfea .event-item .event-date .month,
.entry-content section.wfea .event-item .event-date .month {
    font-size: 18px !important;
    text-transform: uppercase !important;
    font-weight: 600 !important;
    letter-spacing: 1px !important;
    color: #fff !important;
    background: none !important;
}
section.wfea .event-item .event-date .year,
.entry-content section.wfea .event-item .event-date .year {
    font-size: 18px !important;
    font-weight: 400 !important;
    margin-top: 4px !important;
    opacity: 0.85;
    color: #fff !important;
    background: none !important;
}

/* Content area */
section.wfea .event-item .event-content,
.entry-content section.wfea .event-item .event-content {
    flex: 1 !important;
    padding: 24px 30px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    line-height: normal !important;
}
section.wfea .event-item .event-content .event-cta,
.entry-content section.wfea .event-item .event-content .event-cta {
    margin-top: auto !important;
}
section.wfea .event-item .event-content h3,
.entry-content section.wfea .event-item .event-content h3,
.entry-content .eaw-block .event-item .event-content h3 {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: var(--accent-rich-soil, #3C1518) !important;
    margin-bottom: 8px !important;
    margin-top: 0 !important;
    line-height: 1.4 !important;
    background: none !important;
    clear: none !important;
}
section.wfea .event-item .event-content h3 a,
.entry-content section.wfea .event-item .event-content h3 a,
.entry-content .eaw-block .event-item .event-content h3 a {
    color: inherit !important;
    text-decoration: none !important;
}
section.wfea .event-item .event-content h3 a:hover,
.entry-content section.wfea .event-item .event-content h3 a:hover {
    color: var(--primary-color, #00693C) !important;
}
section.wfea .event-item .event-description,
.entry-content section.wfea .event-item .event-description {
    font-size: 14px !important;
    color: var(--paragraph, #666) !important;
    margin-bottom: 8px !important;
    line-height: 1.6 !important;
}

/* Meta (time + location) */
section.wfea .event-item .event-meta,
.entry-content section.wfea .event-item .event-meta {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
    font-size: 14px !important;
    color: var(--span, #999) !important;
    margin-top: 4px !important;
    margin-bottom: 21px !important;
}
section.wfea .event-item .event-meta i,
.entry-content section.wfea .event-item .event-meta i {
    color: var(--primary-color, #00693C) !important;
    margin-right: 6px !important;
}
section.wfea .event-item .event-time,
.entry-content section.wfea .event-item .event-time {
    font-size: 14px !important;
    color: var(--span, #999) !important;
}
section.wfea .event-item .event-location,
.entry-content section.wfea .event-item .event-location {
    font-size: 13px !important;
    color: var(--primary-color, #00693C) !important;
    font-weight: 600 !important;
}

/* Image */
section.wfea .event-item .event-image,
.entry-content section.wfea .event-item .event-image {
    width: 350px !important;
    max-width: 350px !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
}
section.wfea .event-item .event-image a,
.entry-content section.wfea .event-item .event-image a {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
}
section.wfea .event-item .event-image img,
.entry-content section.wfea .event-item .event-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    display: block !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
}

/* Arrow */
section.wfea .event-item .event-arrow,
.entry-content section.wfea .event-item .event-arrow {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 20px !important;
    flex-shrink: 0 !important;
}
section.wfea .event-item .event-arrow a,
.entry-content section.wfea .event-item .event-arrow a {
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    background-color: var(--sub-bg, #f5f5f5) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--primary-color, #00693C) !important;
    font-size: 18px !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
}
section.wfea .event-item .event-arrow a:hover,
.entry-content section.wfea .event-item .event-arrow a:hover {
    background-color: var(--primary-color, #00693C) !important;
    color: #fff !important;
}

/* CTA / Register button — matches Navigation CTA (Get Involved) style */
section.wfea .event-item .event-cta a,
.entry-content section.wfea .event-item .event-cta a {
    display: inline-block !important;
    padding: 15px 30px !important;
    background: #00918C !important;
    color: #FFFFFF !important;
    border: 2px solid #00918C !important;
    border-radius: 100px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
}
section.wfea .event-item .event-cta a:hover,
.entry-content section.wfea .event-item .event-cta a:hover {
    background: #FFFFFF !important;
    color: #00918C !important;
    border-color: #00918C !important;
}

/* Tablet + Mobile responsive — column layout up to 1024px */
@media (max-width: 1024px) {
    /* Card: column layout with reordered elements */
    section.wfea .event-item.eventbrite-event,
    .entry-content section.wfea .event-item.eventbrite-event {
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        min-height: unset !important;
        overflow: visible !important;
        max-height: none !important;
    }

    /* Reorder: image first, then arrow, then date, then content */
    section.wfea .event-item .event-image,
    .entry-content section.wfea .event-item .event-image {
        order: 1 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        flex-shrink: 0 !important;
        overflow: visible !important;
    }
    section.wfea .event-item .event-arrow,
    .entry-content section.wfea .event-item .event-arrow {
        display: none !important;
    }
    section.wfea .event-item .event-date,
    .entry-content section.wfea .event-item .event-date {
        order: 3 !important;
        min-width: unset !important;
        flex-direction: row !important;
        align-items: baseline !important;
        gap: 10px !important;
        padding: 15px 20px !important;
    }
    section.wfea .event-item .event-content,
    .entry-content section.wfea .event-item .event-content {
        order: 4 !important;
        padding: 20px !important;
    }
    section.wfea .event-item .event-date .day,
    .entry-content section.wfea .event-item .event-date .day {
        font-size: 32px !important;
    }

    /* Image sizing */
    section.wfea .event-item .event-image a,
    .entry-content section.wfea .event-item .event-image a {
        display: block !important;
        width: 100% !important;
        height: auto !important;
    }
    section.wfea .event-item .event-image img,
    .entry-content section.wfea .event-item .event-image img {
        width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
        max-height: none !important;
    }
}
