@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* Primary Color Palette */
    --bg-main: #0a0a0b;
    --bg-elevated: #111114;
    --bg-panel: #16161a;
    --bg-soft: #1f1f23;
    --surface: #1e1e24;
    --surface-2: #24242d;
    
    /* Lines & Borders */
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.15);
    
    /* Text Palette */
    --text-main: #ffffff;
    --text-muted: #9ba1a6;
    --text-dark: #000000;
    
    /* Brand Accents */
    --accent: #3b82f6;          /* Royal Blue */
    --accent-glow: rgba(59, 130, 246, 0.4);
    --accent-2: #22c55e;        /* Emerald Green */
    --accent-3: #f59e0b;        /* Amber Gold */
    --accent-4: #8b5cf6;        /* Royal Purple */
    
    /* Depth & Shadows */
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 12px 24px rgba(0, 0, 0, 0.25);
    --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 20px var(--accent-glow);
    
    /* Layout Constants */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 32px;
    --container: 1200px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background: var(--bg-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    padding-top: 108px; /* Desktop header height */
}

@media (max-width: 992px) {
    body {
        padding-top: 116px; /* Mobile header height (Two rows) */
    }
}

body.no-scroll {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

.container {
    width: min(calc(100% - 32px), var(--container));
    margin: 0 auto;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #0b100d;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
    border-radius: 999px;
}

.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    background: var(--bg-main);
    border-bottom: 1px solid var(--line);
}

.main-header.scrolled {
    box-shadow: var(--shadow-md);
}

/* Top row: logo + auth */
.header-top {
    border-bottom: 1px solid var(--line);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    width: min(calc(100% - 32px), var(--container));
    margin: 0 auto;
    padding: 10px 0;
}

.logo img {
    height: 42px;
    width: auto;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.15));
}

/* Header auth — two buttons */
.header-auth {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-auth .btn-login {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 0 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line-strong);
    background: var(--bg-soft);
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.88rem;
    transition: var(--transition);
}

.header-auth .btn-login:hover {
    background: var(--bg-elevated);
    border-color: var(--accent);
    color: var(--accent);
}

.header-auth .btn-register {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 0 18px;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.88rem;
    transition: var(--transition);
}

.header-auth .btn-register:hover {
    background: #1557b0;
    transform: translateY(-1px);
}

/* Desktop nav row */
.desktop-nav {
    display: block;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--line);
}

.desktop-nav ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    width: min(calc(100% - 32px), var(--container));
    margin: 0 auto;
    padding: 6px 0;
}

.desktop-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 500;
    transition: var(--transition);
}

.desktop-nav a:hover,
.desktop-nav a:focus-visible {
    color: var(--accent);
    background: var(--bg-soft);
}

/* Mobile nav strip */
.mobile-nav-strip {
    display: none;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--line);
}

.mobile-nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: min(calc(100% - 24px), var(--container));
    margin: 0 auto;
    padding: 8px 0;
}

.menu-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Mobile menu toggle (hamburger) */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg-soft);
    cursor: pointer;
    gap: 4px;
}

.mobile-menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text-main);
    transition: var(--transition);
}

/* Nav list (mobile dropdown) */
.nav-list {
    display: none;
    position: fixed;
    top: 116px; /* Exactly below the mobile nav strip */
    left: 16px;
    right: 16px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--bg-panel);
    box-shadow: var(--shadow-lg);
    z-index: 10000; /* Higher than fixed header */
}

.nav-list.active {
    display: block;
}

.nav-list ul {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

.nav-list a {
    display: flex;
    justify-content: center;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: var(--bg-soft);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-list a:hover {
    color: var(--accent);
}


footer {
    margin-top: 60px;
    padding: 48px 0 24px;
    border-top: 1px solid var(--line);
    background: var(--bg-elevated);
}

.footer-top {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 32px;
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--bg-panel);
    box-shadow: var(--shadow-md);
}

.footer-nav h4,
.footer-contact h4 {
    margin-bottom: 16px;
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}

.footer-nav ul,
.footer-contact ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-nav a,
.footer-contact p,
.footer-contact li,
.footer-brand p {
    color: var(--text-muted);
}

.footer-nav a:hover,
.footer-links a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-list li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--bg-soft);
    color: var(--accent);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
    padding: 0 8px;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.footer-links {
    display: flex;
    gap: 18px;
}

.footer-links a {
    color: var(--accent);
    font-weight: 700;
}

.ad-container {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--bg-panel);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    width: 100%;
    margin: 1rem 0;
}

.ad-container:hover {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}

.ad-container img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    min-height: 80px;
    max-height: 200px;
}

@media (max-width: 768px) {
    .ad-container img {
        min-height: 60px;
        object-fit: contain; /* Prevents text cutoff on extreme mobile views */
        background: #000;
    }
}

/* --- Unified Section Headers --- */
.section-header {
    margin-bottom: 3.5rem;
    position: relative;
}

.section-prefix {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.section-title {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 16px;
}

.section-title-alt {
    background: linear-gradient(90deg, #fff 0%, #a0a0a0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- Grids & Layouts --- */
.modern-grid,
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* --- Universal News/Article Cards --- */
.news-card {
    border-radius: var(--radius-lg);
    background: var(--bg-panel);
    border: 1px solid var(--line);
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    position: relative;
    height: 100%;
}

.news-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    padding: 16px;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.news-card img,
.news-card-img {
    border-radius: var(--radius-md);
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.8s;
    margin-bottom: 12px;
}

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

.news-meta {
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.news-card h4 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
    line-height: 1.4;
}

.news-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Glass Footer --- */
.glass-footer {
    background: #0a0a0b;
    border-top: 1px solid var(--line);
    padding: 80px 0 40px;
    margin-top: 80px;
}

.footer-top {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-logo {
    height: 40px;
    margin-bottom: 20px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

.footer-nav h4,
.footer-contact h4 {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 24px;
}

.footer-nav ul,
.contact-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-nav a {
    color: var(--text-muted);
    transition: var(--transition);
}

.footer-nav a:hover {
    color: var(--accent);
    padding-left: 5px;
}

.footer-bottom {
    padding-top: 40px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}


@media (max-width: 992px) {
    /* Hide desktop nav, show mobile strip */
    .desktop-nav {
        display: none;
    }

    .mobile-nav-strip {
        display: block;
    }

    .footer-top {
        grid-template-columns: 1fr;
    }

    .modern-grid,
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .container {
        width: min(calc(100% - 24px), var(--container));
    }

    .header-auth .btn-login,
    .header-auth .btn-register {
        min-height: 34px;
        padding: 0 12px;
        font-size: 0.8rem;
    }

    .footer-top {
        padding: 24px 20px;
        border-radius: var(--radius-md);
        display: flex;
        flex-direction: column;
        gap: 2.5rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .modern-grid,
    .news-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
}
.read-more {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
}

[class*="card"]:hover .read-more {
    gap: 12px;
}
