/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #FFD700;
    --secondary-color: #1a1a2e;
    --accent-color: #e94560;
    --text-light: #ffffff;
    --text-dark: #333333;
    --bg-dark: #0f0f23;
    --bg-light: #f8f9fa;
    --gradient-primary: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    --gradient-dark: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --border-radius: 12px;
    --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    overflow-x: hidden;
    scroll-behavior: smooth;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    padding-top: 70px;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Header */
.header {
    background: linear-gradient(90deg, #006A4E 60%, #F42A41 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    z-index: 1002;
    padding: 0.8rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    min-height: 70px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.navbar {
    position: relative;
    width: 100%;
    height: 100%;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    height: 100%;
    position: relative;
}

.nav-brand .logo {
    height: 40px;
    width: auto;
    transition: var(--transition);
}

.nav-brand .logo:hover {
    transform: scale(1.05);
}

/* Mobile-first navigation */
.nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #006A4E;
    z-index: 1000;
}

.nav-menu.active {
    display: block !important;
}

.nav-menu {
    display: block !important;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #006A4E;
    z-index: 1000;
}

.nav-menu:not(.active) {
    display: none !important;
}

.nav-list {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0.5rem 1rem;
    background: rgba(0,106,78,0.95);
    border-radius: 30px;
    z-index: 1001;
}

.nav-list li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-list li:last-child {
    border-bottom: none;
}

.nav-link {
    color: #fff !important;
    font-weight: 700;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 25px;
    transition: background 0.2s, color 0.2s;
    background: none;
    display: inline-block;
}

.nav-link:hover {
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link:hover {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #006A4E;
}

.nav-link.active, .nav-link:hover {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: #006A4E !important;
}

.brand-text {
    color: #FFD700 !important;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Navigation Actions - Updated for pages without country buttons */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-shrink: 0;
    position: relative;
    z-index: 1001;
}

/* When no country buttons present, give more space to login/register */
.nav-actions:not(:has(.country-buttons)) {
    gap: 1rem;
}

.nav-actions:not(:has(.country-buttons)) .btn-login,
.nav-actions:not(:has(.country-buttons)) .btn-register {
    padding: 8px 16px;
    font-size: 12px;
    min-height: 32px;
}

/* Country Buttons - Only for International Page */
.country-buttons {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-right: 0.5rem;
    flex-wrap: nowrap;
    order: 1;
}

/* Hide country buttons section if it doesn't exist (for cleaner layout) */
.nav-actions:not(:has(.country-buttons)) {
    justify-content: flex-end;
}

.country-btn {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    padding: 4px 8px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 10px;
    font-weight: 600;
    transition: var(--transition);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
    pointer-events: auto;
    z-index: 5;
    cursor: pointer;
    white-space: nowrap;
    min-width: fit-content;
    min-height: 28px;
}

.country-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.country-flag {
    font-size: 12px;
    line-height: 1;
}

.country-text {
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1;
}

/* Country-specific button colors */
.india-btn {
    background: linear-gradient(135deg, #FF9933 0%, #FFFFFF 50%, #138808 100%);
    color: #000;
    border-color: #FF9933;
}

.india-btn:hover {
    background: linear-gradient(135deg, #FF9933 0%, #FF9933 50%, #138808 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 153, 51, 0.4);
}

.pakistan-btn {
    background: linear-gradient(135deg, #01411C 0%, #FFFFFF 100%);
    color: #01411C;
    border-color: #01411C;
}

.pakistan-btn:hover {
    background: linear-gradient(135deg, #01411C 0%, #01411C 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(1, 65, 28, 0.4);
}

.bangladesh-btn {
    background: linear-gradient(135deg, #006A4E 0%, #F42A41 100%);
    color: #fff;
    border-color: #006A4E;
}

.bangladesh-btn:hover {
    background: linear-gradient(135deg, #F42A41 0%, #006A4E 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(244, 42, 65, 0.4);
}

.country-btn.active {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
    border-color: var(--primary-color) !important;
}

/* Login/Register Buttons */
.btn-login, .btn-register {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    font-size: 11px;
    min-height: 28px;
    order: 2;
}

.btn-login {
    background: transparent;
    color: var(--text-light);
    border: 1px solid var(--primary-color);
}

.btn-login:hover {
    background: var(--primary-color);
    color: var(--text-dark);
}

.btn-register {
    background: var(--gradient-primary);
    color: var(--text-dark);
}

.btn-register:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: flex !important;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    padding: 5px;
    z-index: 2000;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: #FFD700;
    border-radius: 2px;
}

/* Main Content */
main {
    position: relative;
    z-index: 1;
    min-height: calc(100vh - 70px);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    padding: 1rem 0;
    background: var(--gradient-dark);
    color: var(--text-light);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-dark);
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: -1;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0.8rem;
}

.hero-title {
    font-size: clamp(1.5rem, 4vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 0.6rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: clamp(0.85rem, 2vw, 1rem);
    margin-bottom: 1.2rem;
    color: var(--text-light);
    opacity: 0.9;
    line-height: 1.6;
}

/* Compact Hero Elements */
.hero-badge {
    margin-bottom: 0.8rem;
}

.hero-stats {
    margin: 0.8rem 0;
}

.hero-features {
    margin: 0.8rem 0;
}

.hero-actions {
    margin: 1.2rem 0 0.8rem;
}

.trust-indicators {
    margin-top: 0.8rem;
}

/* Sections and Features */
.features, .articles {
    padding: 4rem 0;
    background: var(--bg-light);
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-dark);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.features-grid, .articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card, .article-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.feature-card:hover, .article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-align: center;
}

.feature-card h3, .article-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.feature-card p, .article-card p {
    color: var(--text-dark);
    opacity: 0.8;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.card-btn, .read-more {
    display: inline-block;
    background: var(--gradient-primary);
    color: var(--text-dark);
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.card-btn:hover, .read-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

/* Article specific styles */
.article-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.category {
    background: var(--gradient-primary);
    color: var(--text-dark);
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.8rem;
}

.date {
    color: var(--text-dark);
    opacity: 0.6;
}

/* Desktop Layout - 769px and above */
@media (min-width: 769px) {
    .header {
        min-height: 80px;
        padding: 1rem 0;
    }
    
    body {
        padding-top: 80px;
    }
    
    .navbar .container {
        padding: 0 20px;
    }
    
    .nav-brand .logo {
        height: 45px;
    }
    
    .nav-menu {
        display: flex !important;
        position: static;
        background: none;
        box-shadow: none;
        width: auto;
        padding: 0;
        max-height: none;
        overflow: visible;
        flex: 1;
        justify-content: center;
    }
    
    .nav-list {
        flex-direction: row;
        gap: 2.5rem;
        margin: 0;
        padding: 0;
    }
    
    .nav-list li {
        border-bottom: none;
        width: auto;
    }
    
    .nav-link {
        padding: 10px 15px;
        white-space: nowrap;
        text-align: center;
        background: none !important;
    }
    
    .nav-link::after {
        content: '';
        position: absolute;
        bottom: 5px;
        left: 50%;
        transform: translateX(-50%);
        width: 0;
        height: 2px;
        background: var(--primary-color);
        transition: width 0.3s ease;
    }
    
    .nav-link:hover::after {
        width: 80%;
    }
    
    .mobile-menu-toggle {
        display: none !important;
    }
    
    .nav-actions {
        gap: 1.5rem;
    }
    
    /* Enhanced spacing for pages without country buttons */
    .nav-actions:not(:has(.country-buttons)) {
        gap: 2rem;
    }
    
    .nav-actions:not(:has(.country-buttons)) .btn-login,
    .nav-actions:not(:has(.country-buttons)) .btn-register {
        padding: 12px 24px;
        font-size: 14px;
        min-height: 42px;
    }
    
    .country-buttons {
        gap: 0.5rem;
        margin-right: 1rem;
    }
    
    .country-btn {
        padding: 8px 12px;
        font-size: 12px;
        min-height: 36px;
    }
    
    .country-flag {
        font-size: 14px;
    }
    
    .country-text {
        font-size: 11px;
    }
    
    .btn-login, .btn-register {
        padding: 10px 20px;
        font-size: 14px;
        min-height: 40px;
    }
    
    .container {
        max-width: 1200px;
        padding: 0 20px;
    }
    
    .hero {
        min-height: 45vh;
        padding: 0.8rem 0;
    }
    
    .hero-title {
        font-size: clamp(1.3rem, 5vw, 2rem);
        margin-bottom: 0.4rem;
    }
    
    .hero-subtitle {
        font-size: 0.8rem;
        max-width: 90%;
        margin: 0 auto 0.8rem;
    }
    
    .hero-content {
        padding: 0.4rem;
    }
}

/* Tablet Layout - 481px to 768px */
@media (min-width: 481px) and (max-width: 768px) {
    .navbar .container {
        padding: 0 15px;
    }
    
    .country-btn {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    .country-flag {
        font-size: 13px;
    }
    
    .country-text {
        font-size: 9px;
    }
    
    .btn-login, .btn-register {
        padding: 8px 15px;
        font-size: 12px;
    }
}

/* Mobile Layout - up to 480px */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .navbar .container {
        padding: 0 10px;
    }
    
    .nav-actions {
        gap: 0.3rem;
    }
    
    .country-buttons {
        gap: 0.2rem;
        margin-right: 0.3rem;
    }
    
    .country-btn {
        padding: 3px 6px;
        font-size: 9px;
        min-height: 24px;
    }
    
    .country-flag {
        font-size: 11px;
    }
    
    .country-text {
        display: none;
    }
    
    .btn-login, .btn-register {
        padding: 5px 10px;
        font-size: 10px;
        min-height: 26px;
    }
    
    .mobile-menu-toggle {
        min-width: 36px;
        min-height: 36px;
    }
    
    .mobile-menu-toggle span {
        width: 18px;
        height: 2px;
    }
    
    .hero {
        min-height: 40vh;
        padding: 0.4rem 0;
    }
    
    .hero-title {
        font-size: clamp(1.1rem, 7vw, 1.6rem);
        margin-bottom: 0.4rem;
    }
    
    .hero-subtitle {
        font-size: 0.75rem;
        margin-bottom: 0.8rem;
    }
    
    .hero-actions {
        margin: 0.8rem 0 0.4rem;
    }
}

/* Extra Large Screens - 1400px and above */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
        padding: 0 30px;
    }
    
    .hero-title {
        font-size: clamp(3rem, 5vw, 5rem);
    }
}

/* Pakistan Theme */
.pakistan-theme {
    --primary-color: #01411C;
    --secondary-color: #FFFFFF;
}

.pakistan-theme .download-btn {
    background: linear-gradient(135deg, #01411C 0%, #228B22 100%);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 8px 25px rgba(1, 65, 28, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 200px;
    justify-content: center;
}

.pakistan-theme .download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(1, 65, 28, 0.4);
    background: linear-gradient(135deg, #228B22 0%, #01411C 100%);
}

.pakistan-theme .download-btn .flag-icon {
    font-size: 1.2em;
    animation: wave 2s ease-in-out infinite;
}

.pakistan-theme .secondary-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.pakistan-theme .secondary-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* Bangladesh Theme */
.bangladesh-theme {
    --primary-color: #006A4E;
    --secondary-color: #F42A41;
}

/* India Theme */
.india-theme {
    --primary-color: #FF9933;
    --secondary-color: #138808;
}

/* Footer Styles */
.footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: var(--text-light);
    padding: 3rem 0 1rem;
    margin-top: 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section {
    padding: 1rem;
}

.footer-section h4 {
    color: var(--primary-color, #FFD700);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color, #FFD700);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 0.8rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.footer-section ul li a:hover {
    color: var(--primary-color, #FFD700);
    transform: translateX(5px);
}

.footer-logo {
    width: 150px;
    height: auto;
    margin-bottom: 1rem;
    filter: brightness(1.1);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--text-light);
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.social-link:hover {
    background: var(--primary-color, #FFD700);
    color: #000;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-color, #FFD700), #FFA500);
    color: #000;
    border: none;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* Footer Responsive Design */
@media (max-width: 768px) {
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
    }
    
    .footer-section {
        padding: 0.5rem;
        text-align: center;
    }
    
    .footer-logo {
        width: 120px;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-section h4 {
        font-size: 1.1rem;
    }
    
    .footer-section ul li a {
        justify-content: center;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .footer-section {
        padding: 0.25rem;
    }
    
    .footer-logo {
        width: 100px;
    }
    
    .social-links {
        gap: 0.8rem;
    }
    
    .social-link {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .scroll-to-top {
        width: 40px;
        height: 40px;
        font-size: 16px;
        bottom: 15px;
        right: 15px;
    }
    
    .footer-bottom p {
        font-size: 0.8rem;
        padding: 0 10px;
    }
}
