/* =====================================================
   Equity Bridge Funding — Custom Styles
   Design system: Navy Blue + Gold accent
   ===================================================== */

/* ── Google Font Import ──────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;800&family=Inter:wght@400;500;600&display=swap');

/* ── Base ────────────────────────────────────────────── */

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

html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f8f9fa;
    color: #191c1d;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; }

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

/* ── Gradient Utilities ─────────────────────────────── */

.primary-gradient {
    background: linear-gradient(135deg, #001e45 0%, #0a2d60 50%, #123c73 100%);
}

.gold-gradient {
    background: linear-gradient(135deg, #C9921A 0%, #E8B84B 50%, #C9921A 100%);
}

/* ── Gold Button ────────────────────────────────────── */

.gold-btn {
    background: linear-gradient(135deg, #C9921A 0%, #E8B84B 100%);
    color: #1a0f00;
    font-weight: 800;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 20px rgba(201, 146, 26, 0.45);
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.gold-btn:hover {
    background: linear-gradient(135deg, #A5780F 0%, #C9921A 100%);
    box-shadow: 0 6px 28px rgba(201, 146, 26, 0.55);
    transform: translateY(-1px);
}

/* ── Gold Outline Button ────────────────────────────── */

.gold-outline-btn {
    border: 2px solid #C9921A;
    color: #C9921A;
    font-weight: 700;
    background: transparent;
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
}

.gold-outline-btn:hover {
    background: rgba(201, 146, 26, 0.08);
}

/* ── Gold Text & Accents ────────────────────────────── */

.gold-text {
    color: #C9921A;
}

.gold-accent-bar {
    display: inline-block;
    width: 48px;
    height: 4px;
    background: linear-gradient(90deg, #C9921A, #E8B84B);
    border-radius: 2px;
    margin-bottom: 16px;
}

.gold-badge {
    background: linear-gradient(135deg, rgba(201, 146, 26, 0.15), rgba(232, 184, 75, 0.1));
    border: 1px solid rgba(201, 146, 26, 0.35);
    color: #A5780F;
}

/* ── Glass Card ─────────────────────────────────────── */

.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(195, 198, 209, 0.3);
}

/* ── How It Works Step Connector ────────────────────── */

.step-line::after {
    content: '';
    position: absolute;
    top: 2rem;
    left: 50%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #C9921A, rgba(201, 146, 26, 0.2));
    z-index: 0;
}

.step-line:last-child::after {
    display: none;
}

/* ── Program Card ───────────────────────────────────── */

.program-card {
    border-bottom: 4px solid #C9921A;
    transition: all 0.25s ease;
}

.program-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(201, 146, 26, 0.18), 0 4px 12px rgba(0, 38, 83, 0.08);
}

/* ── Stat Number ────────────────────────────────────── */

.stat-number {
    color: #C9921A;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
}

/* ── Testimonial Card ───────────────────────────────── */

.testimonial-card {
    border-top: 3px solid #C9921A;
}

/* ── CTA Pulse Animation ────────────────────────────── */

@keyframes pulse-gold {
    0%, 100% { box-shadow: 0 4px 20px rgba(201, 146, 26, 0.45); }
    50%       { box-shadow: 0 4px 32px rgba(201, 146, 26, 0.7); }
}

.cta-gold-btn {
    animation: pulse-gold 2.5s ease-in-out infinite;
}

/* ── Hero Highlight ─────────────────────────────────── */

.hero-highlight {
    color: #C9921A;
}

/* ── Nav Active State ───────────────────────────────── */

.nav-active {
    border-bottom: 2px solid #C9921A;
    color: #002653;
}

/* =====================================================
   TESTIMONIALS CAROUSEL
   ===================================================== */

.testimonial-carousel-outer {
    position: relative;
    overflow: hidden;
    padding: 0 0 8px;
}

.testimonial-track {
    display: flex;
    gap: 24px;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    align-items: stretch;
}

.testimonial-slide {
    flex: 0 0 calc((100% - 48px) / 3);
    min-width: 0;
}

/* Carousel Arrows */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(201, 146, 26, 0.4);
    background: #ffffff;
    color: #C9921A;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    box-shadow: 0 2px 12px rgba(0, 38, 83, 0.12);
}

.carousel-arrow:hover {
    background: #C9921A;
    color: #1a0f00;
    border-color: #C9921A;
    box-shadow: 0 4px 20px rgba(201, 146, 26, 0.4);
}

.carousel-prev { left: -22px; }
.carousel-next { right: -22px; }

/* Dot indicators */
.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(201, 146, 26, 0.25);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-dot.active {
    width: 24px;
    border-radius: 4px;
    background: #C9921A;
}

/* =====================================================
   CONTACT FORM MODAL
   ===================================================== */

.contact-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 30, 69, 0.75);
    backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 16px;
    /* iOS safe area padding for bottom */
    padding-bottom: max(16px, env(safe-area-inset-bottom));
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.contact-modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.contact-modal-box {
    background: #ffffff;
    border-radius: 24px;
    width: 100%;
    max-width: 640px;
    position: relative;
    box-shadow: 0 32px 80px rgba(0, 38, 83, 0.3);
    transform: translateY(20px) scale(0.98);
    transition: transform 0.3s ease;
    padding: 40px;
    margin: auto 0;
}

.contact-modal-overlay.is-open .contact-modal-box {
    transform: translateY(0) scale(1);
}

.contact-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(195, 198, 209, 0.5);
    background: #f8f9fa;
    color: #434750;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.contact-modal-close:hover {
    background: #e7e8e9;
    color: #191c1d;
}

.contact-modal-header {
    margin-bottom: 28px;
}

.contact-modal-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 26px;
    color: #002653;
    margin-bottom: 8px;
}

.contact-modal-subtitle {
    font-size: 15px;
    color: #434750;
    line-height: 1.5;
}

/* Form layout */
.contact-modal-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.contact-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.contact-form-label {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #434750;
    letter-spacing: 0.02em;
}

.contact-form-input {
    border: 1.5px solid #c3c6d1;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    color: #191c1d;
    background: #f8f9fa;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    outline: none;
}

.contact-form-input:focus {
    border-color: #C9921A;
    box-shadow: 0 0 0 3px rgba(201, 146, 26, 0.12);
    background: #ffffff;
}

.contact-form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23434750' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.contact-form-textarea {
    resize: vertical;
    min-height: 80px;
}

.contact-form-disclaimer {
    font-size: 12px;
    color: #737781;
    line-height: 1.5;
}

.contact-form-disclaimer a {
    color: #C9921A;
    text-decoration: underline;
}

/* =====================================================
   MOBILE HAMBURGER MENU
   ===================================================== */

#mobile-menu-btn.is-open .hamburger-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
#mobile-menu-btn.is-open .hamburger-bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
#mobile-menu-btn.is-open .hamburger-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* =====================================================
   SUPPORTING PAGES LAYOUT
   ===================================================== */

.page-content {
    max-width: 860px;
    margin: 0 auto;
    padding: 60px 24px 80px;
}

.page-content h1 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: clamp(28px, 4vw, 40px);
    color: #002653;
    margin-bottom: 8px;
    line-height: 1.2;
}

.page-content .page-meta {
    font-size: 13px;
    color: #737781;
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e1e3e4;
}

.page-content h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: #002653;
    margin-top: 36px;
    margin-bottom: 12px;
}

.page-content p, .page-content li {
    font-size: 16px;
    line-height: 1.75;
    color: #434750;
    margin-bottom: 12px;
}

.page-content ul {
    padding-left: 20px;
    margin-bottom: 16px;
}

.page-content a {
    color: #C9921A;
    text-decoration: underline;
}

.page-content .gold-accent-bar {
    margin-bottom: 20px;
}

/* =====================================================
   RESPONSIVE — TABLET (max 1024px)
   ===================================================== */

@media (max-width: 1024px) {
    .testimonial-slide {
        flex: 0 0 calc((100% - 24px) / 2);
    }
    .carousel-prev { left: -16px; }
    .carousel-next { right: -16px; }
}

/* =====================================================
   RESPONSIVE — MOBILE (max 768px)
   ===================================================== */

@media (max-width: 768px) {

    /* Prevent any horizontal overflow */
    section, header, footer, main {
        max-width: 100vw;
        overflow-x: hidden;
    }

    /* Hero */
    .hero-image-wrapper { display: none; }

    /* Step connectors off on mobile */
    .step-line::after { display: none; }

    /* Carousel: 1 card wide on mobile */
    .testimonial-slide {
        flex: 0 0 100%;
    }

    .carousel-prev { left: 4px; }
    .carousel-next { right: 4px; }

    /* Contact modal: full-width, scrollable, respects iOS notch */
    .contact-modal-overlay {
        align-items: flex-start;
        padding: 12px 12px max(24px, env(safe-area-inset-bottom));
    }

    .contact-modal-box {
        padding: 24px 16px;
        border-radius: 16px;
        margin: 0;
        /* No max-height — let overlay scroll instead */
        max-height: none;
    }

    /* Form 2-col -> 1-col */
    .contact-form-row {
        grid-template-columns: 1fr;
    }

    /* Page content */
    .page-content {
        padding: 40px 16px 60px;
    }
}

/* =====================================================
   RESPONSIVE — SMALL MOBILE (max 480px)
   ===================================================== */

@media (max-width: 480px) {

    /* Hero CTA buttons: stack vertically, full-width */
    .hero-cta-group {
        flex-direction: column;
        width: 100%;
    }

    .hero-cta-group button {
        width: 100%;
        height: auto !important;
        min-height: 50px;
        padding: 12px 16px;
        font-size: 15px !important;
        white-space: normal;
        line-height: 1.3;
    }

    /* CTA section buttons: stack and full-width */
    .cta-btn-group {
        flex-direction: column !important;
        width: 100%;
    }

    .cta-btn-group button {
        width: 100% !important;
        height: auto !important;
        min-height: 50px;
        padding: 12px 16px !important;
        font-size: 15px !important;
        white-space: normal;
        line-height: 1.3;
    }


}
