* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #0ea5e9;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --gray: #64748b;
    --light: #f1f5f9;
    --white: #ffffff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: var(--white);
}

/* ==================== HEADER & NAVIGATION ==================== */
header {
    background: var(--dark);
    color: var(--white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    text-decoration: none;
}

.logo span {
    color: var(--secondary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ==================== HERO SECTION (Index Page) ==================== */
.hero {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
    color: var(--white);
    padding: 6rem 2rem;
    text-align: center;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero .highlight {
    color: var(--primary);
}

.hero p,
.hero .subtitle {
    font-size: 1.25rem;
    color: var(--light);
    max-width: 700px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

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

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

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

.cta-button {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
}

.cta-button:hover {
    background: var(--primary-dark);
}

/* ==================== CONTAINER ==================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

/* ==================== FEATURED ARTICLES SECTION (Index Page) ==================== */
.featured-articles {
    background: var(--white);
    padding: 4rem 0;
}

.featured-articles h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--dark);
}

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

.article-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
}

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

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

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    color: var(--dark);
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.card-content p {
    color: var(--gray);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.card-content span {
    display: inline-block;
    background: var(--light);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
}

.view-all {
    text-align: center;
    margin-top: 2rem;
}

/* ==================== COMMUNITY BOX SECTION (Index Page) ==================== */
.community-box {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    padding: 4rem 2rem;
}

.community-box h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.community-box>.container>p {
    text-align: center;
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.community-box form {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.community-box .form-group label {
    color: var(--white);
}

.form-group input:not([type="checkbox"]),
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--light);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
}

.community-box .form-group input {
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.9);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.community-box .form-group input:focus {
    background: var(--white);
    border-color: var(--white);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

/* ==================== ABOUT US SECTION (Index Page) ==================== */
.about-us {
    background: var(--light);
    padding: 4rem 2rem;
}

.about-us h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--dark);
}

.mission-content {
    max-width: 800px;
    margin: 0 auto;
}

.mission-content p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--gray);
    margin-bottom: 1.5rem;
}

/* ==================== ARTICLE PAGES LAYOUT ==================== */
.article-header {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
    color: var(--white);
    padding: 4rem 2rem 2rem;
    text-align: center;
}

.article-category {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.article-header h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.article-meta {
    color: var(--light);
    font-size: 0.95rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.article-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
}

/* ==================== ARTICLE CONTENT ==================== */
.article-content {
    background: var(--white);
    max-width: 800px;
}

.featured-image {
    font-size: 5rem;
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    margin-bottom: 2rem;
}

.article-content h2 {
    color: var(--dark);
    font-size: 2rem;
    margin: 2.5rem 0 1rem;
    padding-top: 1rem;
}

.article-content h3 {
    color: var(--dark);
    font-size: 1.5rem;
    margin: 2rem 0 0.75rem;
}

.article-content p {
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.article-content ul,
.article-content ol {
    margin: 1.5rem 0 1.5rem 2rem;
    padding-left: 0;
}

.article-content li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.article-content strong {
    font-weight: 600;
    color: var(--dark-light);
}

.article-content blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--gray);
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

/* ==================== SIDEBAR (Used on Article and Contact Page) ==================== */
.sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-section {
    background: var(--light);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.sidebar-section h3 {
    color: var(--dark);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--gray);
    padding-bottom: 0.5rem;
}

.sidebar-section p {
    color: var(--dark-light);
    line-height: 1.6;
    font-size: 0.95rem;
}

.sidebar-section a {
    color: var(--primary);
    text-decoration: none;
}

.ad-label {
    font-size: 0.8rem;
    color: var(--gray);
    text-align: center;
    margin-bottom: 0.5rem;
}

.ad-placeholder {
    background: var(--white);
    padding: 1rem;
    border: 1px dashed var(--gray);
    border-radius: 8px;
    text-align: center;
}

/* ==================== FOOTER (Index Page) ==================== */
.main-footer {
    background: var(--dark);
    color: var(--white);
    padding: 4rem 2rem 1.5rem;
}

.main-footer .footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    padding-top: 0;
    padding-bottom: 2rem;
}

.main-footer .footer-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.main-footer .footer-section .logo {
    margin-bottom: 0.5rem;
}

.main-footer .footer-section .tagline {
    font-size: 0.9rem;
    color: var(--gray);
}

.main-footer .footer-links {
    list-style: none;
    padding: 0;
}

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

.main-footer .footer-links a {
    color: var(--light);
    text-decoration: none;
    transition: color 0.3s;
}

.main-footer .footer-links a:hover {
    color: var(--secondary);
}

.main-footer .footer-bottom {
    border-top: 1px solid var(--dark-light);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--gray);
}

/* ==================== MEDIA QUERIES ==================== */
@media (max-width: 968px) {
    .article-container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .article-header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p,
    .hero .subtitle {
        font-size: 1rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }

    .hero-actions .btn {
        width: 100%;
        text-align: center;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--dark);
        flex-direction: column;
        padding: 1rem;
    }

    .nav-links.active {
        display: flex;
    }

    .newsletter-form {
        flex-direction: column;
    }

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

    .featured-articles h2,
    .community-box h2,
    .about-us h2 {
        font-size: 2rem;
    }

    .main-footer .footer-grid {
        grid-template-columns: 1fr;
    }
}


/* ==================== CONTENT PAGES (Privacy, Terms, Contact) & FOOTER UNIFORMITY ==================== */

/* Generic Page Header (Used on Contact, Privacy, Terms) */
.page-header {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
    color: var(--white);
    padding: 4rem 2rem 2rem;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--light);
    font-size: 1.1rem;
}

/* Document/Content Area Styling (used in Privacy and Terms) */
.content h2 {
    color: var(--dark);
    font-size: 1.75rem;
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
}

.content h3 {
    color: var(--dark);
    font-size: 1.3rem;
    margin: 1.5rem 0 0.75rem;
}

.content p {
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
}

.content ul,
.content ol {
    margin: 1rem 0 1.5rem 2rem;
}

.content li {
    margin-bottom: 0.5rem;
}

.content strong {
    color: var(--dark);
    font-weight: 600;
}

.content a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

.content a:hover {
    border-bottom-color: var(--primary);
}

.highlight-box {
    background: var(--light);
    border-left: 4px solid var(--primary);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
}

.last-updated {
    background: var(--light);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    font-weight: 600;
    color: var(--dark);
}

/* Contact Form Specific Styles */
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
    font-size: 1rem;
}

/* Overriding existing input/textarea styles to use the light background */
.form-group input:not([type="checkbox"]),
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--light);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--light);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    background: var(--white);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.submit-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, opacity 0.3s;
}

.submit-btn:hover {
    background: var(--primary-dark);
}

.submit-btn:disabled {
    background: var(--gray);
    cursor: not-allowed;
    opacity: 0.7;
}

.message-box {
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    display: none;
}

.message-success {
    background: #ecfdf5;
    border-left: 4px solid #10b981;
    color: #065f46;
}

.message-error {
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    color: #991b1b;
}


/* Footer (Used in Privacy/Terms for simple footer) */
footer {
    background: var(--dark);
    color: var(--white);
    padding: 2rem;
    text-align: center;
    margin-top: 4rem;
}

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

footer a:hover {
    text-decoration: underline;
}

/* Sidebar Newsletter Form Specific Styles */
.sidebar-newsletter-form .message-box {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
    text-align: center;
}

.sidebar-newsletter-form .message-success {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
}

.sidebar-newsletter-form .message-error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: white;
}

.sidebar-newsletter-form button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}