:root {
    /* --- Primitives (The Palette) --- */
    --pr-blue-50: #eff6ff;
    --pr-blue-600: #2563eb;
    --pr-blue-700: #1d4ed8;
    
    --pr-slate-50: #f8fafc;
    --pr-slate-100: #f1f5f9;
    --pr-slate-200: #e2e8f0;
    --pr-slate-300: #cbd5e1;
    --pr-slate-600: #475569;
    --pr-slate-900: #0f172a;
    
    --pr-emerald-500: #10b981;
    --pr-amber-100: #fef3c7;
    --pr-amber-500: #f59e0b;
    --pr-white: #FFFFFF;

    /* --- Semantics (The Meaning) --- */
    --bg-main: var(--pr-white);
    --bg-surface: var(--pr-slate-50);
    --bg-surface-alt: var(--pr-slate-100);
    
    --text-main: var(--pr-slate-900);
    --text-muted: var(--pr-slate-600);
    --text-inverse: var(--pr-white);
    
    --color-primary: var(--pr-blue-600);
    --color-primary-dark: var(--pr-blue-700);
    --color-secondary: var(--pr-emerald-500);
    --color-accent: var(--pr-amber-500);
    
    --border-subtle: var(--pr-slate-200);
    --border-default: var(--pr-slate-300);

    /* Legacy compatibility (to be phased out) */
    --primary: var(--color-primary);
    --primary-dark: var(--color-primary-dark);
    --secondary: var(--color-secondary);
    --dark: var(--text-main);
    --light: var(--bg-surface);
    --white: var(--pr-white);
    --gray-100: var(--pr-slate-100);
    --gray-200: var(--pr-slate-200);
    --gray-300: var(--pr-slate-300);
    --gray-600: var(--pr-slate-600);

    /* Effects & Layout */
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --container-padding: 1rem;
    --max-width: 1200px;
    --header-height: 64px;
}

/* --- Dark Mode Support --- */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-main: var(--pr-slate-900);
        --bg-surface: #1e293b;
        --bg-surface-alt: #1e293b;
        
        --text-main: var(--pr-slate-50);
        --text-muted: var(--pr-slate-300);
        
        --color-primary: #60a5fa;
        --border-subtle: #334155;
        
        --white: var(--pr-slate-900); /* For legacy components using --white as bg */
        --dark: var(--pr-slate-50);
    }
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
}

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

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

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

/* Layout Utilities */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.hidden {
    display: none !important;
}

/* Header */
.site-header {
    min-height: var(--header-height);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    z-index: 100;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.logo {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--dark);
    display: flex;
    align-items: center;
}

.logo .highlight {
    color: var(--primary);
}

.main-nav ul {
    display: flex;
    gap: 1.5rem;
    padding: 0.5rem 0;
}

@media (max-width: 768px) {
    .site-header .container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.5rem;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    .main-nav ul {
        justify-content: center;
        gap: 1.25rem;
        padding: 0;
    }
}

.main-nav a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--gray-600);
}

.main-nav a:hover {
    color: var(--primary);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 6rem 1rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(16, 185, 129, 0.05) 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../images/roltrap.jpg') center/cover no-repeat;
    opacity: 0.08;
    z-index: 0;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.hero h1 {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero .tagline {
    font-size: 1.125rem;
    color: var(--gray-600);
    margin-bottom: 2.5rem;
}

/* Compact hero for subpages */
.hero--compact {
    padding: 2rem 1rem;
}

.hero--compact .tagline {
    margin-bottom: 0;
}

/* Dropdown Container */
.dropdown-container {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}

#citySelect {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    border: 1px solid var(--gray-300);
    border-radius: 12px;
    box-shadow: var(--shadow);
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%234B5563'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.5rem center;
    background-size: 1.25rem;
    background-color: var(--white);
    cursor: pointer;
    transition: all 0.2s;
}

#citySelect:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* Cities Grid */
.cities-section {
    padding: 4rem 0;
}

.section-header {
    margin-bottom: 2rem;
    text-align: center;
}

.section-header h2 {
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0;
}

.section-header h2::after {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: var(--primary-dark);
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

.cities-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* Mobile first: 1 column */
    gap: 1.5rem;
}

.city-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.city-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.city-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.city-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-dark);
    position: relative;
    padding-bottom: 0.5rem;
}

.city-name::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary-dark);
    border-radius: 2px;
}

.city-highlight {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-bottom: 1.5rem;
    flex-grow: 1;
    line-height: 1.7;
}

.city-card.hidden {
    display: none;
}

.city-explore-btn {
    text-align: center;
    background-color: var(--light);
    color: var(--dark);
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    width: 100%;
    transition: background-color 0.2s;
}

.city-card:hover .city-explore-btn {
    background-color: var(--primary);
    color: var(--white);
}

.expand-container {
    text-align: center;
    margin-top: 3rem;
}

.btn-secondary {
    background-color: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

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

/* Tips Section */
.tips-section {
    padding: 4rem 0;
    background-color: var(--gray-100);
}

.tips-section h2 {
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: 1.75rem;
    font-weight: 800;
}

.tips-section h2::after {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: var(--primary-dark);
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

.tips-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.tip-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
}

.tip-card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: var(--primary-dark);
}

.tip-card p {
    margin: 0;
    color: var(--gray-600);
    font-size: 0.95rem;
}

.tips-cta {
    text-align: center;
    margin-top: 2rem;
    color: var(--gray-600);
}

.tips-cta a {
    color: var(--primary);
    font-weight: 600;
}

/* Footer */
.site-footer {
    padding: 3rem 0;
    border-top: 1px solid var(--gray-200);
    background: var(--white);
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: var(--gray-600);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--dark);
}

.footer-links span {
    color: var(--gray-300);
    font-size: 0.9rem;
    cursor: default;
}

.copyright {
    color: var(--gray-300);
    font-size: 0.85rem;
    margin: 0;
}

/* Changelog */
.tip-card.changelog-card {
    border-left: none;
}

.changelog-category {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gray-600);
    margin: 1.25rem 0 0.5rem;
}

.changelog-category:first-of-type {
    margin-top: 1rem;
}

.changelog-list {
    margin: 0;
}

.changelog-list li {
    padding: 0.3rem 0 0.3rem 1.25rem;
    position: relative;
    font-size: 0.9rem;
    color: var(--gray-600);
    line-height: 1.5;
}

.changelog-list li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--gray-300);
}

/* Responsive Breakpoints */
@media (min-width: 640px) {
    .cities-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tips-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .hero h1 {
        font-size: 3.5rem;
    }

    .cities-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Lucide Icons */
.lucide {
    display: inline-block;
    vertical-align: -0.2em;
    width: 1.1em;
    height: 1.1em;
    flex-shrink: 0;
}
.travel-alarm-icon .lucide {
    width: 2.5rem;
    height: 2.5rem;
    display: block;
    margin: 0 auto;
}