/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* Brand Colors */
    --primary: #112250;
    /* Deep Navy Blue (User Request) */
    --primary-dark: #0a1430;
    --secondary: #1a2a5e;
    /* Slightly lighter for Footer/Secondary */
    --accent: #5e72a0;
    /* Muted Blue/Grey for accents */

    /* Neutrals */
    --text: #111827;
    --text-light: #4b5563;
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --border: #e2e8f0;

    /* Interface */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    --max-width: 1024px;
    --header-height: 70px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    color: var(--text);
    background: #DDE6ED;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* View Transition Styles */
@keyframes contrast-in {
    from {
        opacity: 0;
        transform: translateX(40px);
        filter: contrast(0.8);
    }
}

@keyframes contrast-out {
    to {
        opacity: 0;
        transform: translateX(-40px);
        filter: contrast(0.8);
    }
}

::view-transition-old(root) {
    animation: 300ms cubic-bezier(0.4, 0, 0.2, 1) both contrast-out;
}

::view-transition-new(root) {
    animation: 300ms cubic-bezier(0.4, 0, 0.2, 1) both contrast-in;
}

/* Links */
a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* Header */
header {
    background: var(--primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    display: flex;
    align-items: center;
    color: white;
}

.nav-container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Brand / Logo */
.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: white;
    font-family: 'Cinzel', serif;
    /* Cinzel for Brand */
}

.logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: white;
    display: grid;
    place-items: center;
    color: var(--primary);
    font-size: 0.9em;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    /* Keep logo mark simple */
}

/* Nav links */
.nav-links {
    display: flex;
    gap: 1.5rem;
    font-size: 0.95rem;
    position: relative;
    /* Container for the moving underline */
}

.nav-links a {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    text-decoration: none;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #ffffff;
}

/* The dynamic moving underline */
.nav-active-bar {
    position: absolute;
    bottom: -4px;
    height: 2px;
    background: #ffffff;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
    pointer-events: none;
    opacity: 0;
    /* Hidden until JS positions it */
}

/* Layout */
main {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2.5rem 1.5rem 3rem;
}

section {
    margin-bottom: 3rem;
}

/* Typography (Headings) */
h1,
h2,
h3,
h4 {
    font-family: 'Cinzel', serif;
    color: var(--primary);
    margin-top: 0;
}

/* Hero */
.hero {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 3rem;
    align-items: start;
    padding-top: 1.5rem;
    /* Removing CSS background-image to strictly use the inline SVG for robustness */
    position: relative;
    overflow: hidden;
    /* Hero is now text-only container below the map */
    padding: 2rem 0;
    margin-top: 0;
}

/* Full Width Banner Breakout */
.full-width-banner {
    width: 100vw;
    height: 50vh;
    /* 50% viewport height for balanced hero */
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-top: calc(-1 * var(--header-height) - 2.5rem);
    /* Account for header and main padding */
    background-image: url('assets/hero-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    /* Fixed background - parallax effect */
    margin-bottom: 3rem;
}

.hero-bg-illustration {
    display: none;
}

/* Revert text colors since they are now on the neutral page background */
.hero h1,
.hero h2,
.hero h3,
.hero p,
.hero li strong,
.hero .lead {
    color: var(--primary) !important;
    /* Back to brand color */
    text-shadow: none;
}

.hero p,
.hero .lead {
    color: var(--text-light);
}

/* Badge update for light background */
.hero .badge {
    background: rgba(17, 34, 80, 0.08);
    /* Light tint */
    color: var(--primary);
    backdrop-filter: none;
}

.hero-bg-illustration svg {
    /* Keep for cascade but it is hidden now */
    display: none;
}

.badge {
    display: inline-block;
    font-size: 0.85rem;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-full);
    background: rgba(17, 34, 80, 0.08);
    /* Primary tint */
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3rem;
    line-height: 1.1;
    margin: 0 0 1rem 0;
}

h2 {
    font-size: 1.75rem;
    margin: 0 0 1rem 0;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

h3 {
    font-size: 1.25rem;
    margin: 0 0 0.75rem 0;
}

.lead {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* Buttons */
.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.btn-primary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    /* Keep UI elements Inter */
}

/* Primary button */
.btn-primary {
    background: var(--primary);
    color: white;
    border: 1px solid transparent;
    box-shadow: 0 2px 4px rgba(17, 34, 80, 0.2);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* Ghost button */
.btn-ghost {
    background: transparent;
    color: var(--text-light);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: #f8fafc;
}

.hero-note {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 1rem;
}

/* Cards & Panels */
.hero-panel {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
}

.hero-panel h2 {
    font-size: 1.25rem;
    border: none;
    margin-bottom: 1rem;
}

.checklist,
.note-box {
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
    background: var(--bg-alt);
    border: 1px solid var(--border);
}

.section-intro {
    color: var(--text-light);
    max-width: 60ch;
}

/* Lists */
ul,
ol {
    padding-left: 1.25rem;
}

li strong {
    color: var(--text);
}

/* Footer */
footer {
    margin-top: auto;
    border-top: none;
    padding: 3rem 1.5rem;
    text-align: center;
    background: var(--primary);
    /* Use Primary for footer to match header */
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

/* Mobile */
@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding-top: 1rem;
    }

    .nav-links {
        display: none;
    }

    h1 {
        font-size: 2.5rem;
    }
}

/* FAQ Section */
.faq-section h3 {
    font-size: 1.15rem;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.faq-item {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item p {
    color: var(--text-light);
    margin-bottom: 0;
}

/* --- New Components for RUC Page --- */

/* Grid Layouts */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

/* Feature Cards */
.feature-card {
    background: white;
    padding: 1.75rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
    background: var(--bg-alt);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
}

/* Vertical Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
    margin: 2rem 0;
    border-left: 2px solid var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
}

.timeline-marker {
    position: absolute;
    left: -2rem;
    top: 0.25rem;
    width: 1rem;
    height: 1rem;
    background: var(--primary);
    border: 3px solid white;
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 0 1px var(--primary);
}

.timeline-content h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

/* Comparison Table/Cards */
.comparison-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
}

.comparison-col {
    padding: 2rem;
}

.comparison-col.highlight {
    background: var(--bg-alt);
    border-left: 1px solid var(--border);
}

/* Accordion (Details/Summary) */
details.faq-accordion {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    transition: all 0.2s;
}

details.faq-accordion[open] {
    box-shadow: var(--shadow-sm);
    padding-bottom: 1rem;
}

summary.faq-question {
    padding: 0.75rem 1rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    /* Hide default triangle */
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--primary);
}

summary.faq-question::after {
    content: '+';
    font-size: 1.2rem;
    font-weight: 300;
}

details[open] summary.faq-question::after {
    content: '-';
}

.faq-answer {
    padding: 0 1rem 0.5rem;
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    border-top: 1px solid var(--bg-alt);
    margin-top: 0.5rem;
    padding-top: 0.75rem;
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-footer {
    grid-column: 1 / -1;
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
}

/* Mobile Adjustments for new components */
@media (max-width: 768px) {
    .comparison-container {
        grid-template-columns: 1fr;
    }

    .comparison-col.highlight {
        border-left: none;
        border-top: 1px solid var(--border);
    }

    .form-grid {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }
}