﻿:root {
    --primary-bg: #0f172a;
    --secondary-bg: #1e293b;
    --accent: #8b5cf6;
    --accent-hover: #7c3aed;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;
    --font-heading: 'Cinzel', serif;
    --font-body: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--primary-bg);
    color: var(--text-main);
    line-height: 1.6;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: 1px;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent), #4f46e5);
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    font-size: 1rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-main);
}

/* Base Article / Hero Resets for dark mode */
.article-hero {
    background: #0f172a !important;
    border-bottom: 1px solid var(--border) !important;
    color: #f8fafc !important;
}

.article-hero h1 {
    color: #f8fafc !important;
    font-family: var(--font-heading);
}

.article-hero p {
    color: #cbd5e1 !important;
}

.article-content {
    color: #cbd5e1 !important;
}

.article-content h2,
.article-content h3 {
    color: #f8fafc !important;
    font-family: var(--font-heading);
}

.product-card {
    background: var(--secondary-bg) !important;
    border: 1px solid var(--border) !important;
    color: #f8fafc !important;
}

.product-info h4 {
    color: #f8fafc !important;
}

/* Forms / Inputs (if any in tools) */
input,
select,
textarea {
    background: var(--secondary-bg);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-family: var(--font-body);
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

/* Global Buttons */
button,
.btn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

button:hover,
.btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

/* Footer Styles */
footer {
    width: 100%;
    margin-top: 0;
}

.footer-content {
    background: var(--primary-bg);
    color: var(--text-main);
    padding: 4rem 5% 2rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2.5rem;
    border-top: 1px solid var(--border);
}

.footer-column {
    flex: 1;
    min-width: 200px;
}

.footer-brand {
    min-width: 250px;
}

.footer-brand span {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    display: block;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: var(--text-muted);
    line-height: 1.6;
}

.footer-column h3 {
    color: #fff;
    margin-bottom: 1.25rem;
    font-family: var(--font-heading);
    font-size: 1.1rem;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
    line-height: 2.2;
}

.footer-column a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: var(--text-main);
}

.footer-bottom {
    background: #020617;
    padding: 1.5rem 5%;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .nav-links {
        width: 100%;
        justify-content: center;
        gap: 1rem;
    }
}

/* â”€â”€ Homepage: Hero â”€â”€ */
.hero {
    background: linear-gradient(135deg, #1e1b4b, #312e81);
    color: #fff;
    padding: 6rem 5%;
    text-align: center;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1.5rem;
    font-family: 'Cinzel', serif;
    color: #e0e7ff;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2.5rem;
    color: #c7d2fe;
    line-height: 1.6;
}

/* â”€â”€ Homepage: Sections & Cards â”€â”€ */
.articles-section {
    padding: 5rem 5%;
    background: #f8fafc;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: #0f172a;
    margin-bottom: 3rem;
    font-family: 'Cinzel', serif;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    font-size: 1.5rem;
    color: #1e293b;
    margin-bottom: 1rem;
    font-family: 'Cinzel', serif;
}

.card-content p {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.read-more {
    margin-top: auto;
    color: #4f46e5;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* ═══════════════════════════════════════════════
   SHARED ARTICLE STYLES
   ═══════════════════════════════════════════════ */

/* Article Hero */
.article-hero {
    background: #f8fafc;
    padding: 4rem 5%;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}

.article-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: #0f172a;
    margin-bottom: 1rem;
    max-width: 800px;
    margin-inline: auto;
    line-height: 1.2;
    font-family: 'Cinzel', serif;
}

.article-hero p {
    font-size: 1.1rem;
    color: #64748b;
    max-width: 600px;
    margin-inline: auto;
}

/* Article Content */
.article-content {
    max-width: 800px;
    margin: 3rem auto;
    padding: 0 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #334155;
}

.article-content h2 {
    font-size: 2rem;
    color: #1e293b;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-family: 'Cinzel', serif;
}

.article-content h3 {
    font-size: 1.5rem;
    color: #334155;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.article-content img {
    width: 100%;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    object-fit: cover;
    max-height: 500px;
}

.article-content ul,
.article-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

/* Meaning Table */
.meaning-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

.meaning-table th,
.meaning-table td {
    border: 1px solid var(--border, #e2e8f0);
    padding: 1rem;
    text-align: left;
}

.meaning-table th {
    font-family: var(--font-heading, 'Cinzel', serif);
    background: #f8fafc;
}

/* Table of Contents */
.toc {
    background: #f8fafc;
    border: 1px solid var(--border, #e2e8f0);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
}

.toc h3 {
    margin-top: 0 !important;
    font-family: var(--font-heading, 'Cinzel', serif);
    color: #0f172a !important;
    font-size: 1.25rem !important;
    font-weight: 600;
}

.toc ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.toc li {
    margin-bottom: 0.75rem;
}

.toc a {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
}

.toc a:hover {
    text-decoration: underline;
}

/* Internal Links Silo */
.internal-links-silo {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    margin: 3rem 0;
    border: 1px solid var(--border, #e2e8f0);
}

.internal-links-silo h3 {
    margin-top: 0;
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: #0f172a;
    margin-bottom: 1rem;
}

.silo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    text-align: center;
}

.silo-link {
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    text-decoration: none;
    color: #4f46e5;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s, transform 0.2s;
}

.silo-link:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Author Block */
.author-block {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border, #e2e8f0);
}

.author-avatar {
    width: 50px;
    height: 50px;
    background: var(--angel-purple, #6d28d9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* CTA Button */
.cta-wrap {
    text-align: center;
    margin: 2.5rem 0;
}

.cta-btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
    transition: transform 0.2s, box-shadow 0.2s;
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.35);
}

/* Product Cards (Guide page) */
.product-card {
    display: flex;
    gap: 1.5rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    align-items: center;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.product-img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.product-info h4 {
    font-size: 1.25rem;
    color: #0f172a;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.product-info p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.affiliate-btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: #2563eb;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.affiliate-btn:hover {
    background: #1d4ed8;
}

@media (max-width: 640px) {
    .product-card {
        flex-direction: column;
        text-align: center;
    }

    .product-img {
        width: 200px;
        height: 200px;
        margin: 0 auto;
    }
}