/* ==========================================
   Public Website Styles
   ========================================== */

:root {
    --color-bg: #ffffff;
    --color-bg-alt: #f8fafc;
    --color-text: #1e293b;
    --color-text-secondary: #64748b;
    --color-accent: #6366f1;
    --color-accent-hover: #4f46e5;
    --color-border: #e2e8f0;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --max-width: 1200px;
    --content-width: 760px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.7;
}

a {
    color: var(--color-accent);
    text-decoration: none;
}

a:hover {
    color: var(--color-accent-hover);
}

img {
    max-width: 100%;
    height: auto;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--color-border);
    backdrop-filter: blur(10px);
    z-index: 100;
}

.header .container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo:hover {
    text-decoration: none;
    color: var(--color-accent);
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav a {
    font-family: var(--font-family);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #333;
    transition: color 0.2s;
}

.nav a:hover {
    color: #121212;
    text-decoration: none;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text);
    padding: 4px;
}

/* ---- Category Nav Bar ---- */
.site-cat-nav {
    border-bottom: 2px solid #121212;
    background: #fff;
    z-index: 99;
}

.site-cat-nav.cat-nav-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body.has-admin-bar .site-cat-nav.cat-nav-fixed {
    top: 40px;
}

.site-cat-nav::-webkit-scrollbar {
    display: none;
}

.site-cat-nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    gap: 0;
    padding: 0 1.5rem;
    white-space: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.site-cat-nav-inner::-webkit-scrollbar {
    display: none;
}

.site-cat-nav a {
    display: inline-block;
    padding: 10px 16px;
    font-family: var(--font-family);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #333;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.site-cat-nav a:hover {
    color: #121212;
    border-bottom-color: #121212;
    text-decoration: none;
}

/* ---- Mobile Overlay ---- */
.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.open {
    display: block;
    opacity: 1;
}

/* ---- Mobile Drawer ---- */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    max-width: 85vw;
    height: 100%;
    background: #fff;
    z-index: 999;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.12);
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.mobile-drawer.open {
    right: 0;
}

.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.mobile-drawer-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: #121212;
}

.mobile-drawer-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #64748b;
    padding: 4px;
}

.mobile-drawer-close:hover {
    color: #121212;
}

.mobile-drawer-body {
    padding: 8px 0;
    flex: 1;
}

.mobile-drawer-section a {
    display: block;
    padding: 12px 20px;
    color: #333 !important;
    font-size: 0.95rem;
    font-weight: 500;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s;
    text-decoration: none !important;
}

.mobile-drawer-section a:hover {
    background: #f8fafc;
    text-decoration: none !important;
}

.mobile-drawer-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 8px 0;
}

.mobile-drawer-label {
    padding: 12px 20px 4px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
        align-items: center;
    }

    .nav {
        display: none;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Footer */
.footer {
    background: #1e293b;
    color: #e2e8f0;
    padding: 0;
    margin-top: 4rem;
}

.footer .container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem 1.5rem 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: #fff;
}

.footer-brand p {
    color: #94a3b8;
    line-height: 1.6;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-section h4 {
    color: #fff;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer .footer-section a {
    display: block;
    color: #94a3b8 !important;
    padding: 0.25rem 0;
    font-size: 0.9375rem;
    transition: color 0.2s;
    text-decoration: none !important;
}

.footer .footer-section a:hover,
.footer .footer-section a:focus {
    color: #38bdf8 !important;
    text-decoration: none !important;
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: #64748b;
}

@media (max-width: 768px) {
    .nav {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        padding: 1rem;
        gap: 0;
        display: none;
        border-bottom: 1px solid var(--color-border);
    }

    .nav.active {
        display: flex;
    }

    .nav a {
        padding: 0.75rem 1rem;
    }

    .mobile-menu-btn {
        display: block;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-links {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* Hero */
.hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
    padding: 4rem 1.5rem;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #ffffff;
}

.hero p {
    font-size: 1.125rem;
    color: #94a3b8;
    max-width: 600px;
    margin: 0 auto;
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Article Grid */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}

.article-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.article-card-image {
    aspect-ratio: 16/9;
    background: var(--color-bg-alt);
    overflow: hidden;
}

.article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-card-content {
    padding: 1.5rem;
}

.article-card-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-accent);
    margin-bottom: 0.75rem;
}

.article-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.article-card-title a {
    color: var(--color-text);
}

.article-card-title a:hover {
    color: var(--color-accent);
    text-decoration: none;
}

.article-card-excerpt {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.article-meta-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Article Page */
.article-header {
    text-align: center;
    padding: 3rem 0;
    max-width: var(--content-width);
    margin: 0 auto;
}

.article-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.article-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    color: var(--color-text-secondary);
    flex-wrap: wrap;
}

.article-featured-image {
    width: 100%;
    max-width: var(--content-width);
    margin: 0 auto 2rem;
    border-radius: 12px;
    overflow: hidden;
}

.article-featured-image img {
    width: 100%;
    height: auto;
}

.article-content {
    max-width: var(--content-width);
    margin: 0 auto;
    font-size: 1.125rem;
}

.article-content h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
}

.article-content h3 {
    font-size: 1.375rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content blockquote {
    border-left: 4px solid var(--color-accent);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--color-text-secondary);
}

/* Global Table Styles (fallback for any page) */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    overflow: hidden;
}

table th,
table td {
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    text-align: left;
}

table th {
    font-weight: 700;
    background: #1e293b;
    color: #ffffff;
    border-color: #334155;
}

table tr:nth-child(even) {
    background: #f8f9fa;
}

table tbody tr:hover {
    background: #eef2ff;
}

/* Author Box */
.author-box {
    background: var(--color-bg-alt);
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    gap: 1.5rem;
    margin: 3rem auto;
    max-width: var(--content-width);
}

.author-box-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    font-weight: 600;
    flex-shrink: 0;
}

.author-box-content h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.author-box-content p {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    margin: 0;
}

.author-credentials {
    font-size: 0.875rem;
    color: var(--color-accent);
    margin-top: 0.5rem;
}

/* Footer */
.footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: 0;
    margin-top: 0;
}

.footer-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 20px 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-about h3,
.footer-about #footerName {
    font-size: 1.3rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 12px;
}

.footer-about p {
    font-size: 0.85rem;
    line-height: 1.6;
    color: #94a3b8;
    margin: 0 0 6px;
}

.footer-col h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #b91c1c;
}

.footer-col a {
    display: block;
    font-size: 0.85rem;
    color: #94a3b8;
    text-decoration: none;
    padding: 4px 0;
    transition: color 0.15s;
}

.footer-col a:hover {
    color: #d97706;
}

.footer-bottom {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid #1e293b;
    text-align: center;
    font-size: 0.8rem;
    color: #64748b;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* Policy Pages */
.page-content {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.page-content h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.page-content h2 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
}

.page-content p,
.page-content ul {
    margin-bottom: 1rem;
}

.page-content ul {
    padding-left: 1.5rem;
}

.last-updated {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .article-grid {
        grid-template-columns: 1fr;
    }

    .main-nav {
        display: none;
    }

    .author-box {
        flex-direction: column;
        text-align: center;
    }
}

/* ---- Breadcrumbs ---- */
.site-breadcrumb {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 1.5rem;
}

.breadcrumb-list {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0;
    list-style: none;
    padding: 10px 0;
    font-family: var(--font-family);
    font-size: 0.78rem;
    color: #64748b;
    overflow-x: auto;
    white-space: nowrap;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item::after {
    content: '\203A';
    margin: 0 8px;
    color: #94a3b8;
    font-size: 0.9rem;
}

.breadcrumb-item:last-child::after {
    display: none;
}

.breadcrumb-item a {
    color: #475569;
    text-decoration: none;
    transition: color 0.15s;
}

.breadcrumb-item a:hover {
    color: #0f172a;
    text-decoration: underline;
}

.breadcrumb-item.active span {
    color: #0f172a;
    font-weight: 600;
}

@media (max-width: 768px) {
    .site-breadcrumb {
        padding: 0 1rem;
    }
    .breadcrumb-list {
        font-size: 0.72rem;
    }
}

