/* Dominican Bridge Events — self-contained mini-site */
:root {
    --navy: #1a2b3a;
    --slate: #283f4f;
    --blue: #2b7bb9;
    --text: #333;
    --text-mid: #5d6c7c;
    --bone: #f5f3ef;
    --white: #fff;
    --border: #e0e0e0;
    --green: #22c55e;
    --red: #ef4444;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --font-heading: 'Libre Baskerville', Georgia, serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
    --max: 1200px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bone);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--navy); font-weight: 400; line-height: 1.25; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header {
    background: var(--navy);
    color: var(--white);
    padding: 16px 0;
    border-bottom: 3px solid var(--blue);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-header .logo { color: var(--white); font-family: var(--font-heading); font-size: 22px; text-decoration: none; }
.site-header .logo strong { color: var(--blue); }
.site-header nav { display: flex; align-items: center; gap: 24px; }
.site-header nav a { color: rgba(255,255,255,0.9); font-size: 14px; font-weight: 500; }
.site-header nav a:hover { color: var(--white); }
.lang-switch {
    border: 1px solid rgba(255,255,255,0.3);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
}
.lang-switch:hover { background: rgba(255,255,255,0.1); }

.nav-toggle {
    display: none;
    background: none;
    border: 0;
    width: 40px;
    height: 40px;
    padding: 8px;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
}
.nav-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--navy), var(--slate));
    color: var(--white);
    padding: 64px 0;
    text-align: center;
}
.hero h1 { color: var(--white); font-size: clamp(28px, 5vw, 42px); margin: 0 0 16px; }
.hero p { font-size: 18px; opacity: 0.9; max-width: 600px; margin: 0 auto; }
.hero .trust-badges { margin-top: 32px; display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.hero .trust-badges img { height: 32px; width: auto; background: white; padding: 6px 10px; border-radius: 4px; }

/* Sections */
section { padding: 56px 0; }
.section-title { font-size: 28px; margin: 0 0 32px; }

/* Cards / events */
.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.event-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}
.event-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.event-card a.cover { text-decoration: none; color: inherit; display: block; }
.event-card .img { aspect-ratio: 1/1; background: var(--bone); overflow: hidden; }
.event-card .img img { width: 100%; height: 100%; object-fit: cover; }
.event-card .body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.event-card h3 { font-size: 20px; margin: 0 0 8px; color: var(--navy); }
.event-card .meta { font-size: 13px; color: var(--text-mid); margin-bottom: 12px; }
.event-card .price { font-weight: 600; color: var(--navy); margin-top: auto; padding-top: 12px; }
.event-card .price.free { color: var(--green); }

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--blue);
    color: var(--white);
    border: none;
    border-radius: 4px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}
.btn:hover { background: var(--navy); text-decoration: none; }
.btn-lg { padding: 16px 32px; font-size: 16px; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-outline { background: transparent; color: var(--navy); border: 1px solid var(--border); }
.btn-outline:hover { background: var(--bone); }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--navy); }
.form-input {
    width: 100%;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 15px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--white);
}
.form-input:focus { outline: none; border-color: var(--blue); }

/* Two-column layout (event detail, checkout) */
.split { display: grid; grid-template-columns: 1fr 380px; gap: 32px; align-items: start; }
@media (max-width: 768px) { .split { grid-template-columns: 1fr; } }
.panel { background: var(--white); padding: 28px; border-radius: 8px; box-shadow: var(--shadow-sm); }
.panel h2 { font-size: 22px; margin-top: 0; }

/* Doc/legal pages */
.doc { background: var(--white); padding: 48px; border-radius: 8px; box-shadow: var(--shadow-sm); max-width: 800px; margin: 0 auto; }
.doc h1 { font-size: 32px; margin-top: 0; }
.doc h2 { font-size: 22px; margin-top: 32px; }
.doc p { font-size: 16px; }

/* Order summary */
.order-summary .row { display: flex; justify-content: space-between; padding: 8px 0; }
.order-summary .row.total { border-top: 2px solid var(--navy); margin-top: 12px; padding-top: 16px; font-weight: 700; font-size: 18px; }

.secure-note {
    background: var(--bone);
    border-left: 3px solid var(--blue);
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text-mid);
    margin: 16px 0;
}

/* Footer */
.site-footer {
    background: var(--navy);
    color: rgba(255,255,255,0.8);
    padding: 56px 0 24px;
    margin-top: 80px;
}
.site-footer h4 { color: var(--white); font-family: var(--font-body); font-size: 14px; text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 16px; }
.site-footer a { color: rgba(255,255,255,0.8); display: block; padding: 4px 0; font-size: 14px; }
.site-footer a:hover { color: var(--white); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid p { font-size: 14px; line-height: 1.6; margin: 0 0 8px; }
.payment-logos { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.payment-logos img { height: 28px; background: white; padding: 4px 8px; border-radius: 3px; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    text-align: center;
    font-size: 13px;
    color: rgba(255,255,255,0.6);
}

/* ==========================================================================
   MOBILE
   ========================================================================== */
@media (max-width: 900px) {
    .container { padding: 0 16px; }
    section { padding: 40px 0; }
    .section-title { font-size: 24px; margin-bottom: 24px; }
    .doc { padding: 32px 24px; }
    .doc h1 { font-size: 26px; }
    .doc h2 { font-size: 19px; }
    .doc p { font-size: 15px; }
}

@media (max-width: 768px) {
    /* Header — hamburger drawer on mobile. Override parent's absolute logo. */
    .site-header { padding: 12px 0; height: auto; position: relative; }
    .site-header .container {
        flex-wrap: nowrap;
        gap: 10px;
        justify-content: space-between;
        align-items: center;
    }
    .site-header .logo {
        position: static !important;
        left: auto !important;
        transform: none !important;
        flex: 1 1 auto;
        min-width: 0;
    }
    .site-header .logo img {
        height: 32px !important;
        width: auto !important;
        max-width: none !important;
        object-fit: contain;
    }
    .nav-toggle { display: flex; flex-shrink: 0; }
    .site-header nav#primary-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--navy);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease;
        border-top: 1px solid rgba(255,255,255,0.1);
    }
    .site-header nav#primary-nav.open { max-height: 320px; }
    .site-header nav#primary-nav a {
        display: block;
        padding: 14px 24px;
        font-size: 15px;
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }
    .site-header nav#primary-nav a:last-child { border-bottom: none; }
    .site-header nav#primary-nav .lang-switch {
        margin: 12px 24px;
        text-align: center;
        border: 1px solid rgba(255,255,255,0.3);
    }

    /* Hero */
    .hero { padding: 48px 0; }
    .hero h1 { font-size: 28px; }
    .hero p { font-size: 16px; padding: 0 8px; }
    .hero .trust-badges { gap: 10px; margin-top: 24px; }
    .hero .trust-badges img { height: 26px; padding: 5px 8px; }

    /* Event grid: single column from 600px down feels better than auto-fill */
    .event-grid { gap: 18px; }
    .event-card .body { padding: 16px; }
    .event-card h3 { font-size: 18px; }

    /* Two-col split (already collapsed at 768) — tighten panel padding */
    .panel { padding: 22px 18px; }
    .panel h2 { font-size: 19px; }

    /* Footer */
    .site-footer { padding: 40px 0 20px; margin-top: 48px; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; margin-bottom: 28px; }
    .site-footer h4 { font-size: 13px; }
    .payment-logos img { height: 24px; padding: 3px 6px; }

    /* Receipt */
    .receipt-card { padding: 32px 22px; }
    .receipt-icon { width: 56px; height: 56px; line-height: 56px; font-size: 28px; }

    /* Form inputs slightly bigger touch target */
    .form-input { padding: 14px; font-size: 16px; }
    .btn { padding: 14px 22px; font-size: 15px; }
    .btn-lg { padding: 16px 24px; font-size: 16px; }
}

@media (max-width: 480px) {
    .container { padding: 0 14px; }
    .hero h1 { font-size: 24px; }
    .hero p { font-size: 15px; }
    .hero .trust-badges img { height: 22px; padding: 4px 6px; }
    .doc { padding: 24px 18px; }
    .doc h1 { font-size: 22px; }
    .receipt-card { padding: 24px 16px; }
    .event-grid { grid-template-columns: 1fr; }
}

/* Receipt */
.receipt-card { max-width: 600px; margin: 0 auto; background: var(--white); padding: 48px; border-radius: 8px; box-shadow: var(--shadow-md); text-align: center; }
.receipt-icon { width: 64px; height: 64px; background: var(--green); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 24px; font-size: 32px; }
.receipt-details { text-align: left; margin-top: 32px; }
.receipt-details .row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); }
.receipt-details .row:last-child { border-bottom: none; }
