/* ═══════════════════════════════════════════════════════════════════════════
   mohali.city — Design System & Styles
   Premium dark theme with glassmorphism, gradients, and micro-animations
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── CSS Variables / Design Tokens ─────────────────────────────────────── */
:root {
    /* Colors — Light Theme */
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f7;
    --bg-card: rgba(0, 0, 0, 0.02);
    --bg-card-hover: rgba(0, 0, 0, 0.05);
    --bg-glass: rgba(0, 0, 0, 0.03);
    --bg-glass-border: rgba(0, 0, 0, 0.08);

    --text-primary: #1a1a2e;
    --text-secondary: #555568;
    --text-muted: #8888a0;

    --accent-1: #1a6dff;
    --accent-2: #00b894;
    --accent-3: #e63946;
    --accent-gradient: linear-gradient(135deg, #1a6dff, #00b894);
    --accent-gradient-warm: linear-gradient(135deg, #e63946, #ff6b6b);

    --logo-blue: #1a6dff;
    --logo-red: #e63946;

    --orb-1: rgba(26, 109, 255, 0.08);
    --orb-2: rgba(0, 184, 148, 0.06);
    --orb-3: rgba(230, 57, 70, 0.05);

    --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow-card-hover: 0 8px 30px rgba(0, 0, 0, 0.10);

    /* Typography */
    --font-display: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --container-max: 1200px;
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 50px;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ─── Reset & Base ──────────────────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ─── Container ─────────────────────────────────────────────────────────── */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* ─── Background Orbs ───────────────────────────────────────────────────── */
.bg-orbs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    animation: orbFloat 20s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: var(--orb-1);
    top: -10%;
    right: -5%;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--orb-2);
    bottom: 10%;
    left: -8%;
    animation-delay: -7s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: var(--orb-3);
    top: 50%;
    left: 50%;
    animation-delay: -14s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ─── Header ────────────────────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--bg-glass-border);
    padding: var(--space-md) 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    transition: transform var(--transition-fast);
}

.logo:hover {
    transform: scale(1.02);
}

.logo-icon {
    font-size: 28px;
    line-height: 1;
}

.logo-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    display: block;
    color: var(--logo-blue);
}

.logo-dot {
    color: var(--logo-red);
    -webkit-text-fill-color: var(--logo-red);
}

.logo-tagline {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
    display: block;
    margin-top: -2px;
}

.header-meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.live-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--accent-2);
    background: rgba(0, 212, 170, 0.1);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(0, 212, 170, 0.2);
}

.live-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-2);
    border-radius: 50%;
    animation: livePulse 1.5s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}

.last-updated {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ─── Hero Section ──────────────────────────────────────────────────────── */
.hero-section {
    position: relative;
    z-index: 1;
    padding: var(--space-3xl) 0 var(--space-xl);
}

.hero-content {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.hero-title {
    font-family: var(--font-display);
    margin-bottom: var(--space-md);
}

.hero-greeting {
    display: block;
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: var(--space-xs);
}

.hero-city {
    display: block;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    animation: heroShine 3s ease-in-out infinite;
}

@keyframes heroShine {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    font-weight: 400;
    max-width: 500px;
    margin: 0 auto;
}

/* ─── News Ticker ───────────────────────────────────────────────────────── */
.ticker-wrap {
    width: 100%;
    overflow: hidden;
    background: var(--bg-glass);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-full);
    padding: var(--space-sm) 0;
    position: relative;
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.ticker-track {
    display: flex;
    gap: var(--space-2xl);
    animation: tickerScroll 60s linear infinite;
    white-space: nowrap;
    will-change: transform;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.85rem;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.ticker-source {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-1);
    background: rgba(108, 99, 255, 0.1);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

@keyframes tickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.ticker-wrap:hover .ticker-track {
    animation-play-state: paused;
}

/* ─── Main Content ──────────────────────────────────────────────────────── */
.main-content {
    position: relative;
    z-index: 1;
    padding: var(--space-xl) 0 var(--space-3xl);
}

/* ─── Section Headers ───────────────────────────────────────────────────── */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--bg-glass-border);
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.section-icon {
    font-size: 1.2rem;
}

.article-count {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    background: var(--bg-glass);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    border: 1px solid var(--bg-glass-border);
}

/* ─── Featured Cards Grid ───────────────────────────────────────────────── */
.section-featured {
    margin-bottom: var(--space-3xl);
}

.featured-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: var(--space-lg);
}

.card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--bg-glass-border);
    transition: all var(--transition-smooth);
    animation: cardFadeIn 0.6s ease-out backwards;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(108, 99, 255, 0.2);
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-4px);
}

.card-hero {
    grid-column: 1 / -1;
}

.card-hero .card-link {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    min-height: 280px;
}

.card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
}

.card-image {
    position: relative;
    overflow: hidden;
    min-height: 180px;
    background: var(--bg-secondary);
}

.card-hero .card-image {
    min-height: 100%;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-smooth);
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.08), rgba(0, 212, 170, 0.08));
}

.placeholder-pattern {
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-emoji {
    font-size: 3rem;
    opacity: 0.5;
}

.card-body {
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
    flex-wrap: wrap;
}

.card-source {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-2);
    background: rgba(0, 212, 170, 0.1);
    padding: 2px 10px;
    border-radius: var(--radius-full);
}

.card-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: var(--space-sm);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-hero .card-title {
    font-size: 1.5rem;
}

.card-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ─── News List ─────────────────────────────────────────────────────────── */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.news-item {
    border-radius: var(--radius-md);
    transition: all var(--transition-smooth);
    animation: newsSlideIn 0.5s ease-out backwards;
    animation-delay: var(--delay);
}

@keyframes newsSlideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.news-item:hover {
    background: var(--bg-card-hover);
}

.news-link {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-md) var(--space-lg);
    color: inherit;
}

.news-body {
    flex: 1;
    min-width: 0;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.news-source {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-1);
}

.news-dot {
    color: var(--text-muted);
    font-size: 0.7rem;
}

.news-time {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.news-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--transition-fast);
}

.news-item:hover .news-title {
    color: var(--accent-2);
}

.news-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-thumb {
    width: 80px;
    height: 60px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-smooth);
}

.news-item:hover .news-thumb img {
    transform: scale(1.1);
}

.news-arrow {
    flex-shrink: 0;
    color: var(--text-muted);
    opacity: 0;
    transform: translateX(-8px);
    transition: all var(--transition-smooth);
}

.news-item:hover .news-arrow {
    opacity: 1;
    transform: translateX(0);
    color: var(--accent-2);
}

/* ─── Empty State ───────────────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: var(--space-3xl) var(--space-lg);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: var(--space-lg);
    opacity: 0.6;
}

.empty-state h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: var(--space-xl);
}

.btn-refresh {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-xl);
    background: var(--accent-gradient);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: var(--radius-full);
    transition: transform var(--transition-spring), box-shadow var(--transition-fast);
}

.btn-refresh:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(108, 99, 255, 0.4);
}

/* ─── Footer ────────────────────────────────────────────────────────────── */
.site-footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--bg-glass-border);
    padding: var(--space-2xl) 0;
    background: rgba(245, 245, 247, 0.8);
    backdrop-filter: blur(10px);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-xl);
    flex-wrap: wrap;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 800;
    display: block;
    margin-bottom: var(--space-sm);
    color: var(--logo-blue);
}

.footer-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    max-width: 300px;
}

.footer-info {
    text-align: right;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.footer-info p {
    margin-bottom: var(--space-xs);
}

.footer-copy {
    color: var(--text-muted);
    opacity: 0.7;
}

/* ─── Scrollbar ─────────────────────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.12);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* ─── Selection ─────────────────────────────────────────────────────────── */
::selection {
    background: rgba(26, 109, 255, 0.2);
    color: var(--text-primary);
}

/* ─── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .hero-section {
        padding: var(--space-2xl) 0 var(--space-lg);
    }

    .featured-grid {
        grid-template-columns: 1fr;
    }

    .card-hero .card-link {
        grid-template-columns: 1fr;
    }

    .card-hero .card-image {
        min-height: 200px;
    }

    .header-inner {
        flex-wrap: wrap;
    }

    .last-updated {
        display: none;
    }

    .news-link {
        padding: var(--space-md);
    }

    .news-arrow {
        display: none;
    }

    .footer-inner {
        flex-direction: column;
    }

    .footer-info {
        text-align: left;
    }

    .card-hero .card-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-md);
    }

    .hero-city {
        font-size: 2.2rem;
    }

    .card-body {
        padding: var(--space-md);
    }

    .news-thumb {
        width: 60px;
        height: 45px;
    }

    .ticker-wrap {
        border-radius: var(--radius-md);
    }
}
