/* ======== GENERAL STYLES ======== */
:root {
    --primary-color: #0a4a2a; /* Verde oscuro inspirado en las montañas */
    --secondary-color: #e4c590; /* Beige/Dorado por el café y la tradición */
    --text-color: #333;
    --light-bg: #f9f9f9;
    --white-color: #fff;
    --font-primary: 'Montserrat', sans-serif;
    --font-secondary: 'Playfair Display', serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-family: var(--font-secondary);
    color: var(--primary-color);
}

h2 {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 40px;
    position: relative;
}

h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--secondary-color);
    margin: 10px auto 0;
}

section {
    padding: 80px 0;
}

/* ======== HEADER ======== */
header {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../img/header-bg.jpg') no-repeat center center/cover;
    height: 100vh;
    color: var(--white-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    transition: background 0.3s;
}

nav .logo {
    font-family: var(--font-secondary);
    font-size: 1.8rem;
    font-weight: bold;
}

nav .nav-links {
    list-style: none;
    display: flex;
}

nav .nav-links li {
    margin: 0 20px;
}

nav .nav-links a {
    color: var(--white-color);
    text-decoration: none;
    font-size: 1rem;
    font-weight: bold;
    transition: color 0.3s;
}

nav .nav-links a:hover {
    color: var(--secondary-color);
}

.maps-container {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 50px;
    display: flex;
    align-items: center;
}

.maps-container span {
    margin-right: 15px;
    font-size: 0.9rem;
}

.maps-buttons a {
    color: var(--white-color);
    text-decoration: none;
    margin: 0 8px;
    padding: 5px 10px;
    border-radius: 20px;
    background: rgba(0,0,0,0.3);
    transition: background 0.3s;
}

.maps-buttons a:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
}

.header-content h1 {
    font-size: 5rem;
    color: var(--white-color);
    margin-bottom: 20px;
}

.header-content p {
    font-size: 1.5rem;
}

/* ======== ABOUT SECTION ======== */
#about {
    background: var(--light-bg);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

.about-text h2 {
    text-align: left;
    margin-bottom: 20px;
}
.about-text h2::after {
    margin: 10px 0 0;
}

.about-image {
    flex: 1;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* ======== HISTORIA SECTION ======== */
#historia {
    background: var(--white-color);
}

.historia-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
    font-size: 1.1rem;
}

.historia-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.historia-card {
    background: var(--light-bg);
    padding: 30px;
    border-radius: 15px;
    border-left: 5px solid var(--primary-color);
}

.historia-card h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

/* ======== LIST CONTAINER (Hoteles, Restaurantes, etc.) ======== */
.list-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.list-item {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    background: var(--white-color);
}

.list-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.15);
}

.list-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.list-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.item-content {
    padding: 25px;
}

.item-content h3 {
    font-size: 1.6rem;
    margin-bottom: 10px;
}

.rating {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-bottom: 10px;
}

/* ======== SPECIFIC SECTION STYLES ======== */
#hoteles { background: var(--light-bg); }
#restaurantes { background: var(--white-color); }
#recreacion { background: var(--light-bg); }

/* ======== FOOTER ======== */
footer {
    background: var(--primary-color);
    color: var(--white-color);
    text-align: center;
    padding: 20px 0;
}


/* ======== ESTILOS PARA LA TARJETA "AGREGAR SITIO" ======== */

.list-item.add-site {
    background: #f0f7f4; /* Un verde muy pálido */
    border: 2px dashed var(--primary-color);
    box-shadow: none;
    transition: background 0.3s, border-color 0.3s;
}

.list-item.add-site:hover {
    background: #e6f0ec;
    border-color: #0d6b3a;
    transform: translateY(0); /* Anula el efecto de levantar */
    box-shadow: none;
}

.list-item.add-site a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    min-height: 320px; /* Ajusta la altura mínima para que sea consistente */
}

.add-site-content {
    text-align: center;
}

.plus-icon {
    font-size: 8rem; /* Tamaño del signo de suma */
    font-weight: 300;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 15px;
    transition: transform 0.3s;
}

.list-item.add-site:hover .plus-icon {
    transform: scale(1.1);
}

.add-site-content span {
    font-family: var(--font-primary);
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--primary-color);
}

/* ======== CSS ADICIONAL PARA OPTIMIZACIÓN MÓVIL ======== */

/* Estilos para el botón de hamburguesa (inicialmente oculto en desktop) */
.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--white-color);
    margin: 5px;
    transition: all 0.3s ease;
}

/* Oculta el contenedor de mapas para móvil en su posición original */
.maps-container-mobile {
    display: none;
}


/* MEDIA QUERIES PARA DISPOSITIVOS MÓVILES */
@media screen and (max-width: 1024px) {
    /* Ocultamos los botones de mapas en la barra superior en pantallas medianas */
    .maps-container {
        display: none;
    }
    /* Y los mostramos en la lista de navegación para que aparezcan en el menú móvil */
    .maps-container-mobile {
        display: block;
        padding: 20px;
    }
    .maps-container-mobile .maps-container {
        display: flex;
        flex-direction: column;
        background: none;
        padding: 0;
        align-items: flex-start;
    }
    .maps-container-mobile span {
        margin-bottom: 15px;
        font-size: 1.1rem;
    }
    .maps-container-mobile .maps-buttons {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
     .maps-container-mobile .maps-buttons a {
        margin: 0;
        padding: 8px 15px;
     }
}


@media screen and (max-width: 768px) {
    /* ==== Optimizaciones de Header y Navegación ==== */
    nav {
        padding: 15px 25px;
    }

    .nav-links {
        position: fixed;
        right: 0px;
        top: 0px;
        height: 100vh;
        background-color: var(--primary-color);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 70%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
    }

    .nav-links.nav-active {
        transform: translateX(0%);
    }

    .nav-links li {
        opacity: 0;
        margin: 20px 0;
    }

    .nav-links a {
        font-size: 1.2rem;
    }

    .burger {
        display: block; /* Muestra el botón de hamburguesa */
    }

    /* Animación para el menú */
    @keyframes navLinkFade {
        from {
            opacity: 0;
            transform: translateX(50px);
        }
        to {
            opacity: 1;
            transform: translateX(0px);
        }
    }
    /* Animación para el botón hamburguesa */
    .toggle .line1 {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    .toggle .line2 {
        opacity: 0;
    }
    .toggle .line3 {
        transform: rotate(45deg) translate(-5px, -6px);
    }


    /* ==== Optimizaciones de Bienvenida ==== */
    .header-content h1 {
        font-size: 2.8rem; /* Reducimos el tamaño del título principal */
    }
    .header-content p {
        font-size: 1.2rem; /* Reducimos el tamaño del subtítulo */
    }
    
    /* ==== Optimizaciones de la sección About ==== */
    .about-content {
        flex-direction: column-reverse; /* Cambia la dirección a columna, imagen arriba */
        gap: 30px;
    }

    .about-text h2 {
        text-align: center; /* Centra el título en móvil */
    }

    .about-text h2::after {
        margin: 10px auto 0; /* Centra la línea decorativa */
    }

    /* ==== Ajustes generales para títulos de sección ==== */
    h2 {
        font-size: 2.2rem;
    }
}


/* ======== HEADER ======== */
header {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../img/header-bg.jpg') no-repeat center center/cover;
    height: 100vh;
    color: var(--white-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    transition: background 0.3s;
}

nav .logo {
    font-family: var(--font-secondary);
    font-size: 1.8rem;
    font-weight: bold;
}

nav .nav-links {
    list-style: none;
    display: flex;
    margin-left: auto; /* Empuja los links al centro/izquierda */
}

nav .nav-links li {
    margin: 0 20px;
}

nav .nav-links a {
    color: var(--white-color);
    text-decoration: none;
    font-size: 1rem;
    font-weight: bold;
    transition: color 0.3s;
}

nav .nav-links a:hover {
    color: var(--secondary-color);
}

/* Contenedor de mapas para ESCRITORIO */
.maps-container-desktop {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    margin-left: 40px; /* Espacio entre los links y los botones de mapas */
}

.maps-container-desktop span {
    margin-right: 15px;
    font-size: 0.9rem;
}

.maps-container-desktop .maps-buttons a {
    color: var(--white-color);
    text-decoration: none;
    margin: 0 8px;
    padding: 5px 10px;
    border-radius: 20px;
    background: rgba(0,0,0,0.3);
    transition: background 0.3s;
}

.maps-container-desktop .maps-buttons a:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
}

.header-content h1 {
    font-size: 5rem;
    color: var(--white-color);
    margin-bottom: 20px;
}

.header-content p {
    font-size: 1.5rem;
}

/* Ocultar la versión móvil de los mapas por defecto */
.maps-item-mobile {
    display: none;
}


/* ======== ESTILOS MÓVILES Y RESPONSIVE ======== */

/* Botón de hamburguesa (oculto en desktop) */
.burger {
    display: none;
    cursor: pointer;
    margin-left: 20px;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--white-color);
    margin: 5px;
    transition: all 0.3s ease;
}

/* Pantallas de tablet y portátiles pequeños (1024px o menos) */
@media screen and (max-width: 1024px) {
    /* Ocultamos los botones de mapas del escritorio */
    .maps-container-desktop {
        display: none;
    }

    /* Posicionamos la navegación para que se deslice */
    .nav-links {
        position: fixed;
        right: 0px;
        top: 0px;
        height: 100vh;
        background-color: var(--primary-color);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 60%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
        margin-left: 0;
    }
    
    .nav-links li {
        opacity: 0;
        margin: 15px 0;
    }

    /* Mostramos el botón hamburguesa */
    .burger {
        display: block;
    }

    /* Mostramos y estilizamos los mapas para el menú móvil */
    .maps-item-mobile {
        display: block;
        padding: 15px 0;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        margin-top: 15px;
    }
    .maps-item-mobile span {
        font-weight: bold;
        margin-bottom: 15px;
        display: block;
        color: var(--secondary-color);
    }
    .maps-item-mobile .maps-buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
}

/* Pantallas de celular (768px o menos) */
@media screen and (max-width: 768px) {
    .nav-links {
        width: 70%; /* Hacemos el menú un poco más ancho en celulares */
    }

    /* Optimizaciones de Bienvenida */
    .header-content h1 {
        font-size: 2.8rem;
    }
    .header-content p {
        font-size: 1.2rem;
    }

    /* Optimizaciones de la sección About */
    .about-content {
        flex-direction: column-reverse;
        gap: 30px;
    }
    .about-text h2 {
        text-align: center;
    }
    .about-text h2::after {
        margin: 10px auto 0;
    }
}


/* Clase que activa el menú móvil con JS */
.nav-active {
    transform: translateX(0%);
}

/* Animación para los ítems del menú móvil */
@keyframes navLinkFade {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0px);
    }
}

/* Animación para el icono de hamburguesa */
.toggle .line1 {
    transform: rotate(-45deg) translate(-5px, 6px);
}
.toggle .line2 {
    opacity: 0;
}
.toggle .line3 {
    transform: rotate(45deg) translate(-5px, -6px);
}