/* ---
File: /css/style.css
--- */

/* ------------------- */
/* 1. Global & Setup  */
/* ------------------- */
:root {
    --primary-dark-blue: #1E2761;
    --primary-accent-blue: #408EC6;
    --primary-accent-maroon: #7A2048;
    --text-light: #f5f5f5;
    --text-dark: #212529;
    --background-light: #FFFFFF;
    --border-light: #dee2e6;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-light);
    color: var(--text-dark);
    line-height: 1.7;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

main {
    flex-grow: 1;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3, h4 {
    line-height: 1.3;
    color: var(--primary-dark-blue);
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
p { margin-bottom: 1.25rem; }
a { color: var(--primary-accent-blue); text-decoration: none; transition: color 0.3s ease; }
a:hover { color: var(--primary-accent-maroon); text-decoration: underline; }

/* ------------------- */
/* 2. Header & Nav    */
/* ------------------- */
.main-header {
    background-color: var(--primary-dark-blue);
    color: var(--text-light);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px var(--shadow-color);
}

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

.logo a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-weight: 600;
    font-size: 1.25rem;
    text-decoration: none;
}

.logo-icon {
    width: 35px;
    height: 35px;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.main-nav a {
    color: var(--text-light);
    font-weight: 500;
    text-decoration: none;
    position: relative;
    padding-bottom: 5px;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-accent-blue);
    transition: width 0.3s ease;
}

.main-nav a:hover::after, .main-nav a.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
}

.hamburger {
    width: 25px;
    height: 2px;
    background-color: var(--text-light);
    display: block;
    position: relative;
}

.hamburger::before,
.hamburger::after {
    content: '';
    width: 25px;
    height: 2px;
    background-color: var(--text-light);
    display: block;
    position: absolute;
    transition: all 0.3s ease;
}

.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }


/* ----------------------- */
/* 3. Calculator Section  */
/* ----------------------- */
.calculator-section {
    padding: 4rem 0;
    background-color: var(--primary-dark-blue);
    color: var(--text-light);
    text-align: center;
}

.calculator-section h1 {
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.calculator-section p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 2rem auto;
}

.calculator-result {
    background-color: var(--primary-accent-blue);
    padding: 1.5rem 2rem;
    border-radius: 8px;
    display: inline-block;
    min-width: 300px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.result-date {
    font-size: 2.25rem;
    font-weight: 600;
    color: var(--background-light);
}

/* ------------------- */
/* 4. Content & Article */
/* ------------------- */
.content-section, .article-page {
    padding: 4rem 0;
}

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

.article-content h1 {
    font-size: 2.75rem;
    margin-bottom: 2rem;
}

.article-content blockquote {
    border-left: 4px solid var(--primary-accent-blue);
    margin: 2rem 0;
    padding: 1rem 1.5rem;
    background-color: #f8f9fa;
    font-style: italic;
    font-size: 1.1rem;
}

.highlight {
    background-color: #e3f2fd;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

.data-table {
    width: 100%;
    margin: 2rem 0;
    border-collapse: collapse;
    box-shadow: 0 2px 5px var(--shadow-color);
}

.data-table th, .data-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.data-table th {
    background-color: var(--primary-dark-blue);
    color: var(--text-light);
}

.data-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.article-meta {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 1rem;
}

.sources-list, .related-articles ul {
    list-style-position: inside;
    padding-left: 1rem;
}

.related-articles {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.related-card {
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 1.5rem;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.related-card:hover {
    box-shadow: 0 4px 15px var(--shadow-color);
    transform: translateY(-5px);
}

.related-card h4 {
    font-size: 1.1rem;
    color: var(--primary-accent-maroon);
}

.related-card a {
    text-decoration: none;
    color: inherit;
}

.related-card a::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.related-card p {
    font-size: 0.9rem;
    margin-bottom: 0;
}


/* ------------------- */
/* 5. Footer          */
/* ------------------- */
.main-footer {
    background-color: var(--primary-dark-blue);
    color: var(--text-light);
    padding: 2rem 0;
    text-align: center;
    font-size: 0.9rem;
}

.footer-links {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--text-light);
    opacity: 0.8;
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

.footer-copyright {
    opacity: 0.6;
}

/* ------------------- */
/* 6. Utilities       */
/* ------------------- */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-accent-blue);
    color: var(--text-light);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-size: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, background-color 0.3s;
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-accent-maroon);
    color: var(--text-light);
}

.gdpr-consent {
    position: fixed;
    bottom: 15px;
    left: 15px;
    background-color: #343a40;
    color: var(--text-light);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 1rem;
    transform: translateY(200%);
    transition: transform 0.5s ease-in-out;
}

.gdpr-consent.show {
    transform: translateY(0);
}

.gdpr-consent p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.gdpr-btn {
    background-color: var(--primary-accent-blue);
    color: var(--text-light);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

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

/* ------------------- */
/* 7. Responsive      */
/* ------------------- */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    .article-content h1 { font-size: 2.25rem; }
    .result-date { font-size: 1.75rem; }

    .nav-toggle {
        display: block;
        z-index: 1001; /* Above nav menu */
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%; /* Start off-screen */
        width: 70%;
        height: 100vh;
        background-color: var(--primary-dark-blue);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.5s ease-in-out;
    }
    
    .main-nav.active {
        right: 0;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }
    
    .main-nav a {
        font-size: 1.25rem;
    }
    
    .nav-toggle.active .hamburger {
        background: transparent;
    }
    .nav-toggle.active .hamburger::before {
        transform: rotate(45deg);
        top: 0;
    }
    .nav-toggle.active .hamburger::after {
        transform: rotate(-45deg);
        top: 0;
    }
    
    .gdpr-consent {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
}
