/* Sombrerete - Pueblo Mágico Design System */
:root {
    /* Colors */
    --color-cantera: #c27ba0;
    /* Pinkish stone tone */
    --color-cantera-dark: #a05a7d;
    --color-cielo: #1f3c88;
    /* Deep blue */
    --color-text-main: #2c2c2c;
    --color-text-light: #666;
    --color-bg-light: #fdfbf7;
    /* Warm white/cream */
    --color-white: #ffffff;
    --color-gold: #daa520;
    /* Accent */

    /* Typography */
    --font-heading: 'Cinzel', serif;
    --font-body: 'Lato', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);

    /* Dark Mode Variables */
    body.dark-mode {
        --color-bg-light: #121212;
        --color-text-main: #f5f5f5;
        --color-text-light: #b0b0b0;
        --color-white: #1e1e1e;
        --shadow-sm: 0 2px 4px rgba(255, 255, 255, 0.05);
        --shadow-md: 0 4px 8px rgba(255, 255, 255, 0.08);
        --shadow-lg: 0 8px 16px rgba(255, 255, 255, 0.1);
        --color-cielo: #64b5f6;
        /* Lighter blue for dark mode */
        --color-cantera: #d49bb7;
        /* Lighter pink for dark mode */
    }

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--color-text-main);
    margin-left: var(--spacing-sm);
    transition: transform var(--transition-fast);
}

.theme-toggle:hover {
    transform: scale(1.1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg-light);
    color: var(--color-text-main);
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-cielo);
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Layout Utilities */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.grid {
    display: grid;
    gap: var(--spacing-md);
}

.flex {
    display: flex;
    gap: var(--spacing-md);
}

.section {
    padding: var(--spacing-lg) 0;
}

/* Header & Nav */
header {
    background-color: var(--color-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    /* justify-content: space-between; */
    align-items: center;
    padding: var(--spacing-sm) 0;
}

.logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--color-cantera);
    font-weight: 700;
}

.brand-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.weather-widget {
    margin: 0;
    font-size: 0.8rem;
    color: var(--color-text-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.weather-widget span {
    color: var(--color-cielo);
}

.nav-links {
    display: flex;
    gap: var(--spacing-md);
    margin-left: auto;
    margin-right: 1rem;
}

.nav-links a:hover {
    color: var(--color-cantera);
}

/* Header Layout */
.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    /* Remove border */
    padding: 0.3rem 0.8rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--color-text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-fast);
    font-family: var(--font-body);
}

.theme-toggle:hover {
    background-color: var(--color-bg-light);
    transform: translateY(-2px);
    /* box-shadow: var(--shadow-sm); Optional: remove shadow if we want really flat */
}

/* Mobile Menu Button */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    height: 80vh;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../images/hero.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-white);
}

.hero-content h1 {
    font-size: 3.5rem;
    color: #ffffff;
    /* Explicitly set to white */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: var(--spacing-sm);
}

.hero-content p {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto var(--spacing-md);
    color: #ffffff;
    /* Explicitly set to white to ignore theme variable change */
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: var(--color-cantera);
    color: #ffffff;
    /* Explicitly set to white */
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:hover {
    background-color: var(--color-cantera-dark);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid #ffffff;
    /* Explicitly set to white */
    color: #ffffff;
    /* Explicitly set to white */
}

.btn-secondary:hover {
    background-color: #ffffff;
    color: var(--color-cielo);
}

/* Highlights Section */
.highlights-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.card {
    background: var(--color-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-medium);
}

.card:hover {
    transform: translateY(-5px);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-body {
    padding: var(--spacing-md);
}

.card-title {
    font-size: 1.25rem;
    color: var(--color-cielo);
    margin-bottom: var(--spacing-xs);
}

/* Footer */
footer {
    background-color: var(--color-cielo);
    color: var(--color-white);
    text-align: center;
    padding: var(--spacing-md) 0;
    margin-top: var(--spacing-lg);
}

/* Media Queries */
@media (max-width: 768px) {
    .header-controls {
        margin-left: auto;
        margin-right: var(--spacing-sm);
    }

    .nav-links {
        display: none;
        /* Hide for now, will toggle with JS */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--color-white);
        box-shadow: var(--shadow-md);
        padding: var(--spacing-md);
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }
}

/* Carousel Styles */
.carousel {
    position: relative;
    max-width: 100%;
    height: 500px;
    overflow: hidden;
    margin: var(--spacing-lg) 0;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

.carousel-inner {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.carousel-item {
    min-width: 100%;
    height: 100%;
    /* position: absolute; removed to allow flex flow */
}

.carousel-item img {
    /* Use !important to override generic img rules if needed */
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    display: block;
    background-color: #000;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: var(--color-white);
    padding: var(--spacing-md);
    text-align: center;
}

.carousel-caption h3 {
    color: var(--color-gold);
    margin-bottom: 0.5rem;
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    color: var(--color-white);
    border: none;
    font-size: 2rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background 0.3s;
    z-index: 10;
}

.carousel-control:hover {
    background: rgba(0, 0, 0, 0.7);
}

.carousel-control.prev {
    left: 0;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

.carousel-control.next {
    right: 0;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}