/* .homepage-container: Full-width option for homepage sections (optional) */
.homepage-container {
    width: 100vw;
    max-width: 100vw;
}

/* ========================================================================
   GLOBALS.CSS — DESIGN SYSTEM ORDERED BY IMPORTANCE
   ======================================================================== */

/* ------------------------------------------------------------------------
   1. ROOT DESIGN TOKENS (VARIABLES)
   --------------------------------------------------------------------- */
:root {
    /* --- Backgrounds (ordered by importance) --- */
    --bg: #f7fafc;           /* Main background */
    --white: #ffffff;        /* Card/element background */
    --primary: #ff8c42;      /* Primary accent background */
    --primary-dark: #e67e2e; /* Primary accent hover/active */
    --dark: #111827;         /* Main text, dark backgrounds */
    --mid: #4a5568;          /* Secondary text, mid backgrounds */
    --light: #a0aec0;        /* Light text, subtle backgrounds */
    --border: #e2e8f0;       /* Border color */
    --error: #dc2626;        /* Error background/text */
    /* --- Other tokens --- */
    --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Inter', sans-serif;
}

/* ------------------------------------------------------------------------
   2. CSS RESET & BASE ELEMENTS
   --------------------------------------------------------------------- */
* { box-sizing: border-box; }
body {
    font-family: var(--font);
    color: var(--dark);
    background: var(--bg);
    margin: 0;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

/* LAYOUT CONTROL: .container is the ONLY element controlling page width */
.container {
    width: 100%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 40px 20px;
    box-sizing: border-box;
}

/* Responsive breakpoints for .container padding */
@media (max-width: 1200px) {
    .container {
        padding: 36px 16px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 28px 12px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px 8px;
    }
}

/* RESPONSIVE HEADING SIZES */
@media (max-width: 768px) {
    h1 { font-size: 32px; }
    h2 { font-size: 28px; }
    h3 { font-size: 24px; }
    h4 { font-size: 20px; }
    h5 { font-size: 16px; }
    h6 { font-size: 14px; }
}

@media (max-width: 480px) {
    h1 { font-size: 28px; }
    h2 { font-size: 24px; }
    h3 { font-size: 20px; }
    h4 { font-size: 18px; }
    h5 { font-size: 14px; }
    h6 { font-size: 12px; }
}

/* ------------------------------------------------------------------------
   3. TYPOGRAPHY (UNIVERSAL FONT STYLES)
   --------------------------------------------------------------------- */
/* Headings */
h1 { font-size: 42px; font-weight: 900; line-height: 1.1; margin: 0 0 24px 0; color: var(--dark); }
h2 { font-size: 36px; font-weight: 800; line-height: 1.1; margin: 0 0 20px 0; color: var(--dark); }
h3 { font-size: 28px; font-weight: 700; line-height: 1.2; margin: 0 0 16px 0; color: var(--dark); }
h4 { font-size: 24px; font-weight: 700; line-height: 1.2; margin: 0 0 14px 0; color: var(--dark); }
h5 { font-size: 18px; font-weight: 700; line-height: 1.3; margin: 0 0 12px 0; color: var(--dark); }
h6 { font-size: 16px; font-weight: 600; line-height: 1.3; margin: 0 0 10px 0; color: var(--dark); }

/* Body text */
p { font-size: 16px; font-weight: 400; line-height: 1.6; margin: 0 0 16px 0; color: var(--dark); }
.text-lg { font-size: 18px; font-weight: 400; line-height: 1.6; }
.text-base { font-size: 16px; font-weight: 400; line-height: 1.6; }
.text-sm { font-size: 14px; font-weight: 400; line-height: 1.5; }
.text-xs { font-size: 12px; font-weight: 400; line-height: 1.5; }
.text-2xs { font-size: 11px; font-weight: 400; line-height: 1.4; }

/* Font weights */
.font-900 { font-weight: 900; }
.font-800 { font-weight: 800; }
.font-700 { font-weight: 700; }
.font-600 { font-weight: 600; }
.font-500 { font-weight: 500; }
.font-400 { font-weight: 400; }

/* Text utilities */
.uppercase { text-transform: uppercase; }
.text-center { text-align: center; }
.text-dark { color: var(--dark); }
.text-mid { color: var(--mid); }
.text-light { color: var(--light); }
.text-primary { color: var(--primary); }

/* Common typography combinations */
.eyebrow { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--primary); display: block; margin-bottom: 16px; }
.lead { font-size: 18px; font-weight: 500; line-height: 1.6; }
.subtitle { font-size: 0.7em; color: var(--primary); display: block; margin-top: 8px; }
.stat-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--light); }
.label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

/* Responsive text sizing */
@media (max-width: 768px) {
    p { font-size: 15px; }
    .text-lg { font-size: 16px; }
    .text-base { font-size: 15px; }
    .text-sm { font-size: 13px; }
    .text-xs { font-size: 11px; }
    .text-2xs { font-size: 10px; }
    .lead { font-size: 16px; }
}

@media (max-width: 480px) {
    p { font-size: 14px; }
    .text-lg { font-size: 15px; }
    .text-base { font-size: 14px; }
    .text-sm { font-size: 12px; }
    .text-xs { font-size: 10px; }
    .text-2xs { font-size: 9px; }
    .lead { font-size: 14px; }
}

/* Breadcrumb */
.breadcrumb {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--light);
    margin-bottom: 32px;
}
.breadcrumb a { text-decoration: none; color: inherit; transition: color var(--transition); }
.breadcrumb a:hover { color: var(--dark); }
.breadcrumb .sep { margin: 0 8px; opacity: 0.4; }

/* ------------------------------------------------------------------------
   4. LAYOUT HELPERS
   --------------------------------------------------------------------- */
.flex-group {
    display: flex;
    gap: 8px;
    align-items: center;
    width: 100%;
}
.flex-form {
    flex: 1;
    display: flex;
}

/* ------------------------------------------------------------------------
   5. BUTTONS (Standardized)
   --------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: var(--font);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: background var(--transition), color var(--transition), transform var(--transition);
}
.btn--primary {
    background: var(--primary);
    color: var(--white);
}
.btn--primary:hover {
    background: var(--primary-dark);
    color: var(--white);
    transform: translateY(-1px);
}
.btn--primary:active {
    transform: translateY(0);
}
.btn--outline {
    background: var(--white);
    color: var(--dark);
    border: 1.5px solid var(--dark);
}
.btn--outline:hover {
    background: var(--bg);
    color: var(--primary);
    transform: translateY(-1px);
}
.btn--text {
    background: transparent;
    border: none;
    color: var(--light);
    margin-right: 1rem;
    font-size: 12px;
    font-weight: 600;
}
.btn--remove {
    color: var(--error);
}
.btn--remove:hover {
    color: var(--primary);
}

/* ------------------------------------------------------------------------
   6. INPUTS & FORMS
   --------------------------------------------------------------------- */
.input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    background: var(--white);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    color: var(--dark);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.input:focus {
    outline: none;
    border-color: var(--dark);
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.1);
}
.form-group {
    margin-bottom: 20px;
}
.form-label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 8px;
    color: var(--mid);
}
.form-error {
    color: var(--error);
    font-size: 12px;
    margin-top: 4px;
}

/* ------------------------------------------------------------------------
   7. CARDS & PANELS
   --------------------------------------------------------------------- */
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(17,24,39,0.04);
    overflow: hidden;
}
.card-header {
    padding: 20px 24px 12px 24px;
    font-weight: 700;
    font-size: 18px;
    border-bottom: 1px solid var(--border);
}
.card-body {
    padding: 24px;
}
.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    background: var(--bg);
}

/* ------------------------------------------------------------------------
   8. ALERTS & MESSAGES
   --------------------------------------------------------------------- */
.alert {
    padding: 16px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    border: 1.5px solid transparent;
}
.alert--success {
    background: #f0fff4;
    color: #38a169;
    border-color: #38a169;
}
.alert--error {
    background: #fff5f5;
    color: var(--error);
    border-color: var(--error);
}
.alert--info {
    background: #ebf8ff;
    color: #3182ce;
    border-color: #3182ce;
}
.alert--warning {
    background: #fffbea;
    color: #b7791f;
    border-color: #b7791f;
}

/* ------------------------------------------------------------------------
   9. TABLES
   --------------------------------------------------------------------- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
    background: var(--white);
}
th, td {
    padding: 12px 16px;
    border: 1px solid var(--border);
    text-align: left;
}
th {
    background: var(--bg);
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
tr:nth-child(even) td {
    background: #fafbfc;
}

/* ------------------------------------------------------------------------
   10. BREADCRUMBS & NAVIGATION
   --------------------------------------------------------------------- */

.nav-link {
    color: var(--mid);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition);
}
.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

/* ------------------------------------------------------------------------
   11. UTILITY CLASSES
   --------------------------------------------------------------------- */
.mt-2 { margin-top: 8px !important; }
.mt-4 { margin-top: 16px !important; }
.mb-2 { margin-bottom: 8px !important; }
.mb-4 { margin-bottom: 16px !important; }
.pt-2 { padding-top: 8px !important; }
.pt-4 { padding-top: 16px !important; }
.pb-2 { padding-bottom: 8px !important; }
.pb-4 { padding-bottom: 16px !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }
.gap-2 { gap: 8px !important; }
.gap-4 { gap: 16px !important; }
.w-100 { width: 100% !important; }
.h-100 { height: 100% !important; }
.hide { display: none !important; }
.show { display: block !important; }

/* ------------------------------------------------------------------------
   12. MODALS & OVERLAYS
   --------------------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.modal-card {
    background: var(--white);
    width: 100%;
    max-width: 550px;
    padding: 48px;
    position: relative;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(17,24,39,0.10);
}

/* ------------------------------------------------------------------------
   13. BADGES, TAGS, PILLS
   --------------------------------------------------------------------- */
.badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    background: var(--bg);
    color: var(--mid);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.badge--primary { background: var(--primary); color: var(--white); }
.badge--success { background: #38a169; color: var(--white); }
.badge--error { background: var(--error); color: var(--white); }
.badge--warning { background: #b7791f; color: var(--white); }

/* ------------------------------------------------------------------------
   14. RESPONSIVE HELPERS & UTILITY BREAKPOINTS
   --------------------------------------------------------------------- */
/* Hide/show utilities at specific breakpoints */
@media (max-width: 1200px) {
    .hide-lg { display: none !important; }
    .show-lg { display: block !important; }
}

@media (max-width: 900px) {
    .hide-md { display: none !important; }
    .show-md { display: block !important; }
    .card-body, .card-header, .card-footer {
        padding-left: 8px;
        padding-right: 8px;
    }
    .flex-group {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    .btn {
        width: 100%;
        padding: 14px 0;
        font-size: 14px;
    }
    .input {
        font-size: 16px;
        padding: 14px 12px;
    }
    .breadcrumb {
        font-size: 10px;
        margin-bottom: 18px;
    }
}
@media (max-width: 480px) {
    .hide-sm { display: none !important; }
    .show-sm { display: block !important; }
    .card-body, .card-header, .card-footer {
        padding-left: 4px;
        padding-right: 4px;
    }
    .btn {
        font-size: 13px;
        padding: 12px 0;
    }
    .input {
        font-size: 15px;
        padding: 12px 8px;
    }
    .breadcrumb {
        font-size: 9px;
        margin-bottom: 10px;
    }
}
