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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

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

p {
    margin-bottom: 1rem;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    margin: 2rem 0;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

/* Main Header */
.header-main {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Search Container */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    padding: 0.5rem 1rem;
    border: 2px solid rgba(255, 215, 0, 0.2);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 0.9rem;
    width: 200px;
    transition: all 0.3s ease;
    outline: none;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-input:focus {
    border-color: #ffd700;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
    width: 250px;
}

.search-button {
    position: absolute;
    right: 5px;
    background: #ffd700;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #1a1a2e;
}

.search-button:hover {
    background: #ffed4e;
    transform: scale(1.1);
}


/* Animations */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Enhanced Logo Styles */
.logo {
    position: relative;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 12px;
    position: relative;
}

.logo-link:hover {
    transform: translateY(-2px);
    background: rgba(255, 215, 0, 0.05);
}

.logo-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #ffd700 100%);
    border-radius: 50%;
    box-shadow:
        0 0 20px rgba(255, 215, 0, 0.3),
        0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    overflow: hidden;
}

.logo-link:hover .logo-icon {
    transform: rotate(360deg) scale(1.1);
    box-shadow:
        0 0 30px rgba(255, 215, 0, 0.5),
        0 6px 20px rgba(0, 0, 0, 0.3);
}

.logo-icon i {
    font-size: 1.2rem;
    color: #1a1a2e;
    position: relative;
    z-index: 2;
    transition: color 0.3s ease;
}

.logo-link:hover .logo-icon i {
    color: #16213e;
}

.icon-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.logo-link:hover .icon-glow {
    opacity: 1;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo-main {
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #ffd700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.02em;
    transition: all 0.3s ease;
}

.logo-link:hover .logo-main {
    background: linear-gradient(135deg, #ffed4e 0%, #ffd700 50%, #ffed4e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 8px rgba(255, 215, 0, 0.3);
}

.logo-sub {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 2px;
    transition: color 0.3s ease;
}

.logo-link:hover .logo-sub {
    color: #ffd700;
}

/* Navigation */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
}

.main-nav a:hover,
.main-nav a.active {
    color: #ffd700;
}

.mobile-menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
}

/* Hide mobile menu overlay on desktop */
.mobile-menu-overlay {
    display: none !important;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Article Grid */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.article-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.article-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.article-content {
    padding: 1.5rem;
}

.article-category {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.article-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: #1a1a2e;
    line-height: 1.4;
}

.article-excerpt {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #888;
}

.article-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Sidebar */
.sidebar {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    height: fit-content;
}

.sidebar-widget {
    margin-bottom: 2rem;
}

.sidebar-widget h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #1a1a2e;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 0.5rem;
}

.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 0.5rem;
}

.category-list a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    text-decoration: none;
    color: #555;
    transition: all 0.3s ease;
}

.category-list a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Tags Cloud */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: #f0f0f0;
    color: #555;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tag:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Newsletter Form */
.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.newsletter-form input {
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.newsletter-form input:focus {
    outline: none;
    border-color: #667eea;
}

.newsletter-form button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: transform 0.3s ease;
}

.newsletter-form button:hover {
    transform: translateY(-2px);
}

/* AdSense Placeholders */
.ad-placeholder {
    background: #f8f9fa;
    border: 2px dashed #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.adsense-banner {
    margin: 2rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 90px;
}

/* AdSense Banner Ad Styles */
.adsense-banner ins.adsbygoogle {
    display: block;
    width: 728px;
    height: 90px;
    max-width: 100%;
}

/* Mobile Ad Dimensions */
@media (max-width: 768px) {
    .adsense-banner ins.adsbygoogle {
        width: 300px;
        height: 250px;
    }
}

/* Responsive Ad Dimensions */
.adsense-banner .ad-placeholder {
    width: 728px;
    height: 90px;
    max-width: 100%;
}

/* Mobile Ad Dimensions */
@media (max-width: 768px) {
    .adsense-banner .ad-placeholder {
        width: 300px;
        height: 250px;
    }
}

.adsense-sidebar {
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem 0;
}

.adsense-sidebar ins.adsbygoogle {
    display: block;
    width: 300px;
    height: 250px;
}


/* Footer */
.footer {
    background: #1a1a2e;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

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

.footer-section h4 {
    margin-bottom: 1rem;
    color: #ffd700;
}

.footer-section ul {
    list-style: none;
}

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

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #ffd700;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    color: white;
    text-decoration: none;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #ffd700;
    color: #1a1a2e;
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.adsense-footer {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.adsense-footer ins.adsbygoogle {
    display: block;
    width: 728px;
    height: 60px;
    max-width: 100%;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    /* Header adjustments */
    .header-content {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .main-nav {
        display: none !important;
    }

    .header-actions {
        order: 2;
        flex: 1;
        justify-content: flex-end;
    }

    .search-container {
        display: none; /* Hide search on mobile to save space */
    }

    .mobile-menu-toggle {
        display: flex !important;
        order: 3;
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.1);
        border: none;
        border-radius: 8px;
        color: white;
        cursor: pointer;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
    }

    .mobile-menu-toggle:hover {
        background: rgba(255, 215, 0, 0.2);
        transform: scale(1.05);
    }

    .mobile-menu-toggle:active {
        transform: scale(0.95);
    }

    /* Show mobile menu overlay only on mobile */
    .mobile-menu-overlay {
        display: block !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .mobile-menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .mobile-menu-content {
        position: absolute;
        top: 0;
        right: -300px;
        width: 280px;
        height: 100vh;
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
        box-shadow: -5px 0 20px rgba(0,0,0,0.3);
        transition: right 0.3s ease;
        display: flex;
        flex-direction: column;
        padding: 2rem 1.5rem;
    }

    .mobile-menu-overlay.active .mobile-menu-content {
        right: 0;
    }

    .mobile-menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 2rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .mobile-menu-title {
        color: #ffd700;
        font-size: 1.25rem;
        font-weight: 700;
        margin: 0;
    }

    .mobile-menu-close {
        background: none;
        border: none;
        color: white;
        font-size: 1.5rem;
        cursor: pointer;
        padding: 0.5rem;
        border-radius: 4px;
        transition: background-color 0.3s ease;
    }

    .mobile-menu-close:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    .mobile-nav ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .mobile-nav li {
        margin-bottom: 0.5rem;
    }

    .mobile-nav a {
        display: block;
        color: white;
        text-decoration: none;
        font-weight: 500;
        padding: 1rem 1.5rem;
        border-radius: 8px;
        transition: all 0.3s ease;
        font-size: 1.1rem;
    }

    .mobile-nav a:hover,
    .mobile-nav a.active {
        background: rgba(255, 215, 0, 0.2);
        color: #ffd700;
        transform: translateX(5px);
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .article-grid {
        grid-template-columns: 1fr;
    }

    .article-card {
        margin: 0 1rem;
    }

    /* Simplify related articles on mobile */
    .related-articles .related-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .related-articles .article-card {
        margin: 0;
        display: flex;
        align-items: center;
        padding: 1rem;
    }

    .related-articles .article-image {
        width: 80px;
        height: 80px;
        min-width: 80px;
        border-radius: 8px;
        overflow: hidden;
        margin-right: 1rem;
    }

    .related-articles .article-content {
        padding: 0;
        flex: 1;
    }

    .related-articles .article-title {
        font-size: 1rem;
        margin-bottom: 0.5rem;
        line-height: 1.3;
    }

    .related-articles .article-excerpt {
        display: none;
    }

    .related-articles .article-meta {
        font-size: 0.8rem;
    }

    .related-articles .article-category {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }

    /* Center social links on mobile */
    .social-links {
        justify-content: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

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

    .modal-body {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }

    .hero {
        padding: 2rem 0;
    }

    .hero-content h2 {
        font-size: 1.5rem;
    }

    .article-card {
        margin: 0 -0.5rem;
    }

    .sidebar {
        margin: 0 -0.5rem;
    }
}

/* Loading Animation */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

/* Print Styles */
@media print {
    .header, .footer, .sidebar, .adsense-banner, .adsense-sidebar, .adsense-footer {
        display: none !important;
    }

    .article-modal {
        display: block !important;
        position: static !important;
        background: white !important;
    }

    .modal-content {
        box-shadow: none !important;
        max-width: none !important;
    }
}
