*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
    height: 100%;
    padding: 0;
    margin: 0 auto;
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    background-color: #faf9f8;
    scroll-behavior: smooth;
}

img {
    width: 100%;
}

p {
    font-size: 1.2rem;
    color: #262626;
    text-align: justify;
    text-indent: 30px; 
}

h1 {
    margin: 1.9rem auto;
    font-size: 2rem;
    color: #74392d;
    text-align: center;
}

h2 {
    font-size: 1.7rem;
    color: #262626;
    text-align: center;
}

h3 {
    font-size: 1.5rem;
    color: #262626;
    text-align: justify;
}

h4 {
    font-size: 1.2rem;
    color: #262626;
    text-align: justify;
}

/* Sin decoración en todos los enlaces y sus estados */
a, a:hover, a:focus, a:visited, a:active {
    text-decoration: none !important;
}

hr {
    border: 0;
    border-top: 1px solid #b04636;
}

.activo {
    color: #656565;
}

.parr_cero {
    font-size: 1.2rem;
    color: #262626;
    text-align: left;
    text-indent: 0; 
}

.colorv {
    color: #487a17;
}

/* Header & Menu */

header {
    width: 100%;
    background-color: #FFF;
    position: fixed;
    z-index: 9999;
}

#btn-menu {
    display: none;
}

header label {
    display: none;
    width: 30px;
    height: 30px;
    padding: 10px;
    border-right: 1px solid #FFF;
}

header label:hover {
    cursor: pointer;
    background: rgba(0, 0, 0, 0.3);
}

main {
    width: 100%;
    clear: both;
}

.menu ul {
    margin: 0;
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: flex-end;
}

.menu ul li {    
    border-left: 1px solid #FFF;
    font-size: 1.2rem;
    margin: 0;
}

.menu ul li:hover {
    background: rgba(0, 0, 0, 0.3);    
}

.menu ul li a {
    display: block;
    padding: 15px 20px;
    color: #343434;
}

/* Secciones de contenido */

#logo {
    width: 30%;
    margin: 0 auto;
}

.contenido {
    width: 100%;
    display: block;
    margin: 0 auto;
    align-items: center;
}

.principal {
    display: block;
    width: 64%;
    float: left;
    padding: 0 0 0 15px;
}

.principal img {
    width: 100%;
    margin: 0 auto;
}

.lateral {
    display: block;
    width: 34%;
    float: right;
    padding: 0 15px 0 0;
    margin-bottom: 15px;
}

.contenido-lateral {
    width: 100%;
    background-color: #f0f0f0;
    border-radius: 15px;
    padding: 20px;
}

.contenido-lateral img {
    display: block;
    width: 80%;
    margin: 0 auto;
    max-width: 420px;
}

/* Footer */

footer {
    display: flex;
    clear: both;
    color: #FFFFFF;
    background-color: #b04636;
    justify-content: space-around;
}

.pie-pagina {
    display: block;
    width: 30%;
    padding: 30px;
    text-align: justify;
}

.pie-color {
    color: #FFFFFF;
}

/* Carrusel de imágenes */

.carrusel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    display: block;
    border-radius: 4px;
}

.carrusel-slide {
    position: relative !important; /* Mantiene la referencia fija para el texto */
    display: none;
    width: 100%;
}

.carrusel-slide.active {
    display: block !important;
    animation: fadeIn 0.8s ease-in-out;
}

.carrusel-slide img {
    width: 100%;
    height: auto;
    display: block;
}

/* Capa de texto sobrepuesta sobre las imágenes */

.carrusel-texto {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 90%;
    max-width: 1000px;
    text-align: center;
    color: #ffffff;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.85);
    background: rgba(0, 0, 0, 0.35);
    padding: 15px 20px;
    border-radius: 8px;
    box-sizing: border-box;
    z-index: 10;
    pointer-events: none;
}

.carrusel-texto h2 {
    color: #ffffff;
    font-size: clamp(1.2rem, 2.5vw, 2.4rem);
    margin: 0 0 6px 0;
    text-align: center;
    font-weight: 700;
    line-height: 1.2;
}

.carrusel-texto h3 {
    color: #f0f0f0;
    font-size: clamp(1rem, 1.8vw, 1.7rem);
    margin: 0 0 6px 0;
    text-align: center;
    font-weight: 400;
    line-height: 1.2;
}

.carrusel-texto h4 {
    color: #e0e0e0;
    font-size: clamp(0.85rem, 1.3vw, 1.2rem);
    margin: 0;
    text-align: center;
    font-weight: 300;
    line-height: 1.2;
}

@keyframes fadeIn {
    from { opacity: 0.3; }
    to { opacity: 1; }
}

/* Responsive / Media Queries */

@media screen and (max-width: 768px) {
    #ban_sup {
        padding-top: 50px; /* Evita que el header fijo sobreponga el carrusel */
    }

    header label {
        display: block;     
        width: 50px;
        height: 50px;
        padding: 10px;
    }
    
    p {
        font-size: 0.8rem;
    }

    h1 {
        margin: 1rem auto;
        font-size: 1.2rem;
    }

    h2 {
        font-size: 1.1rem;
    }

    h3 {
        font-size: 1rem;
    }

    #logo {
        width: 60%;
    }
    
    .principal, .lateral {
        width: 100%;
        padding: 15px;
        margin-bottom: 15px;
    }
    
    footer {
        display: block;
    }
    
    .pie-pagina {
        width: 80%;
        padding: 15px;
        margin: 0 auto;
        font-size: 0.8rem;
    }
    
    .pie-pagina h4, 
    .pie-pagina p {    
        font-size: 0.8rem;
    }

    #imagen_ban_sup {
        padding-top: 40px;
    }
    
    .menu {
        position: absolute;
        background-color: #884839;
        width: 70%;
        margin-left: -70%;
        transition: all 0.5s;
    }
        
    .menu ul {
        flex-direction: column;
    }
    
    .menu ul li {
        border-top: 1px solid #FFF;
    }
    
    .menu ul li a {
        color: #fff;
    }
    
    #btn-menu:checked ~ .menu {
        margin: 0;
        z-index: 9999;
        text-align: center;
    }

    /* Ajuste responsivo de los textos del carrusel en móviles */
    .carrusel-texto {
        width: 92%;
        padding: 6px 10px;
    }

    .carrusel-texto h2 {
        font-size: clamp(0.85rem, 3.8vw, 1.2rem) !important;
        margin: 0 0 2px 0 !important;
        line-height: 1.15;
    }

    .carrusel-texto h3 {
        font-size: clamp(0.75rem, 2.8vw, 0.95rem) !important;
        margin: 0 0 2px 0 !important;
        line-height: 1.15;
    }

    .carrusel-texto h4 {
        font-size: clamp(0.65rem, 2.2vw, 0.8rem) !important;
        margin: 0 !important;
        line-height: 1.15;
    }
}