/* EMYPAY Youth — theme.css
   Sacred Restoration Design System
   Base resets and utility styles. Tailwind CDN handles layout classes.
*/

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Source Serif Four', serif;
    background-color: #e2fffe;
    color: #002020;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }

/* ─── Header ─── */
.emypay-header {
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
}
.emypay-header.scrolled {
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}

/* ─── Nav Links ─── */
.emypay-nav-link {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #b9c7e4;
    padding: 5px 9px;
    border-radius: 3px;
    transition: color 0.2s, background 0.2s;
    white-space: nowrap;
}
.emypay-nav-link:hover,
.emypay-nav-link--active {
    color: #fed488;
    background: rgba(255,255,255,0.06);
}

/* ─── Hamburger Button ─── */
#emypay-menu-btn { display: flex; }
@media (min-width: 1025px) { #emypay-menu-btn { display: none !important; } }

/* ─── Mobile Menu ─── */
#emypay-mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1);
}
#emypay-mobile-menu.open { max-height: 640px; }

/* ─── Sections ─── */
.emypay-section     { padding: 64px 0; }
.emypay-section-sm  { padding: 40px 0; }
.emypay-container   { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ─── Cards ─── */
.emypay-card {
    background: #ffffff;
    padding: 28px;
    border-top: 3px solid #775a19;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.emypay-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(0,0,0,0.1);
}

.emypay-card-dark {
    background: #0d1c32;
    padding: 28px;
    border-top: 3px solid #775a19;
    transition: transform 0.3s ease;
}
.emypay-card-dark:hover { transform: translateY(-4px); }

/* ─── Dividers ─── */
.gold-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #775a19, transparent);
    position: relative;
    margin: 3rem 0;
}
.gold-divider::after {
    content: '◆';
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    color: #775a19;
    background: inherit;
    padding: 0 10px;
    font-size: .7rem;
}
.gold-divider-light::after { background: #e2fffe; }
.gold-divider-dark::after  { background: #0d1c32; }
.gold-divider-black::after { background: #000000; }

/* ─── Scripture Block ─── */
.scripture-block {
    border-left: 4px solid #0d1c32;
    padding-left: 24px;
    font-style: italic;
    color: #0d1c32;
}

/* ─── Scroll Reveal ─── */
.scroll-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.scroll-reveal.visible { opacity: 1; transform: translateY(0); }

/* ─── Hero ─── */
.emypay-hero {
    min-height: 92vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.emypay-hero-sm {
    min-height: 52vh;
    display: flex;
    align-items: center;
    position: relative;
}

/* ─── Hebrew Accent ─── */
.hebrew-accent {
    font-family: serif;
    opacity: 0.05;
    position: absolute;
    z-index: 0;
    -webkit-user-select: none;
    user-select: none;
    pointer-events: none;
}

/* ─── Value Icon ─── */
.value-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(119,90,25,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: #775a19;
}

/* ─── Department Badge ─── */
.dept-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(119,90,25,0.12);
    color: #775a19;
    padding: 4px 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

/* ─── Buttons ─── */
.btn-primary {
    display: inline-block;
    background: #000000;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 14px 32px;
    border: 2px solid #000000;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    cursor: pointer;
}
.btn-primary:hover {
    background: transparent;
    color: #000000;
}

.btn-gold {
    display: inline-block;
    background: #775a19;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 14px 32px;
    border: 2px solid #775a19;
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
}
.btn-gold:hover {
    background: transparent;
    color: #775a19;
}

.btn-outline-light {
    display: inline-block;
    background: transparent;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 12px 30px;
    border: 2px solid rgba(255,255,255,0.5);
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
}
.btn-outline-light:hover {
    border-color: #fed488;
    color: #fed488;
}

/* ─── Material Icons ─── */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
}

/* ─── WP pagination ─── */
.nav-links { display: flex; gap: 8px; margin-top: 48px; }
.page-numbers {
    padding: 8px 14px;
    background: #ffffff;
    color: #002020;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    border: 1px solid #c6e9e9;
    transition: background 0.2s, color 0.2s;
}
.page-numbers.current,
.page-numbers:hover { background: #0d1c32; color: #ffffff; }

/* ─── Dropdown Nav ─── */
.emypay-dropdown {
    position: relative;
}
.emypay-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #0d1c32;
    border-top: 2px solid #775a19;
    min-width: 160px;
    z-index: 100;
    padding: 6px 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.emypay-dropdown:hover .emypay-dropdown-menu {
    display: block;
}
.emypay-dropdown-item {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #b9c7e4;
    padding: 10px 16px;
    transition: color 0.2s, background 0.2s;
    white-space: nowrap;
}
.emypay-dropdown-item:hover {
    color: #fed488;
    background: rgba(255,255,255,0.06);
}
.emypay-caret {
    font-size: 9px;
    margin-left: 3px;
    opacity: 0.6;
}

/* Mobile dropdown — show as indented items */
@media (max-width: 1024px) {
    .emypay-dropdown-menu {
        position: static;
        box-shadow: none;
        border-top: none;
        border-left: 2px solid #775a19;
        margin: 4px 0 4px 12px;
        padding: 4px 0;
        display: none;
    }
    .emypay-dropdown.open .emypay-dropdown-menu {
        display: block;
    }
    .emypay-dropdown > a .emypay-caret {
        float: right;
    }
}

/* ─── Two-column grid utility ─── */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}
.grid-2-center { align-items: center; }

/* ─── Responsive — Tablet (max 1024px) ─── */
@media (max-width: 1024px) {
    .grid-2,
    [style*="grid-template-columns:1fr 1fr"],
    [style*="grid-template-columns: 1fr 1fr"] {
        gap: 40px !important;
    }
}

/* ─── Responsive — Mobile (max 768px) ─── */
@media (max-width: 768px) {

    /* ── Layout ── */
    .emypay-section    { padding: 40px 0; }
    .emypay-section-sm { padding: 24px 0; }
    .emypay-container  { padding: 0 16px; }
    .emypay-hero       { min-height: 0; }
    .emypay-hero-sm    { min-height: 0; }
    .emypay-header     { height: auto !important; }

    /* ── Collapse all 2-col grids ── */
    .grid-2,
    [style*="grid-template-columns:1fr 1fr"],
    [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }

    /* ── Section padding overrides ── */
    section[style*="padding:80px"],
    section[style*="padding: 80px"] {
        padding-top: 48px !important;
        padding-bottom: 48px !important;
    }
    section[style*="padding:96px"],
    section[style*="padding: 96px"] {
        padding-top: 56px !important;
        padding-bottom: 56px !important;
    }
    section[style*="padding:72px"],
    section[style*="padding: 72px"] {
        padding-top: 48px !important;
        padding-bottom: 48px !important;
    }

    /* ── Typography ── */
    h1 { font-size: clamp(28px, 8vw, 42px) !important; }
    h2 { font-size: clamp(22px, 6vw, 32px) !important; }
    h3 { font-size: clamp(18px, 5vw, 24px) !important; }

    /* ── Hero section ── */
    .emypay-hero > div[style*="padding:100px"],
    .emypay-hero > div[style*="padding: 100px"] {
        padding: 60px 16px 48px !important;
    }
    .emypay-hero-sm > div[style*="padding:80px"],
    .emypay-hero-sm > div[style*="padding: 80px"] {
        padding: 48px 16px !important;
    }

    /* ── Flex button rows → stack ── */
    div[style*="display:flex"][style*="gap:16px"],
    div[style*="display:flex"][style*="gap: 16px"] {
        flex-wrap: wrap !important;
    }
    .btn-gold:not(.header-reg-btn), .btn-primary, .btn-outline-light {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }
    .header-reg-btn {
        width: auto !important;
        padding: 8px 14px !important;
        font-size: 11px !important;
        white-space: nowrap !important;
    }

    /* ── Cards ── */
    .emypay-card, .emypay-card-dark { padding: 20px; }

    /* ── Card inner padding ── */
    div[style*="padding:40px"] { padding: 24px !important; }
    div[style*="padding:28px 36px"] { padding: 20px !important; }

    /* ── Contact form ── */
    input, textarea, select {
        font-size: 16px !important; /* Prevents iOS zoom */
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* ── Contact info cards ── */
    div[style*="padding:20px"][style*="display:flex"] {
        flex-direction: column !important;
        gap: 10px !important;
    }

    /* ── Hebrew accent overflow ── */
    .hebrew-accent { display: none; }

    /* ── Programs grid min-width fix ── */
    [style*="minmax(340px"] {
        grid-template-columns: 1fr !important;
    }
    [style*="minmax(300px"] {
        grid-template-columns: 1fr !important;
    }
    [style*="minmax(280px"] {
        grid-template-columns: 1fr !important;
    }

    /* ── Footer ── */
    footer div[style*="padding:64px"] {
        padding: 40px 16px 0 !important;
    }

    /* ── Vision/Mission cards ── */
    div[style*="padding:40px;background:#ffffff"],
    div[style*="padding:40px;background:#0d1c32"] {
        padding: 24px !important;
    }

    /* ── 404 page ── */
    div[style*="font-size:96px"] {
        font-size: 64px !important;
    }

    /* ── Max width containers ── */
    div[style*="max-width:1200px"],
    div[style*="max-width: 1200px"],
    div[style*="max-width:1100px"] {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    /* ── Contact page ── */
    .contact-form-box {
        padding: 20px !important;
    }
    .contact-form-box h3 {
        font-size: 20px !important;
        margin-bottom: 20px !important;
    }
    /* Stack contact info icon cards vertically */
    div[style*="border-left:4px solid #0d1c32"][style*="display:flex"],
    div[style*="border-left:4px solid #775a19"][style*="display:flex"],
    div[style*="border-left:4px solid #000000"][style*="display:flex"] {
        flex-direction: row !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }
    /* Contact section padding */
    section[style*="background:#e2fffe"][style*="padding:80px 0"] {
        padding-top: 40px !important;
        padding-bottom: 40px !important;
    }
}

/* ─── Hide header Register button on very small phones ─── */
@media (max-width: 479px) {
    .header-reg-btn { display: none !important; }
}

/* ─── Convention Ticker ─── */
.emypay-ticker-inner {
    display: flex;
    width: max-content;
    align-items: center;
    height: 100%;
    white-space: nowrap;
    -webkit-animation: emypay-ticker 48s linear infinite;
    animation: emypay-ticker 48s linear infinite;
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}
@keyframes emypay-ticker {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
@-webkit-keyframes emypay-ticker {
    from { -webkit-transform: translateX(0); }
    to   { -webkit-transform: translateX(-50%); }
}
.emypay-ticker-inner:hover {
    -webkit-animation-play-state: paused;
    animation-play-state: paused;
}

/* ─── Convention Popup ─── */
@media (max-width: 600px) {
    .gte4-popup-card {
        grid-template-columns: 1fr !important;
        max-height: 88vh;
        overflow-y: auto;
    }
    .gte4-popup-card > div:first-child {
        min-height: 200px !important;
        height: 200px;
    }
}

/* ─── Flyer layout grids ─── */
@media (max-width: 768px) {
    .flyer-card-grid {
        grid-template-columns: 1fr !important;
    }
    .convention-banner-grid {
        grid-template-columns: 1fr !important;
        text-align: center;
    }
    .convention-banner-grid .btn-gold,
    .convention-banner-grid a[style*="background:#000000"] {
        width: 100%;
        display: block;
        text-align: center;
        box-sizing: border-box;
    }
}
