@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Merriweather:ital,wght@0,300;0,400;0,700;1,300&display=swap');

:root {
    --bg-body: #ffffff;
    --bg-gray: #f3f4f6;
    --bg-dark: #1e3a8a;
    /* Deep Trust Blue */

    --primary: #1e3a8a;
    --primary-light: #3b82f6;
    --accent: #0d9488;
    /* Teal */
    --accent-hover: #0f766e;

    --text-main: #1f2937;
    --text-muted: #4b5563;
    --text-white: #ffffff;

    --border: #e5e7eb;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

    --radius-sm: 6px;
    --radius-md: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Plus Jakarta Sans', sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--primary);
    line-height: 1.25;
}

h1 {
    font-family: 'Merriweather', serif;
    font-weight: 900;
}

h2 {
    font-family: 'Merriweather', serif;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

ul {
    list-style: none;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header & Nav */
.header-top {
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.navbar {
    background: white;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-family: 'Merriweather', serif;
    font-weight: 900;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    color: var(--accent);
}

.nav-menu {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-link {
    font-weight: 600;
    color: var(--text-main);
    font-size: 1rem;
}

.nav-link:hover {
    color: var(--accent);
}

.start-btn {
    background: var(--accent);
    color: white;
    padding: 10px 24px;
    border-radius: 99px;
    font-weight: 700;
    transition: background 0.2s;
}

.start-btn:hover {
    background: var(--accent-hover);
}

/* Quick Access Bar */
.quick-access-bar {
    background: var(--bg-gray);
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
}

.quick-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.quick-link-item {
    background: white;
    border: 1px solid var(--border);
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.2s;
}

.quick-link-item:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Hero */
.hero {
    background: linear-gradient(rgba(30, 58, 138, 0.9), rgba(15, 23, 42, 0.95)), url('images/hero-bg.png');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 120px 0 140px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 24px;
    color: white;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero p {
    font-size: 1.25rem;
    color: #cbd5e1;
    max-width: 600px;
    margin: 0 auto 48px;
}

.hero-btn {
    background: var(--accent);
    color: white;
    padding: 16px 48px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
}

.hero-btn:hover {
    background: var(--accent-hover);
}

/* Section Styles */
.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.section-sub {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
}

/* Editorial Grid */
.editorial-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.featured-article {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.article-img {
    height: 400px;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 3rem;
}

.article-content {
    padding: 40px;
}

.article-tag {
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1px;
    margin-bottom: 12px;
    display: block;
}

.article-title {
    font-size: 2rem;
    margin-bottom: 16px;
    color: var(--text-main);
}

.article-excerpt {
    color: var(--text-muted);
    margin-bottom: 24px;
    font-size: 1.1rem;
}

.read-more {
    color: var(--primary);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Sidebar List */
.sidebar-list {
    background: var(--bg-gray);
    padding: 30px;
    border-radius: var(--radius-md);
}

.sidebar-title {
    font-size: 1.25rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}

.sidebar-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.sidebar-item:last-child {
    border: none;
}

.sidebar-link {
    font-weight: 600;
    font-size: 1.05rem;
    display: block;
    margin-bottom: 6px;
}

.sidebar-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Comparison Table (Light) */
.table-container {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

th {
    background: var(--bg-gray);
    padding: 16px 24px;
    text-align: left;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

td {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
}

tr:last-child td {
    border: none;
}

.rank-circle {
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.score-pill {
    background: #ecfdf5;
    color: #047857;
    padding: 4px 12px;
    border-radius: 99px;
    font-weight: 700;
    font-size: 0.9rem;
}

.btn-table {
    background: var(--accent);
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-table:hover {
    background: var(--accent-hover);
}

/* Footer */
footer {
    background: var(--primary);
    color: white;
    padding: 80px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h4 {
    color: white;
    margin-bottom: 24px;
    font-family: 'Merriweather', serif;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col a {
    color: #bfdbfe;
    font-size: 0.95rem;
}

.footer-col a:hover {
    color: white;
    text-decoration: underline;
}

@media (max-width: 900px) {
    .editorial-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Comparison Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-container {
    background: white;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-gray);
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.close-modal {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-muted);
}

.close-modal:hover {
    color: var(--primary);
}

.modal-body {
    padding: 30px;
}

/* Product Selector */
.product-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
}

.selector-item {
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    background: white;
}

.selector-item:hover {
    border-color: var(--primary-light);
}

.selector-item.selected {
    border-color: var(--accent);
    background: #ecfdf5;
}

.selector-item img {
    height: 60px;
    object-fit: contain;
    margin-bottom: 10px;
}

.selector-item h4 {
    font-size: 0.9rem;
    margin: 0;
    color: var(--text-main);
}

.selector-check {
    position: absolute;
    top: 8px;
    right: 8px;
    color: var(--accent);
    display: none;
}

.selector-item.selected .selector-check {
    display: block;
}

#compareBtn:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.7;
}

.back-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-btn:hover {
    color: var(--primary);
}

/* Comparison Table */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
    padding: 16px;
    border: 1px solid var(--border);
    text-align: center;
}

.comparison-table th {
    background: var(--bg-gray);
    color: var(--text-muted);
    width: 25%;
}

.comparison-table td {
    width: 37.5%;
    /* Split remaining space */
    vertical-align: top;
}

.comparison-table .feature-check {
    color: var(--accent);
}

.comparison-table .feature-cross {
    color: #ef4444;
}

.comparison-logo {
    height: 50px;
    margin-bottom: 10px;
}

@media (max-width: 600px) {

    .comparison-table th,
    .comparison-table td {
        padding: 10px;
        font-size: 0.9rem;
    }

    .selector-item img {
        height: 40px;
    }
}