/* Premium Atlas Design System */
:root {
    /* Colors */
    --primary: #1a252f;
    /* Dark Slate */
    --primary-light: #2c3e50;
    --secondary: #c0392b;
    /* Historical Red */
    --accent: #d4ac0d;
    /* Gold */
    --bg-body: #fdfbf7;
    /* Ivory/Paper */
    --bg-card: #ffffff;
    --text-main: #2c3e50;
    --text-light: #7f8c8d;
    --border: #e0e0e0;

    /* Typography */
    --font-heading: 'Merriweather', 'Playfair Display', serif;
    --font-body: 'Open Sans', 'Inter', sans-serif;

    /* Spacing */
    --container: 1200px;
    --radius: 8px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

ul {
    list-style: none;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
    color: var(--primary);
}

/* Layout */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 50px;
    width: auto;
    display: block;
}

.logo > span {
    line-height: 1.2;
}

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

.nav-menu {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-link {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--primary-light);
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--secondary);
}

/* Mobile Menu */
.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-md);
    }

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

    .hamburger {
        display: block;
    }
}

/* Hero Section */
.hero-section {
    position: relative;
    background-size: cover;
    background-position: center;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-bottom: 60px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(26, 37, 47, 0.4), rgba(26, 37, 47, 0.85));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 20px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    color: #fdfbf7;
}

.hero-desc {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    margin-bottom: 30px;
    opacity: 0.95;
    font-weight: 400;
}

.hero-btns {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 28px;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--accent);
    color: var(--primary);
    border: 2px solid var(--accent);
}

.btn-primary:hover {
    background: transparent;
    color: var(--accent);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
}

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

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

.card-img-wrap {
    position: relative;
    padding-top: 56.25%;
    /* 16:9 */
    overflow: hidden;
    background: #eee;
}

.card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

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

.card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.badge {
    background: var(--primary);
    color: white;
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}



.card-title {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.card-title a {
    color: var(--primary);
}

.card-title a:hover {
    color: var(--secondary);
}

.card-excerpt {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 20px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-cta {
    color: var(--secondary);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: auto;
}

/* Article */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 50px;
}

@media (max-width: 900px) {
    .article-layout {
        grid-template-columns: 1fr;
    }
}

.content-body {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #34495e;
}

.content-body h2 {
    font-size: 1.8rem;
    margin: 40px 0 20px;
    color: var(--primary);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 10px;
    display: inline-block;
}

.content-body p {
    margin-bottom: 20px;
}

/* Sidebar */
.sidebar-desktop {
    position: sticky;
    top: 100px;
}

/* Footer */
.site-footer {
    background: var(--primary);
    color: #ecf0f1;
    padding: 60px 0 30px;
    margin-top: 80px;
}

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

.footer-col h3 {
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col a {
    color: #bdc3c7;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: white;
    text-decoration: underline;
}

/* Search Box */
.search-box {
    position: relative;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid var(--border);
    border-radius: 30px;
    font-size: 1rem;
    transition: border-color 0.2s;
    outline: none;
}

.search-input:focus {
    border-color: var(--primary);
}

/* Filter Chips */
.filter-bar {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 30px;
    justify-content: center;
}

.filter-chip {
    padding: 8px 20px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.9rem;
    white-space: nowrap;
    color: var(--text-light);
    transition: all 0.2s;
}

.filter-chip:hover,
.filter-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Mobile Quick Info */
.mobile-quick-info {
    display: none;
}

@media (max-width: 900px) {
    .mobile-quick-info {
        display: block;
    }

    .sidebar-desktop {
        display: none;
    }
}

/* Pagination */
.pagination {
    user-select: none;
}

.pagination-btn,
.pagination-num {
    transition: all 0.2s ease;
    text-decoration: none;
}

.pagination-btn:hover,
.pagination-num:hover {
    border-color: var(--accent) !important;
    color: var(--primary) !important;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pagination-num.active {
    cursor: default;
}

@media (max-width: 600px) {
    .pagination {
        gap: 4px !important;
    }

    .pagination-btn,
    .pagination-num {
        padding: 8px 12px !important;
        font-size: 0.9rem;
    }
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.footer-bottom a {
    color: var(--accent);
}

/* Accessibility: Focus States */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px;
    z-index: 10000;
}

.skip-link:focus {
    top: 0;
}