* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Barra de navegación */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #1B213C;
    padding: 10px 20px;
    color: white;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 100;
    border-bottom: 1px solid #ededed;
}


body {
    padding-top: 60px; /* Ajusta según la altura del navbar */
}

h1, h2 {
    font-family: "bricolage grotesque", sans-serif;
}

h1 {
    font-size: 50px;
}

h3 {
    color: #ededed;
    opacity: 0.6;
}

p, a, h3 {
    font-family: "lato", sans-serif;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 100px;
    margin-right: 10px;
}

.social-links a {
    color: white;
    text-decoration: none;
    margin-left: 15px;
    font-size: 18px;
    margin-right: 25px;
    background-color: transparent;
}

.social-links img {
    filter: brightness(0) invert(1);
}

.social-links a:hover{
    transform: scale(1.2);
    transition: transform 0.3s ease;
}

/* Header con imagen de fondo */
.header-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}


/* Slider con transición de deslizamiento */
.slider {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.show-full-width {
    background-size: contain !important;
    background-repeat: no-repeat;
    background-position: bottom;
    background-color: #ededed;
}

.slide.show-full-width::before,
.slide.show-full-width::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 15%; /* Ancho del área difuminada */
    z-index: 1;
}

/* Difuminado lado izquierdo */
.slide.show-full-width::before {
    left: 0;
    background: linear-gradient(90deg, rgba(27,33,60,0.8) 0%, rgba(27,33,60,0) 100%);
}

/* Difuminado lado derecho */
.slide.show-full-width::after {
    right: 0;
    background: linear-gradient(270deg, rgba(27,33,60,0.8) 0%, rgba(27,33,60,0) 100%);
}

.slide {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 1s ease-in-out, opacity 0.5s ease-in-out;
    transform: translateX(100%);
    opacity: 0;
    z-index: 1;
}

.slide.active {
    transform: translateX(0);
    opacity: 1;
    z-index: 2;
}

.slide.exiting {
    transform: translateX(-100%);
    opacity: 0;
}



@media (max-width: 768px) {
    .desktop-only {
        display: none;
    }
    
    .mobile-only {
        display: block;
    }
}

.header-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    z-index: 2;
    padding-top: 65px;
}

.header-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: -1;
}

.header-content p {
    opacity: 0.5;
    font-size: 20px;
}

.contenido {
    padding: 50px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    background-color: #ededed; /* Fallback para imagen */
    position: relative; /* Necesario para el pseudo-elemento */
    z-index: 1; /* Asegura que el contenido interno esté sobre el fondo */
}

/* Capa de fondo con imagen */
.contenido::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url(images/fondopasto.jpg) ; /* Ruta a tu imagen */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.9; /* Ajusta la transparencia (0.1 a 0.3 para fondos discretos) */
    z-index: -1; /* Envía al fondo */
    pointer-events: none; /* Permite interacción con el contenido */
    background-attachment: fixed
}

.seccion {
    width: 80%;
    max-width: 600px;
    background: #1B213C;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
}

.seccion h2 {
    color: #ededed;
}

.seccion p {
    color: #ededed;
    opacity: 0.6;
}

/* Reemplaza los estilos existentes del botón ver más con estos */
.btn-vermas {
    background: none;
    border: none;
    color: #ededed;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 15px;
    padding: 5px;
    position: relative;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-vermas::after {
    content: "▾"; /* O "⌄" */
    /* ... */
    display: inline-block;
    margin-left: 8px;
    transition: transform 0.3s ease;
    font-size: 1.5em; /* Tamaño aumentado */
    line-height: 1;
}

.btn-vermas[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

.btn-vermas:hover {
    color: #00AFEF;
}

.btn-vermas:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 175, 239, 0.3);
}

.seccion a:hover {
    color: #1B213C; /* Texto azul al hacer hover */
    background-color: white; /* Fondo blanco al hacer hover */
    border-color: #1B213C; /* Mantiene el borde azul */
}



/* Estilos para el carrusel de actividades */
.carrusel-actividades {
    padding: 50px 20px;
    background-color: #f5f5f5;
    text-align: center;
    position: relative;
}

.carrusel-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    aspect-ratio: 16/9;
}

.slide-actividad {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: flex;
    flex-direction: column;
    min-height: 300px;
}

.slide-actividad.active {
    opacity: 1;
    position: relative;
}

.slide-actividad img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex-grow: 1;
    max-height: 80vh; /* Limita altura máxima de la imagen */
    margin-bottom: 0;
    object-fit: cover;
}

.epigrafe, .epigrafe-memoria {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(27, 33, 60, 0.95); /* Fondo más opaco para mejor legibilidad */
    color: white;
    padding: 1px;
    font-family: "Lato", sans-serif;
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: center;
    box-sizing: border-box;
    
    /* Propiedades clave para mostrar TODO el texto */
    white-space: normal;
    overflow: visible;
    max-height: none;
    text-overflow: clip;
    display: block;
    
    /* Asegura que el texto esté siempre visible */
    z-index: 100;
    transform: none !important; /* Anula cualquier transform que pueda estar ocultando el texto */
}

@media (max-width: 768px) {
    .epigrafe, .epigrafe-memoria {
        font-size: 0.85rem;
        padding: 10px 12px;
        min-height: 12vh;
    }

    .carrusel-container {
        height: 48vh;
        max-width: 350px;
    }
}


/* Controles mejorados */
.carrusel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.7);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1B213C;
}

.carrusel-btn:hover {
    background: rgba(255,255,255,0.9);
    transform: translateY(-50%) scale(1.1);
}

.anterior {
    left: 25px;
}

.siguiente {
    right: 25px;
}

/* Indicadores mejorados */
.indicadores-actividades {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.indicadores-actividades .indicador {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: all 0.3s;
}

.indicadores-actividades .indicador.active {
    background: #07a910; /* Verde corporativo */
    transform: scale(1.2);
    box-shadow: 0 0 5px rgba(7, 169, 16, 0.5); /* Sutil brillo */
}

/* Responsive */
@media (max-width: 768px) {
    .epigrafe,
    .epigrafe-memoria {
        padding: 10px;
        font-size: 1rem;
    }
    
    /* Ajustes para dispositivos móviles */
    .carrusel-container {
        aspect-ratio: 4/3;
    }
    
    .carrusel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}


.texto-corto, .texto-completo {
    overflow: hidden;
    transition: 
    max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s ease;
}

.texto-corto {
    max-height: 1000px; /* Valor inicial mayor que cualquier texto corto */
    opacity: 1;
}

.texto-completo {
    max-height: 0;
    opacity: 0;
}

.texto-corto.oculto {
    max-height: 0 !important;
    opacity: 0;
}

.texto-completo.visible {
    max-height: var(--max-height-dinamico); /* Usaremos JS para esto */
    opacity: 1;
}


a {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 15px;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
}

.footer {
    background: #1B213C;
    color: white;
    text-align: center;
    padding: 30px 20px;
}

.redes {
    display: flex;
    justify-content: center;
    gap: 45px;
    margin-bottom: 15px;
}

.redes img {
    width: 40px;
    transition: transform 0.3s ease;
    filter: brightness(0) invert(1);
}

.redes a:hover img {
    transform: scale(1.2);
}


a, .btn-contacto {
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-contacto {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 12px 0;
    padding: 12px 24px;
    background: transparent;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    border: 2px solid white;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(0); /* Estado inicial */
    position: relative; /* Para que la animación sea suave */
}

.btn-contacto:hover {
    background: 
        linear-gradient(135deg, 
            rgba(58, 158, 77, 0.9) 0%, 
            rgba(46, 125, 50, 0.9) 100%),
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect fill="%232e7d32" width="100" height="100"/><path fill="%233a9e4d" d="M0 0 L100 0 L100 10 L0 10 Z M0 20 L100 20 L100 30 L0 30 Z M0 40 L100 40 L100 50 L0 50 Z M0 60 L100 60 L100 70 L0 70 Z M0 80 L100 80 L100 90 L0 90 Z"/></svg>');
    background-size: 100% 100%, 20px 20px;
    border-color: white;
    transform: translateY(-2px); /* Levanta 2px al hacer hover */
    box-shadow: 0 4px 8px rgba(7, 169, 16, 0.2); /* Sombra más pronunciada */
}

.btn-contacto:active {
    transform: translateY(1px); /* Efecto de "presionado" */
    box-shadow: 0 1px 2px rgba(7, 169, 16, 0.3);
}

/* Versión con ícono */
.btn-contacto::before {
    content: "✉️";
    margin-right: 8px;
    font-size: 1.1rem;
    transition: transform 0.3s ease; /* Animación adicional para el ícono */
}

.btn-contacto:hover::before {
    transform: translateY(-1px); /* El ícono también sube ligeramente */
}

#contactoBtn-seccion {
    margin-top: 5px;
}

.credito {
    font-size: 12px;
    margin-top: 15px;
    opacity: 0.7;
}

/* Transición suave para la animación */
.seccion {
    opacity: 0;
    transform: translateY(30px);
    transition: 
        opacity 0.6s cubic-bezier(0.25, 0.1, 0.25, 1),
        transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.seccion.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Pequeño delay escalonado para cada sección */
.seccion:nth-child(1) { transition-delay: 0.1s; }
.seccion:nth-child(2) { transition-delay: 0.2s; }
.seccion:nth-child(3) { transition-delay: 0.3s; }
.seccion:nth-child(4) { transition-delay: 0.4s; }
.seccion:nth-child(5) { transition-delay: 0.5s; }

/* Optimización para celulares */
@media (max-width: 768px) {
    .header h1 {
    font-size: 2.5rem;
    }
    
    .header-content h2 {
    font-size: 1.8rem;
    }
    
    .seccion {
    width: 95%;
    }
    
    .navbar {
    flex-direction: column;
    padding: 10px;
    }
    
    .social-links {
    margin-top: 10px;
    }
    
    .social-links a {
    margin: 0 8px;
    }

    .btn-contacto {
        padding: 10px 18px;
        font-size: 0.9rem;
    }

    .logo img {
        height: 70px;
    }
    
    .header-content h1 {
        font-size: 2rem;
    }
    
    .seccion {
        width: 80%;
        padding: 20px 5px 20px 5px;
    }
    
    .btn-contacto {
        padding: 10px 15px;
    }

    .redes {
        gap: 20px;
    }
}

@media (max-width: 768px), (hover: none) {
    .contenido::before {
        background-attachment: scroll; /* Móviles y dispositivos táctiles */
        background-size: cover; /* Asegura cobertura total */
        opacity: 0.9; /* Mayor transparencia para mejor contraste */
    }
}
