/* ========================================
   Qazaq News Media - Main Stylesheet
   ======================================== */

/* CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --primary-color: #2d6a4f;
    --primary-dark: #1b4332;
    --primary-light: #40916c;
    --secondary-color: #52b788;
    --accent-color: #74c69d;
    --text-dark: #1d2d44;
    --text-light: #6c757d;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --border-color: #dee2e6;
    --overlay-dark: rgba(0, 0, 0, 0.6);
    --overlay-gradient: linear-gradient(135deg, rgba(45, 106, 79, 0.9) 0%, rgba(27, 67, 50, 0.85) 100%);
    
    /* Typography */
    --font-body: 'Poppins', sans-serif;
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    /* Spacing */
    --section-padding: 80px 0;
    --container-max-width: 1200px;
    --content-max-width: 700px;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    
    /* Transitions */
    --transition: all 0.3s ease;
}

body {
    font-family: var(--font-body);
    font-weight: var(--font-weight-light);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--white);
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-semibold);
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    font-weight: var(--font-weight-normal);
    margin-bottom: 1rem;
    color: var(--text-light);
}

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

a:hover {
    color: var(--primary-dark);
}

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

/* Container */
.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 32px;
    font-weight: var(--font-weight-normal);
    font-size: 1rem;
    text-align: center;
    border: 2px solid transparent;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--text-light);
    color: var(--white);
    border-color: var(--text-light);
}

.btn-secondary:hover {
    background-color: var(--text-dark);
    border-color: var(--text-dark);
    color: var(--white);
}

.btn-outline {
    background-color: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--primary-color);
    border-color: var(--white);
}

.btn-lg {
    padding: 16px 40px;
    font-size: 1.125rem;
}

/* ========================================
   Cookie Banner
   ======================================== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--text-dark);
    color: var(--white);
    padding: 20px;
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.cookie-banner.hidden {
    display: none;
}

.cookie-content {
    max-width: var(--container-max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.cookie-content p {
    margin: 0;
    color: var(--white);
    font-size: 0.9rem;
}

.cookie-content a {
    color: var(--accent-color);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.cookie-buttons .btn {
    padding: 8px 20px;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* ========================================
   Navigation
   ======================================== */
.navbar {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: baseline;
    gap: 5px;
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    color: var(--primary-color);
}

.logo-main {
    color: var(--primary-color);
}

.logo-sub {
    color: var(--primary-dark);
    font-weight: var(--font-weight-light);
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
    transition: var(--transition);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-dark);
    font-weight: var(--font-weight-normal);
    padding: 0.5rem 0;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.nav-menu a.active {
    color: var(--primary-color);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    position: relative;
    height: 600px;
    background-image: url('https://images.unsplash.com/photo-1504711434969-e33886168f5c?w=1600');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--overlay-gradient);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    padding: 0 20px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: var(--font-weight-bold);
    margin-bottom: 1rem;
    color: var(--white);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-tagline {
    font-size: 1.75rem;
    font-weight: var(--font-weight-normal);
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.hero-description {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.95);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========================================
   Section Styles
   ======================================== */
section {
    padding: var(--section-padding);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-light);
}

.view-all {
    color: var(--primary-color);
    font-weight: var(--font-weight-semibold);
    font-size: 1rem;
}

.view-all:hover {
    color: var(--primary-dark);
}

/* ========================================
   Features Section
   ======================================== */
.features {
    background-color: var(--bg-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.feature-card p {
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* ========================================
   Categories Section
   ======================================== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.category-card {
    position: relative;
    height: 250px;
    border-radius: var(--border-radius);
    overflow: hidden;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    color: var(--white);
    transition: var(--transition);
}

.category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    transition: var(--transition);
}

.category-card:hover .category-overlay {
    background: linear-gradient(to top, rgba(45, 106, 79, 0.9) 0%, rgba(27, 67, 50, 0.7) 100%);
}

.category-card h3,
.category-card p {
    position: relative;
    z-index: 1;
    color: var(--white);
    margin: 0;
}

.category-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.category-card p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.category-card:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

/* ========================================
   Latest News Section
   ======================================== */
.latest-news .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.news-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-card-featured {
    grid-column: 1 / -1;
}

.news-card-featured img {
    height: 350px;
}

.news-content {
    padding: 1.5rem;
}

.news-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--primary-color);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: var(--font-weight-semibold);
    border-radius: 20px;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.news-content h3 {
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.news-content h3 a {
    color: var(--text-dark);
}

.news-content h3 a:hover {
    color: var(--primary-color);
}

.news-content p {
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.news-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--text-light);
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
}

.news-author::before {
    content: '✍️ ';
}

.news-date::before {
    content: '📅 ';
}

/* ========================================
   Statistics Section
   ======================================== */
.statistics {
    background: var(--overlay-gradient);
    color: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-card {
    padding: 1.5rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: var(--font-weight-bold);
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background-color: var(--text-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 3rem 0 1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer h3, .footer h4 {
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-tagline {
    color: var(--accent-color);
    font-style: italic;
    margin-bottom: 1rem;
}

.footer p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.footer ul {
    list-style: none;
}

.footer ul li {
    margin-bottom: 0.5rem;
}

.footer ul li a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

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

.footer a {
    color: var(--accent-color);
}

.footer a:hover {
    color: var(--white);
}

.footer-disclaimer {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: var(--border-radius-sm);
    margin-bottom: 2rem;
}

.footer-disclaimer p {
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    margin: 0;
    font-size: 0.9rem;
}

/* ========================================
   Responsive Design
   ======================================== */

/* Tablet */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }
    
    .hero {
        height: 500px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-tagline {
        font-size: 1.25rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--white);
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: var(--shadow-md);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .nav-menu.active {
        max-height: 500px;
    }
    
    .nav-menu li {
        width: 100%;
        text-align: center;
    }
    
    .nav-menu a {
        display: block;
        padding: 0.75rem 1rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .news-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .news-card-featured {
        grid-column: 1 / -1;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
}

/* Mobile */
@media (max-width: 480px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    
    .hero {
        height: 400px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-tagline {
        font-size: 1.125rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn-lg {
        padding: 14px 32px;
        font-size: 1rem;
    }
    
    section {
        padding: 60px 0;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .latest-news .section-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }