/* ============================================
   RESPONSIVE CSS - Mobile & Tablet Styles
   ============================================ */

/* ============================================
   BASE RESPONSIVE FIXES
   ============================================ */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

* {
    box-sizing: border-box;
}

.container {
    max-width: 100%;
    padding: 0 15px;
}

/* News Grid and Card Fixes */
.news-section {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.news-grid {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

/* Large screen optimization */
@media (min-width: 1400px) {
    .news-grid {
        max-width: 1400px;
        margin: 0 auto;
        padding: 0 2rem;
    }
}

@media (min-width: 1800px) {
    .news-grid {
        max-width: 1600px;
        padding: 0 3rem;
    }
}

.news-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
    aspect-ratio: 377 / 329;
    display: flex;
    flex-direction: column;
    padding: clamp(0.8rem, 1.5vw + 0.3rem, 1.8rem);
    justify-content: space-between;
}

.news-card h3,
.news-card p {
    word-wrap: break-word;
    overflow-wrap: break-word;
    flex-shrink: 1;
    overflow: hidden;
}

.news-card h3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

.news-card p {
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-card .read-more {
    flex-shrink: 0;
    display: inline-block;
    width: fit-content;
    align-self: flex-start;
}

/* ============================================
   FLUID TYPOGRAPHY FOR NEWS CARDS
   Scales smoothly from mobile to ultrawide
   ============================================ */
.news-date {
    font-size: clamp(0.65rem, 0.4rem + 0.35vw, 0.9rem);
    margin-bottom: clamp(0.2rem, 0.15rem + 0.15vw, 0.4rem);
}

.news-card h3 {
    font-size: clamp(0.9rem, 0.7rem + 0.7vw, 1.5rem);
    margin-bottom: clamp(0.25rem, 0.15rem + 0.2vw, 0.5rem);
    line-height: 1.25;
}

.news-card p {
    font-size: clamp(0.8rem, 0.6rem + 0.5vw, 1.15rem);
    line-height: 1.4;
    margin-bottom: clamp(0.4rem, 0.25rem + 0.25vw, 0.7rem);
}

.news-card .read-more {
    font-size: clamp(0.7rem, 0.55rem + 0.45vw, 1rem);
    padding: clamp(5px, 0.25rem + 0.15vw, 9px) clamp(9px, 0.4rem + 0.3vw, 16px);
}

/* ============================================
   MOBILE PORTRAIT (≤768px)
   ============================================ */
@media (max-width: 768px) {
    /* Navbar */
    .navbar {
        padding: 0.5rem 0;
    }

    .navbar .container {
        justify-content: center;
        padding: 0 5px;
    }

    .navbar-left,
    .navbar-right {
        font-size: 0.7rem;
        padding-left: 2.5rem;
        padding-right: 2.5rem;
        white-space: nowrap;
    }
    
    .navbar-toggle {
        display: block;
        width: 40px;
        height: 40px;
        right: 10px;
    }

    .navbar-toggle i {
        font-size: 14px;
    }
    
    .navbar-brand img {
        height: 60px;
    }

    /* Hero Section */
    .naz-section {
        padding: 100px 10px 40px;
        min-height: 100vh;
        background-attachment: scroll;
        position: relative;
    }

    .naz-section::after {
        height: 10%;
    }

    .naz-content {
        padding-top: 0;
        width: 100%;
        gap: 0.5rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        position: absolute;
        top: 120px;
        left: 0;
        right: 0;
    }

    .naz-logo {
        max-width: 85%;
        max-height: 150px;
        height: auto;
        margin-bottom: 0.5rem;
        flex-shrink: 0;
    }
    
    .naz-buttons {
        flex-direction: column;
        gap: 0.3rem;
        width: 100%;
        padding: 0 10px;
        flex-shrink: 0;
    }
    
    .naz-btn {
        width: 100%;
        max-width: 280px;
        aspect-ratio: 256 / 120;
        font-size: 0.85rem;
        background-size: 100% 100%;
        flex-shrink: 0;
    }

    .naz-btn i {
        font-size: 1.3rem;
    }

    /* Stats Section */
    .stats-section {
        padding: 2rem 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-card {
        padding: 1.5rem 1rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 1rem;
    }

    /* News Section - 1 column, readable text */
    .news-section {
        padding: 2rem 0;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
        padding: 0 10px;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 10px;
        width: 100%;
    }

    .news-card {
        width: 100%;
        padding: clamp(1rem, 4vw, 1.5rem);
        margin: 0 auto;
        aspect-ratio: 377 / 329;
    }

    .news-card h3 {
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .news-card p {
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }

    /* Footer */
    .footer {
        padding: 3rem 0 1rem 0;
    }

    .footer::before,
    .footer-bottom::before {
        width: 90%;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 10px;
    }

    .footer-brand img {
        height: 25px;
    }

    .footer-brand-text {
        font-size: 1.5rem;
    }

    .footer-section p {
        font-size: 0.9rem;
    }

    .social-links {
        gap: 0.8rem;
    }

    .social-links a {
        font-size: 1.3rem;
    }

    .footer-bottom {
        padding-top: 2rem;
        font-size: 0.85rem;
    }
}

/* ============================================
   SMALL MOBILE (≤480px)
   ============================================ */
@media (max-width: 480px) {
    .navbar-left,
    .navbar-right {
        font-size: 0.6rem;
        padding-left: 2.5rem;
        padding-right: 2.5rem;
    }

    .naz-content {
        top: 110px;
    }

    .naz-logo {
        max-width: 90%;
        max-height: 130px;
        margin-bottom: 0.4rem;
    }

    .naz-btn {
        max-width: 240px;
        font-size: 0.8rem;
    }

    .naz-btn i {
        font-size: 1.2rem;
    }

    .naz-buttons {
        gap: 0.2rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .footer-brand-text {
        font-size: 1.3rem;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .news-card h3 {
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .news-card p {
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }
}

/* ============================================
   VERY NARROW (≤380px)
   ============================================ */
@media (max-width: 380px) {
    .navbar-left,
    .navbar-right {
        font-size: 0.55rem;
        padding-left: 2.5rem;
        padding-right: 2.5rem;
    }

    .navbar .container {
        padding: 0 3px;
    }

    .container {
        padding: 0 10px;
    }

    .news-section {
        padding: 2rem 5px;
    }

    .news-grid {
        padding: 0 5px;
        gap: 1.2rem;
        width: 100%;
    }

    .news-card {
        padding: clamp(0.9rem, 3.5vw, 1.25rem);
        max-width: 100%;
        margin: 0 auto;
        aspect-ratio: 377 / 329;
    }

    .news-card h3 {
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .news-card p {
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }

    .section-title {
        font-size: 1.4rem;
        padding: 0 5px;
    }

    .naz-btn {
        max-width: 220px;
    }
}

/* ============================================
   TABLET PORTRAIT (769px - 1024px)
   ============================================ */
@media (min-width: 769px) and (max-width: 1024px) {
    .navbar-left,
    .navbar-right {
        font-size: 1rem;
        padding-left: 2.5rem;
        padding-right: 2.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* ============================================
   DESKTOP NAVBAR ADJUSTMENTS
   ============================================ */
@media (min-width: 950px) and (max-width: 1200px) {
    .navbar-left,
    .navbar-right {
        font-size: 1.1rem;
    }
}

@media (min-width: 769px) and (max-width: 950px) {
    .navbar-left,
    .navbar-right {
        font-size: 0.95rem;
        padding-left: 2.5rem;
        padding-right: 2.5rem;
    }
}

/* ============================================
   MOBILE LANDSCAPE (≤768px width, landscape)
   ============================================ */
@media (max-width: 768px) and (orientation: landscape) {
    .naz-section {
        padding: 70px 15px 30px;
        min-height: 100vh;
    }

    .naz-section::after {
        height: 8%;
    }
    
    .naz-content {
        position: absolute;
        top: 80px;
        gap: 0.3rem;
        padding: 0 10px;
    }
    
    .naz-logo {
        max-height: 100px;
        max-width: 300px;
        margin-bottom: 0.3rem;
    }
    
    .naz-buttons {
        flex-direction: row;
        gap: 0.8rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .naz-btn {
        width: auto;
        max-width: 220px;
        min-width: 180px;
        font-size: 0.8rem;
    }

    .naz-btn i {
        font-size: 1.2rem;
    }

    /* 2 columns for landscape, scaled down */
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 0 10px;
    }

    .news-section {
        padding: 2rem 10px;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .news-card {
        padding: clamp(0.8rem, 3vw, 1.25rem);
        width: 100%;
        aspect-ratio: 377 / 329;
    }

    .news-card h3 {
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .news-card p {
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
}

/* ============================================
   TABLET LANDSCAPE (769px - 1024px, landscape)
   ============================================ */
@media (min-width: 769px) and (max-width: 1024px) and (orientation: landscape) {
    .naz-section {
        min-height: 100vh;
    }

    .naz-content {
        position: absolute;
        top: 100px;
    }

    .naz-logo {
        max-height: 140px;
    }

    .naz-btn {
        max-width: 240px;
        min-width: 200px;
        font-size: 0.85rem;
    }

    .naz-btn i {
        font-size: 1.4rem;
    }

    /* 2 columns for tablet landscape */
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.8rem;
    }
}

/* ============================================
   VERY SMALL LANDSCAPE (≤568px height)
   ============================================ */
@media (max-height: 568px) and (orientation: landscape) {
    .naz-section {
        padding: 60px 15px 20px;
    }

    .naz-content {
        top: 70px;
    }

    .naz-logo {
        max-height: 80px;
    }

    .naz-btn {
        max-width: 200px;
        min-width: 160px;
        font-size: 0.75rem;
    }

    .naz-btn i {
        font-size: 1rem;
    }

    .naz-buttons {
        gap: 0.5rem;
    }

    .news-card h3 {
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .news-card p {
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
}