/* NuevaWebPHP/assets/css/style.css */
:root {
    --color1: #1d5343; /* Verde oscuro primario */
    --color2: #b58500; /* Dorado secundario */
    --color1-light: rgba(29, 83, 67, 0.1);
    --color2-light: rgba(181, 133, 0, 0.1);
    --blanco: #ffffff;
    --negro: #111111;
    --gris-claro: #f8f9fa;
    --gris-oscuro: #555555;
    --font-heading: 'Cinzel', serif;
    --font-body: 'Montserrat', sans-serif;
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    line-height: 1.8;
    color: var(--negro);
    background-color: var(--gris-claro);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color1);
    margin-bottom: 1rem;
    font-weight: normal;
    letter-spacing: 0.05em;
}

a {
    color: var(--color2);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--color1);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Top Bar */
.top-bar {
    background-color: var(--color1);
    color: var(--blanco);
    font-size: 0.85rem;
    padding: 0.5rem 0;
}
.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.top-bar-left, .top-bar-right {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}
.top-bar-left span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.top-bar a {
    color: var(--blanco);
    text-decoration: none;
}
.top-bar a:hover {
    color: var(--color2);
}
.social-icons-top {
    display: flex; align-items: center; gap: 1rem;
}
.lang-switch-top {
    display: flex; align-items: center; gap: 0.5rem;
}
.lang-switch-top img {
    width: 20px; height: 20px; border-radius: 50%; object-fit: cover;
    border: 1px solid rgba(255,255,255,0.3); transition: transform 0.2s;
}
.lang-switch-top a.active img, .lang-switch-top a:hover img {
    border-color: var(--color2); transform: scale(1.1);
}

/* Header */
.main-header {
    background-color: var(--blanco);
    padding: 0.5rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo a {
    display: flex;
    align-items: center;
}

.main-nav {
    display: flex;
    align-items: center;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.main-nav a {
    color: #000000;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--color2);
}

.mobile-extras {
    display: none; /* Oculto en escritorio */
}

/* Controles m\u00f3viles */
.nav-controls {
    display: none; /* Oculto en escritorio */
    align-items: center; gap: 1rem;
}
.mobile-menu-toggle {
    background: none; border: none; color: var(--color1);
    font-size: 1.5rem; cursor: pointer; padding: 0.3rem;
}
.mobile-menu-toggle:hover {
    color: var(--color2);
}

/* Hero Section */
.hero {
    position: relative;
    color: var(--negro);
    text-align: center;
    padding: 8rem 1rem 5rem;
    overflow: hidden;
    min-height: 80vh;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background-color: var(--blanco);
}

.hero-backgrounds {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0;
    isolation: isolate;
}

.hero-backgrounds::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* Degradado sutil: más claro arriba, más oscuro abajo con un levísimo tono corporativo */
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), rgba(10, 25, 20, 0.75));
    z-index: 1;
}

/* La animaci\u00f3n va en el <picture>, no en el <img> */
.hero-backgrounds picture {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: block;
    opacity: 0;
    will-change: transform, opacity;
    transform-origin: center center;
    /* Dos animaciones separadas: zoom y fade - as\u00ed el zoom es 100% lineal y continuo */
    animation:
        kenBurnsZoom 18s linear infinite,
        kenBurnsFade  18s linear infinite;
}

/* El <img> solo ocupa espacio, sin animacion propia */
.hero-bg-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}

.hero-backgrounds picture:nth-child(1) { animation-delay: 0s; }
.hero-backgrounds picture:nth-child(2) { animation-delay: 6s; }
.hero-backgrounds picture:nth-child(3) { animation-delay: 12s; }

/* Zoom-out puro: 2 keyframes, completamente lineal. Imposible que pause. */
@keyframes kenBurnsZoom {
    0%   { transform: translate3d(0, 0, 0) scale(1.25); }
    100% { transform: translate3d(0, 0, 0) scale(1.001); }
}

/* Fade independiente: entra al 6%, visible hasta el 33%, sale al 40% */
@keyframes kenBurnsFade {
    0%   { opacity: 0; }
    6%   { opacity: 1; }
    33%  { opacity: 1; }
    40%  { opacity: 0; }
    100% { opacity: 0; }
}

/* El contenido del hero va encima de las im\u00e1genes */
.hero .container {
    position: relative;
    z-index: 2;
}


.hero h1 {
    color: #ffffff;
    font-weight: 700;
    font-size: 3rem;
    margin-bottom: 0.75rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-weight: 700;
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    font-style: normal;
    color: #ffffff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
}

.hero-anyo {
    display: block;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.3rem;
    font-style: italic;
    letter-spacing: 0.15em;
    color: #ffffff;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
}

/* Botones del hero uno al lado del otro */
.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    padding: 0.85rem 2rem;
    background-color: var(--color1);
    color: var(--blanco);
    border: 2px solid var(--color1);
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    transition: background-color 0.3s, border-color 0.3s, color 0.3s;
}

.btn:hover {
    background-color: var(--color2);
    border-color: var(--color2);
    color: var(--blanco);
}

/* Segundo botón: botón secundario transparente (fantasma) con borde blanco */
.btn-outline-white {
    background-color: transparent;
    border: 2px solid var(--blanco);
    color: var(--blanco);
}

.btn-outline-white:hover {
    background-color: var(--blanco);
    border-color: var(--blanco);
    color: var(--color1);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--color2);
    color: var(--color2);
}

.btn-outline:hover {
    background-color: var(--color2);
    color: var(--blanco);
}

/* Content Sections */
.section-pad {
    padding: 4rem 0;
}

.bg-white {
    background-color: var(--blanco);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

.img-fluid {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

.text-center {
    text-align: center;
}

.section-title {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
}

/* Footer */
.main-footer {
    position: relative;
    background-color: #0e2921;
    background-image: url('../img/Mi.Tierra.bg.bn.png');
    background-repeat: repeat; /* Se repite la trama para cubrir todo */
    background-position: center;
    background-size: cover;
    color: var(--blanco);
    padding: 45px 0 20px;
    overflow: hidden;
}

.footer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(16, 43, 39, 0.45);
    z-index: 1;
}

.main-footer a {
    color: var(--blanco);
    transition: color 0.3s ease;
}

.main-footer a:hover {
    color: var(--color2);
}

/* Main footer content wrapper */
.main-footer-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

/* Footer grid - 4 equal columns, centered with margins */
.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    text-align: left;
    align-items: start;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1.5rem;
}

/* Logo column */
.footer-col-logo img {
    max-width: 160px;
    height: auto;
}

/* Footer text */
.footer-text {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.85);
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
}

.footer-col h4 {
    color: var(--color2);
}

/* Footer h4 override */
.main-footer .footer-col h4 {
    color: var(--blanco);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

/* Footer social icons - white by default, ochre on hover/focus */
.main-footer .footer-col .social-icons-footer a,
.main-footer .footer-col .social-icons-footer a i {
    color: var(--blanco);
    transition: color 0.3s ease;
}

.main-footer .footer-col .social-icons-footer a:hover,
.main-footer .footer-col .social-icons-footer a:focus,
.main-footer .footer-col .social-icons-footer a:hover i,
.main-footer .footer-col .social-icons-footer a:focus i {
    color: var(--color2);
}

/* Secci\u00f3n Inferior del Footer (Fondo verde oscuro s\u00f3lido #091812) */
.below-footer {
    background-color: #091812;
    border-top: 1px solid rgba(0, 0, 0, 0.15);
    padding: 20px 0;
    text-align: center;
}

.below-footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    color: var(--blanco);
}

.below-footer-content div {
    color: var(--blanco);
}

.below-footer-content a {
    color: var(--blanco);
}

.below-footer a:hover {
    color: var(--color2);
}

/* Acceso discreto a la administración de la carta */
.admin-quick-access {
    opacity: 0.22;
    margin-left: 8px;
    color: var(--blanco) !important;
    font-size: 0.8rem;
    transition: opacity 0.3s ease, color 0.3s ease, transform 0.4s ease;
    display: inline-block;
    vertical-align: middle;
}

.admin-quick-access:hover {
    opacity: 1 !important;
    color: var(--color2) !important;
    transform: rotate(45deg);
}

@media (max-width: 992px) {
    .top-bar-left { gap: 0.8rem; font-size: 0.8rem; }
    .top-bar-left span:nth-child(2), .top-bar-left span:nth-child(3) { display: none; }
    .top-bar-right { display: none; }
    
    .nav-controls {
        display: flex;
    }
    
    .main-nav {
        display: none;
        flex-direction: column; 
        width: 100%; 
        position: absolute;
        top: 100%; left: 0; 
        background: var(--blanco);
        padding: 1.5rem; 
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        border-top: 1px solid rgba(0,0,0,0.05);
    }
    
    .main-nav.active {
        display: flex;
    }
    
    .main-nav ul {
        flex-direction: column;
        width: 100%;
        gap: 1.2rem;
    }
    
    .mobile-extras {
        display: flex; 
        flex-direction: column; 
        gap: 1rem;
        margin-top: 1rem; 
        padding-top: 1.5rem;
        border-top: 1px solid rgba(0,0,0,0.1); 
        width: 100%;
        align-items: center;
    }
    
    .social-icons-mobile {
        display: flex; gap: 1.5rem; font-size: 1.3rem;
    }
    .social-icons-mobile a {
        color: var(--color1); text-decoration: none;
    }
    
    .lang-switch-mobile {
        display: flex; gap: 1rem;
    }
    .lang-switch-mobile img {
        width: 32px; height: 32px; border-radius: 50%; object-fit: cover;
        border: 1px solid rgba(0,0,0,0.1);
    }
}

@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-col-logo {
        text-align: center;
    }

    .footer-col-logo img {
        max-width: 180px;
    }

    .social-icons-footer {
        justify-content: center;
    }
}

/* Carrusel Nuestros Especiales (Ancho Completo Edge-to-Edge) */
.carousel-wrapper {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow: hidden;
    padding: 0;
}

.carousel-track {
    display: flex;
    gap: 0;
    width: max-content;
    will-change: transform;
    animation: carouselSlide 36s cubic-bezier(0.25, 1, 0.5, 1) infinite;
}

.carousel-track:hover {
    animation-play-state: paused;
}

/* Exactamente 3 im\u00e1genes en pantalla (cada una ocupa el 33.333% del ancho de la pantalla) */
.carousel-slide {
    width: 33.333vw;
    height: 300px;
    flex-shrink: 0;
    padding: 0 4px;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    box-shadow: none;
    transition: transform 0.3s ease;
}

@keyframes carouselSlide {
    0%, 14% { transform: translateX(0); }
    16.66%, 30.66% { transform: translateX(-33.333vw); }
    33.33%, 47.33% { transform: translateX(-66.666vw); }
    50%, 64% { transform: translateX(-99.999vw); }
    66.66%, 80.66% { transform: translateX(-133.332vw); }
    83.33%, 97.33% { transform: translateX(-166.665vw); }
    100% { transform: translateX(-199.998vw); }
}

@media (max-width: 768px) {
    .carousel-slide {
        width: 100vw;
        height: 250px;
    }
    @keyframes carouselSlide {
        0%, 14% { transform: translateX(0); }
        16.66%, 30.66% { transform: translateX(-100vw); }
        33.33%, 47.33% { transform: translateX(-200vw); }
        50%, 64% { transform: translateX(-300vw); }
        66.66%, 80.66% { transform: translateX(-400vw); }
        83.33%, 97.33% { transform: translateX(-500vw); }
        100% { transform: translateX(-600vw); }
    }
}

/* ========================================== */
/* SCROLL TO TOP, COOKIES & SUMMER POPUP      */
/* ========================================== */

.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--primary-color);
    color: var(--white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}
.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}
.scroll-to-top:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    padding: 20px;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.4s ease-in-out;
}
.cookie-consent.show {
    transform: translateY(0);
}
.cookie-content {
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: center;
    font-size: 0.9rem;
}
.cookie-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
}
.cookie-buttons .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
}
.cookie-link {
    color: var(--primary-color);
    text-decoration: underline;
}



@media (min-width: 768px) {
    .cookie-content {
        flex-direction: row;
        align-items: center;
        text-align: left;
    }
    .cookie-content p {
        flex: 1;
        margin: 0;
    }
}
