/* ============================================================
   BIGBRANDS — Global Stylesheet
   Breakpoints: 480px (xs), 768px (sm), 900px (md), 1200px (lg)
   ============================================================ */

/* ── CSS Variables ───────────────────────────────────────── */
:root {
    --primary-navy:  #103662;
    --medium-blue:   #205b90;
    --light-blue:    #3f8cc0;
    --pale-blue:     #8dbbd7;
    --white:         #ffffff;
    --gray-light:    #f5f7fa;
    --gray-medium:   #e0e0e0;
    --gray-dark:     #333333;
    --success:       #28a745;
    --danger:        #dc3545;
    --warning:       #ffc107;
    --info:          #17a2b8;
    --radius:        10px;
    --shadow:        0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg:     0 8px 32px rgba(0,0,0,0.13);
    --transition:    0.25s ease;
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--gray-dark);
    background: var(--white);
    overflow-x: hidden;
}

img, video { max-width: 100%; display: block; }

/* ── Container ───────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}
@media (min-width: 768px)  { .container { padding: 0 24px; } }
@media (min-width: 1024px) { .container { padding: 0 32px; } }

/* ── Typography ──────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-navy);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}
h1 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.25rem, 3vw, 2rem); }
h3 { font-size: clamp(1.05rem, 2.5vw, 1.5rem); }
h4 { font-size: clamp(0.95rem, 2vw, 1.2rem); }

a {
    text-decoration: none;
    color: var(--medium-blue);
    transition: color var(--transition);
}
a:hover { color: var(--light-blue); }

p { margin-bottom: 1rem; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--light-blue);
    color: var(--white);
    padding: 0.65rem 1.35rem;
    border-radius: var(--radius);
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background var(--transition), transform var(--transition);
}
.btn-primary:hover {
    background: var(--medium-blue);
    color: var(--white);
    transform: translateY(-1px);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: transparent;
    color: var(--white);
    padding: 0.65rem 1.35rem;
    border-radius: var(--radius);
    border: 2px solid var(--light-blue);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all var(--transition);
}
.btn-outline:hover {
    background: var(--light-blue);
    color: var(--white);
}

/* ── Navbar ──────────────────────────────────────────────── */
.navbar {
    background: var(--primary-navy);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 62px;
    max-width: 100%;
    overflow: hidden;
}

.nav-brand a  { display: flex; align-items: center; }
.nav-brand h1 { color: var(--white); font-size: 1.5rem; margin: 0; }
.nav-brand h1 span { color: var(--light-blue); }

.nav-menu  { display: flex; align-items: center; }
.nav-links { display: flex; list-style: none; align-items: center; gap: 0.1rem; }

.nav-links li a {
    color: rgba(255,255,255,0.88);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.45rem 0.8rem;
    border-radius: 6px;
    display: block;
    transition: background var(--transition), color var(--transition);
}
.nav-links li a:hover { background: rgba(255,255,255,0.12); color: var(--white); }
.nav-links .btn-outline { padding: 0.4rem 1rem; margin-left: 0.2rem; font-size: 0.88rem; }
.nav-links .btn-primary { padding: 0.4rem 1rem; margin-left: 0.2rem; font-size: 0.88rem; }

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
    gap: 5px;
    border: none;
    background: none;
}
.hamburger span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--white);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

@media (max-width: 900px) {
    .hamburger { display: flex; }

    .nav-menu {
        position: fixed;
        top: 62px;
        left: 0;
        right: 0;
        background: var(--primary-navy);
        flex-direction: column;
        align-items: stretch;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease, box-shadow 0.3s;
    }
    .nav-menu.active {
        max-height: 100vh;
        overflow-y: auto;
        box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    }

    .nav-links {
        flex-direction: column;
        gap: 0;
        padding: 0.5rem 0 1.25rem;
        width: 100%;
    }
    .nav-links li { width: 100%; }
    .nav-links li a {
        padding: 0.9rem 1.5rem;
        border-radius: 0;
        font-size: 0.97rem;
        border-bottom: 1px solid rgba(255,255,255,0.07);
    }
    .nav-links li a:last-child { border-bottom: none; }
    .nav-links .btn-outline,
    .nav-links .btn-primary {
        margin: 0.5rem 1.25rem 0;
        border-radius: var(--radius);
        text-align: center;
        justify-content: center;
        display: flex;
    }
}

/* ── Flash Messages ──────────────────────────────────────── */
.flash-container {
    position: fixed;
    top: 70px;
    right: 12px;
    z-index: 9999;
    width: calc(100% - 24px);
    max-width: 400px;
}
@media (min-width: 500px) { .flash-container { width: 360px; } }

.alert {
    padding: 0.85rem 1.1rem;
    margin-bottom: 0.65rem;
    border-radius: var(--radius);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    box-shadow: var(--shadow-lg);
    font-size: 0.9rem;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}
@keyframes slideIn {
    from { transform: translateX(110%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

.alert-success              { background: var(--success); color: var(--white); }
.alert-error, .alert-danger { background: var(--danger);  color: var(--white); }
.alert-warning              { background: var(--warning);  color: #4a3000; }
.alert-info                 { background: var(--info);     color: var(--white); }

.close-alert {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.25rem;
    cursor: pointer;
    flex-shrink: 0;
    opacity: 0.85;
}
.close-alert:hover { opacity: 1; }

/* ── Main ────────────────────────────────────────────────── */
main { min-height: calc(100vh - 62px); }

/* ── Forms ───────────────────────────────────────────────── */
.form-container {
    width: 100%;
    max-width: 500px;
    margin: 2rem auto;
    background: var(--white);
    padding: clamp(1.25rem, 5vw, 2.25rem);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.form-container h2 { text-align: center; margin-bottom: 1.75rem; }

.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; margin-bottom: 0.4rem; font-weight: 600; font-size: 0.92rem; }

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 2px solid var(--gray-medium);
    border-radius: 8px;
    transition: border-color var(--transition);
    background: var(--white);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { outline: none; border-color: var(--light-blue); }
.form-group textarea { resize: vertical; min-height: 100px; }

.form-errors { color: var(--danger); font-size: 0.85rem; margin-top: 0.3rem; }

.form-submit {
    width: 100%;
    padding: 0.9rem;
    font-size: 1rem;
    font-weight: 700;
    background: var(--light-blue);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background var(--transition);
}
.form-submit:hover { background: var(--medium-blue); }

.form-footer { text-align: center; margin-top: 1.25rem; }
.form-footer a { color: var(--light-blue); font-weight: 600; }

.checkbox-group { display: flex; align-items: center; gap: 0.5rem; }
.checkbox-group input[type="checkbox"] { width: auto; }

/* ── Utility Badges ──────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}
.badge-success { background: #d4edda; color: #155724; }
.badge-danger  { background: #f8d7da; color: #721c24; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-info    { background: #cce5ff; color: #004085; }

/* ── Tables ──────────────────────────────────────────────── */
.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius);
}
table { width: 100%; border-collapse: collapse; min-width: 480px; }
thead tr {
    background: var(--gray-light);
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
th, td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
}
tbody tr:hover { background: #fafbfc; }

/* ── Countdown Boxes ─────────────────────────────────────── */
.cd-wrap { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.cd-box {
    text-align: center;
    background: var(--gray-light);
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    flex: 1;
    min-width: 54px;
}
.cd-val   { font-size: clamp(1.35rem, 4vw, 2rem); font-weight: 900; color: var(--primary-navy); line-height: 1; }
.cd-label { font-size: 0.65rem; color: #888; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 0.2rem; }

/* ── Footer ──────────────────────────────────────────────── */
.footer {
    background: var(--primary-navy);
    color: var(--white);
    padding: clamp(2rem, 5vw, 3rem) 0 1rem;
    margin-top: 4rem;
}
.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.75rem;
    margin-bottom: 2rem;
}
@media (min-width: 580px) { .footer-content { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .footer-content { grid-template-columns: 2fr 1fr 1fr 1fr; } }

.footer-section h3,
.footer-section h4 { color: var(--white); margin-bottom: 0.85rem; }
.footer-section h3 span { color: var(--light-blue); }
.footer-section p  { color: var(--pale-blue); font-size: 0.9rem; line-height: 1.65; }
.footer-section ul { list-style: none; }
.footer-section ul li { margin-bottom: 0.45rem; }
.footer-section ul li a { color: var(--pale-blue); font-size: 0.9rem; transition: color var(--transition); }
.footer-section ul li a:hover { color: var(--white); }
.footer-section ul li i { margin-right: 0.5rem; color: var(--light-blue); width: 16px; }

.social-links { display: flex; gap: 0.7rem; margin-top: 1rem; flex-wrap: wrap; }
.social-links a {
    width: 38px;
    height: 38px;
    background: var(--medium-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--white);
    transition: background var(--transition), transform var(--transition);
}
.social-links a:hover { background: var(--light-blue); transform: translateY(-2px); }

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.12);
    color: var(--pale-blue);
    font-size: 0.88rem;
}

/* ── Page header helper ──────────────────────────────────── */
.page-header { padding: clamp(1.5rem, 4vw, 2.5rem) 0; }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE OVERRIDES
   Collapse inline grid/flex layouts on mobile
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {

    /* Force single-column on common inline two-column grids */
    [style*="grid-template-columns: 1fr 1fr"],
    [style*="grid-template-columns: 1fr 340px"],
    [style*="grid-template-columns: 1fr 380px"],
    [style*="grid-template-columns: 1fr 300px"],
    [style*="grid-template-columns: 1fr 320px"],
    [style*="grid-template-columns: 1fr auto"],
    [style*="grid-template-columns: 260px 1fr"],
    [style*="grid-template-columns: repeat(auto-fit, minmax(200px"] {
        grid-template-columns: 1fr !important;
    }

    /* Unstick sidebars */
    [style*="position: sticky"] { position: relative !important; top: auto !important; }

    /* Countdown boxes — tighter on mobile */
    #countdown { gap: 0.4rem !important; }
    #countdown > div { min-width: 52px !important; padding: 0.55rem 0.5rem !important; }
    #countdown > div > div:first-child { font-size: 1.4rem !important; }

    /* Tables stay scrollable */
    table { min-width: 500px; }

    /* Flash messages full width on small screens */
    .flash-container { right: 10px; left: 10px; max-width: 100%; width: auto; }

    /* Page headers */
    .page-header { padding: 1.5rem 0; }
}

@media (max-width: 480px) {
    .container { padding: 0 12px; }

    /* Wrap flex rows so they don't overflow */
    [style*="display: flex"][style*="gap"] { flex-wrap: wrap; }

    /* Tighten padded containers */
    [style*="padding: 2.5rem"] { padding: 1.25rem !important; }
    [style*="padding: 2rem"]   { padding: 1.1rem !important; }
    [style*="padding: 1.5rem"] { padding: 1rem !important; }

    /* Forms flush to screen edges */
    .form-container { margin: 0.75rem; }

    /* Prevent long emails/phones from breaking layout */
    .footer-section ul li { word-break: break-word; }

    /* Stat grids stay 2-column on xs */
    [style*="repeat(auto-fit, minmax(150"] { grid-template-columns: 1fr 1fr !important; }
}