/* ========================================================
   Citizen Opinion — Layout System
======================================================== */

/* === Header / Navigation === */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-fixed);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    transition: all var(--transition-normal);
}

.header.scrolled {
    box-shadow: var(--shadow-lg);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
}

.logo img {
    height: 44px;
    width: 44px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.logo-text {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    line-height: 1.2;
}

.logo-text span {
    display: block;
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    font-weight: var(--font-normal);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    list-style: none;
}

.nav-links a {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    text-decoration: none;
    position: relative;
}

.nav-links a:hover {
    color: var(--text-primary);
    background: var(--surface-hover);
}

.nav-links a.active {
    color: var(--saffron);
    font-weight: var(--font-semibold);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: var(--space-4);
    right: var(--space-4);
    height: 2px;
    background: var(--saffron);
    border-radius: var(--radius-full);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--text-primary);
    cursor: pointer;
    border-radius: var(--radius-md);
}

.menu-toggle:hover {
    background: var(--surface-hover);
}

/* === Main Content === */
.main {
    padding-top: 68px;
    min-height: 100vh;
}

.page-section {
    padding: var(--space-16) 0;
}

.page-section:nth-child(even) {
    background: var(--surface);
}

/* === Hero Section === */
.hero {
    position: relative;
    padding: var(--space-24) 0 var(--space-16);
    overflow: hidden;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 50%, #0E2442 100%);
    color: var(--white);
}

.hero::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(232, 136, 48, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(42, 143, 158, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 10s ease-in-out infinite reverse;
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    align-items: center;
}

.hero-text h1 {
    font-size: var(--text-5xl);
    font-weight: var(--font-extrabold);
    line-height: 1.15;
    margin-bottom: var(--space-6);
}

.hero-text h1 .gradient-text {
    background: linear-gradient(135deg, var(--saffron), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-text .tagline {
    font-size: var(--text-xl);
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: var(--space-8);
    line-height: var(--leading-relaxed);
}

.hero-buttons {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.hero-phone {
    width: 280px;
    height: 560px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 36px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    overflow: hidden;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.4), 0 0 40px rgba(232, 136, 48, 0.1);
    position: relative;
}

.hero-phone .phone-notch {
    width: 120px;
    height: 28px;
    background: #000;
    border-radius: 0 0 16px 16px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-phone .phone-screen {
    padding: var(--space-4);
    height: calc(100% - 28px);
    overflow: hidden;
}

/* === Footer === */
.footer {
    background: var(--navy);
    color: rgba(255, 255, 255, 0.8);
    padding: var(--space-16) 0 var(--space-8);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-12);
    margin-bottom: var(--space-12);
}

.footer-brand .logo-text {
    color: var(--white);
    margin-bottom: var(--space-4);
}

.footer-brand p {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.6);
    line-height: var(--leading-relaxed);
    max-width: 300px;
}

.footer-col h4 {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--white);
    margin-bottom: var(--space-4);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: var(--space-3);
}

.footer-col ul li a {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-col ul li a:hover {
    color: var(--saffron);
}

.footer-social {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-6);
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    transition: all var(--transition-normal);
    font-size: 16px;
}

.footer-social a:hover {
    background: var(--saffron);
    border-color: var(--saffron);
    color: var(--white);
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--space-6);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--text-xs);
    color: rgba(255, 255, 255, 0.4);
}

/* === Two Column Layout === */
.two-col {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: var(--space-8);
    align-items: start;
}

.sidebar {
    position: sticky;
    top: 84px;
}

/* === Feed Layout === */
.feed-container {
    max-width: 700px;
}

.feed-filters {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-6);
    overflow-x: auto;
    padding-bottom: var(--space-2);
    -webkit-overflow-scrolling: touch;
}

.feed-filters::-webkit-scrollbar {
    display: none;
}

/* === Page Header === */
.page-header {
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    color: var(--white);
    padding: calc(68px + var(--space-12)) 0 var(--space-12);
    text-align: center;
}

.page-header h1 {
    font-size: var(--text-4xl);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-2);
}

.page-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--text-lg);
}

/* === Mobile Responsive === */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-visual {
        display: none;
    }

    .hero-text h1 {
        font-size: var(--text-4xl);
    }

    .hero-buttons {
        justify-content: center;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .two-col {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --text-5xl: 2.25rem;
        --text-4xl: 1.875rem;
        --text-3xl: 1.5rem;
    }

    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    /* Mobile nav open */
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 68px;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--surface);
        padding: var(--space-6);
        gap: var(--space-2);
        z-index: var(--z-modal);
        animation: slideDown 0.3s ease-out;
    }

    .nav-links.open a {
        padding: var(--space-4);
        font-size: var(--text-base);
        border-radius: var(--radius-md);
    }

    .header-inner {
        height: 60px;
    }

    .main {
        padding-top: 60px;
    }

    .hero {
        padding: var(--space-16) 0 var(--space-12);
    }

    .page-section {
        padding: var(--space-10) 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-3);
        text-align: center;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 var(--space-4);
    }

    .card {
        padding: var(--space-4);
    }

    .feature-card {
        padding: var(--space-6);
    }

    .lang-switcher {
        font-size: 11px;
    }

    .section-title {
        font-size: var(--text-2xl);
    }

    .stat-item {
        padding: var(--space-3);
    }

    .stat-number {
        font-size: var(--text-2xl);
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: var(--text-3xl);
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .vote-actions {
        flex-wrap: wrap;
    }
}