/* ==========================================================================
   NCR Air Quality Portal — Premium Bento Grid Dashboard
   ========================================================================== */

/* Google Fonts - Outfit (Headings/Data) & Inter (Body) */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Inter:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
    /* Color Palette - Monochromatic Hardware Feel */
    --bg-page: #0a0a0a; 
    
    --card-bg: #121212;
    --card-bg-hover: #171717;
    --card-border: rgba(255, 255, 255, 0.08);
    --card-border-hover: rgba(255, 255, 255, 0.15);
    --card-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 30px -10px rgba(0, 0, 0, 0.8);
    --card-shadow-hover: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 15px 40px -10px rgba(0, 0, 0, 1);
    
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    
    --accent: #e4e4e7;
    
    /* GRAP Stage Colors (Targeted Neon) */
    --stage1: #10b981; 
    --stage2: #fbbf24; 
    --stage3: #f97316; 
    --stage4: #ef4444; 
    
    /* Layout Constants */
    --transition-smooth: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    --border-radius-xl: 32px;
    --border-radius-lg: 24px;
    --border-radius-md: 16px;
    --border-radius-sm: 8px;
}

/* ========== BASE ELEMENT STYLING ========== */
* {
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-secondary);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-page);
}
::-webkit-scrollbar-thumb {
    background: #27272a;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #3f3f46;
}

/* ========== SLEEK FLOATING NAV PILL ========== */
.site-nav {
    width: max-content;
    background: rgba(18, 18, 18, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 100px;
    padding: 6px 8px;
    position: sticky;
    top: 24px;
    z-index: 100;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin-top: 24px;
    margin-bottom: 40px;
}

.nav-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.nav-logo {
    display: none; /* Hide logo in pill nav for cleaner look */
}

.nav-links {
    display: flex;
    gap: 4px;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 100px;
    transition: var(--transition-smooth);
}

.nav-links a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-links a.active {
    color: #000;
    background: #fff;
    font-weight: 600;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-primary);
}

/* ========== MAIN CONTAINER & BENTO GRID ========== */
.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px 60px 24px;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(100px, auto);
    gap: 24px;
    width: 100%;
}

/* Grid Spans */
.col-span-12 { grid-column: span 12; }
.col-span-8 { grid-column: span 8; }
.col-span-6 { grid-column: span 6; }
.col-span-4 { grid-column: span 4; }
.col-span-3 { grid-column: span 3; }
.row-span-2 { grid-row: span 2; }
.row-span-3 { grid-row: span 3; }

/* ========== BENTO CARD COMPONENT ========== */
.bento-card {
    background: var(--card-bg);
    border-radius: var(--border-radius-xl);
    padding: 40px;
    border: 1px solid var(--card-border);
    box-shadow: var(--card-shadow);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    
    /* Animation entry */
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

@keyframes slideUpFade {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Staggered animation delays */
.bento-card:nth-child(1) { animation-delay: 0.1s; }
.bento-card:nth-child(2) { animation-delay: 0.2s; }
.bento-card:nth-child(3) { animation-delay: 0.3s; }
.bento-card:nth-child(4) { animation-delay: 0.4s; }
.bento-card:nth-child(5) { animation-delay: 0.5s; }
.bento-card:nth-child(6) { animation-delay: 0.6s; }
.bento-card:nth-child(7) { animation-delay: 0.7s; }

/* Subtle inner glow trick */
.bento-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--border-radius-xl);
    padding: 1px;
    background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 0%), rgba(255,255,255,0.1), transparent 40%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.bento-card.interactive:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
    background: var(--card-bg-hover);
    border-color: var(--card-border-hover);
}

.bento-card h2, .bento-card h3 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    margin-top: 0;
    font-weight: 700;
}

.bento-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0;
}

/* Hero Box Specifics */
.bento-hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(180deg, #18181b 0%, #121212 100%);
}

.bento-hero h1 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(3rem, 5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -2px;
    margin: 0 0 20px 0;
    color: #fff;
}

.bento-hero p {
    font-size: 1.15rem;
    max-width: 600px;
}

/* ========== LIVE TRACKER WIDGETS ========== */
.tracker-card {
    padding: 30px;
}

.tracker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.city-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
    letter-spacing: -1px;
}

.aqi-display {
    text-align: right;
}

.aqi-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    font-weight: 700;
    display: block;
    margin-bottom: 4px;
}

.aqi-value {
    font-family: 'Outfit', sans-serif;
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1;
    color: var(--text-primary);
    letter-spacing: -2px;
}

.tracker-stage-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 24px;
}

.restrictions-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.restrictions-list li {
    font-size: 0.9rem;
    padding: 12px 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--border-radius-md);
    color: var(--text-secondary);
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.restrictions-list li::before {
    content: "•";
    color: var(--text-muted);
    font-weight: bold;
}

/* ========== ARTICLE CARDS ========== */
.article-bento {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none;
}

.article-bento .icon {
    font-size: 2.5rem;
    margin-bottom: 24px;
}

.article-bento h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.article-bento p {
    font-size: 0.95rem;
    margin-bottom: 24px;
    flex-grow: 1;
}

.read-more-arrow {
    align-self: flex-end;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: var(--transition-smooth);
}

.article-bento:hover .read-more-arrow {
    background: #fff;
    color: #000;
    transform: translateX(4px);
}

/* ========== CONTENT SECTIONS & LEGACY SUPPORT ========== */
.content-section, 
.content-article {
    background: var(--card-bg);
    border-radius: var(--border-radius-xl);
    padding: 50px;
    border: 1px solid var(--card-border);
    box-shadow: var(--card-shadow);
    margin-bottom: 40px;
}

.content-section h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 24px;
    font-weight: 800;
    letter-spacing: -1px;
}

.content-section p, .content-section li {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.content-section ul { padding-left: 20px; }

/* ========== FAQ ACCORDION ========== */
.faq-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 30px;
}

.faq-item {
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-lg);
    background: rgba(13, 18, 30, 0.3);
    overflow: hidden;
    transition: var(--transition-smooth);
}

.faq-item:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
}

.faq-item[open] {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.faq-item summary {
    padding: 24px 28px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-primary);
    font-size: 1.2rem;
    user-select: none;
    outline: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-content {
    padding: 0 28px 28px 28px;
    border-top: 1px solid var(--card-border);
    background: transparent;
}

/* ========== AD CONTAINER ========== */
.ad-container {
    text-align: center;
    margin: 40px 0;
    width: 100%;
}

/* ========== LEGACY SUB-PAGE STYLES ========== */
/* Lead/intro quote */
.editorial-lead {
    font-size: 1.15rem;
    line-height: 1.75;
    color: var(--text-primary);
    border-left: 4px solid #fff;
    padding-left: 24px;
    margin-bottom: 35px;
    font-style: italic;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), transparent);
    padding-top: 20px;
    padding-bottom: 20px;
    padding-right: 20px;
    border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0;
}

/* Article meta */
.editorial-meta {
    display: flex;
    gap: 22px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 22px;
    flex-wrap: wrap;
}

.editorial-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ========== PRESET TIMELINE / Flowchart elements ========== */
.timeline {
    margin: 30px 0;
    padding-left: 10px;
    border-left: 2px solid var(--card-border);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ========== ARTICLE CARDS GRID ========== */
.article-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 30px;
}

.article-card {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    padding: 35px 30px;
    border: 1px solid var(--card-border);
    transition: var(--transition-smooth);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-shadow-hover);
    background: var(--card-bg-hover);
}

.article-card .card-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    display: inline-block;
}

.article-card h3 {
    font-family: 'Outfit', sans-serif;
    margin: 0 0 12px 0;
    font-size: 1.3rem;
    color: var(--text-primary);
}

.article-card p {
    margin: 0;
    font-size: 0.925rem;
    color: var(--text-secondary);
    line-height: 1.65;
    flex-grow: 1;
}

.article-card .read-more {
    margin-top: 24px;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-primary);
}

/* ========== BADGES ========== */
.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: 800;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.badge-stage1 { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-stage2 { background: rgba(251, 191, 36, 0.15); color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.3); }
.badge-stage3 { background: rgba(249, 115, 22, 0.15); color: #ffedd5; border: 1px solid rgba(249, 115, 22, 0.3); }
.badge-stage4 { background: rgba(239, 68, 68, 0.15); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.3); }

/* ========== INFO GRIDS & CARDS (About page) ========== */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin: 35px 0;
}

.info-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-lg);
    padding: 28px;
}

.info-card h3 {
    margin-top: 0 !important;
    margin-bottom: 12px !important;
    color: var(--text-primary);
}

.info-card p {
    margin-bottom: 0 !important;
    color: var(--text-secondary) !important;
}

/* ========== TABLES ========== */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--card-border);
    margin: 30px 0;
}

.reference-table {
    width: 100%;
    border-collapse: collapse;
}

.reference-table th, 
.reference-table td {
    padding: 20px 24px;
    border-bottom: 1px solid var(--card-border);
    text-align: left;
}

.reference-table th {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

/* ========== ADVISORY GRID ========== */
.advisory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-top: 30px;
}

.advisory-card {
    background: rgba(255, 255, 255, 0.02);
    padding: 28px;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--card-border);
}

.advisory-card .icon {
    font-size: 2rem;
    margin-bottom: 16px;
}

.advisory-card h3 {
    margin: 0 0 10px 0;
    color: var(--text-primary);
}

/* ========== citizen checklist ========== */
.checklist-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 25px;
}

.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 22px;
    border-radius: var(--border-radius-lg);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
}

.checklist-item input[type="checkbox"] {
    margin-top: 3px;
    width: 20px;
    height: 20px;
}

/* ========== CONTACT FORM ========== */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 30px;
}

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

.form-group label {
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    padding: 16px 20px;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--card-border);
    background: rgba(0, 0, 0, 0.5);
    color: var(--text-primary);
    font-family: inherit;
}

.btn-submit {
    padding: 16px 36px;
    background: #fff;
    color: #000;
    border: none;
    border-radius: var(--border-radius-lg);
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    align-self: flex-start;
}

/* ========== FOOTER ========== */
.site-footer {
    width: 100%;
    border-top: 1px solid var(--card-border);
    padding: 60px 24px 40px 24px;
    margin-top: auto;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}
.footer-col h4 {
    font-family: 'Outfit', sans-serif;
    color: #fff;
    margin: 0 0 20px 0;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--text-secondary); text-decoration: none; transition: var(--transition-smooth); }
.footer-col a:hover { color: #fff; }
.footer-bottom {
    border-top: 1px solid var(--card-border);
    padding-top: 24px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ========== RESPONSIVE BENTO GRID ========== */
@media (max-width: 1024px) {
    .col-span-4 { grid-column: span 6; }
}

@media (max-width: 768px) {
    .site-nav {
        width: calc(100% - 48px);
        border-radius: var(--border-radius-md);
        top: 12px;
    }
    .nav-links {
        display: none;
        position: absolute;
        top: 60px; left: 0; right: 0;
        background: #121212;
        padding: 20px;
        flex-direction: column;
        border-radius: var(--border-radius-md);
        border: 1px solid var(--card-border);
    }
    .nav-links.open { display: flex; }
    .nav-toggle { display: block; }

    .bento-grid { display: flex; flex-direction: column; }
    .col-span-12, .col-span-8, .col-span-6, .col-span-4, .col-span-3 { grid-column: auto; }
    .row-span-2, .row-span-3 { grid-row: auto; }
    
    .bento-hero h1 { font-size: 2.5rem; }
    .bento-card { padding: 30px; }
}
