/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Calibri;
}
body{
    z-index: 0;
    position: relative;
    background-color: #eeeeee;
    padding: 0;
    margin: 0;
    overflow-x: hidden;
}

/* Navbar base */
.navbar {
    background-color: #1E3A8A;
    z-index: 10;
    color: black;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    position: relative;
    flex-direction: row;
    box-sizing: border-box;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.30);



}

.logo {
    max-width: 300px;
    margin-right: 5rem;
    margin-left: 3rem;
}

.menu-checkbox {
  display: none; /* Oculta el checkbox */
}

.menu-icon {
  font-size: 1.8rem;
  cursor: pointer;
  display: none; /* Oculta por defecto */
}

/* Menú enlaces */
.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
    justify-self: center;
    margin:auto;

}

.nav-links li a {
    position: relative;
    display: inline-block;
    color: #ffffff;
    text-decoration: none;
    padding: 10px;
    transition: transform 0.2s ease, background-color 0.2s ease,color 0.2s ease ;
    font-size: clamp(18px,1vw,20px);
    font-weight: bold;
    transform-origin: center;
    z-index: 0;
    border-radius: 15px;
}
.nav-links li a:hover {
    background-color: #ffffff;
    transform: scale(1.1);
    color: #000000;
    z-index: 1;
}
.nav-links li{
    color: white;
    text-decoration: none;
    padding: 10px;

}
/*a*/
    .banner {
        max-width: 100%;
        flex-shrink: 0;
        box-sizing: border-box;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
        margin-bottom: 0;



    }
    .banner-track{
        display: flex;
        transition: transform 0.5s ease;
        margin-bottom: 0;
    }
    #banner-section{
        max-width: 100%;
        overflow:hidden;
        position: relative;
        margin-bottom: 0;
    }
    /*Banner buttons*/
    .banner-btns-container{
        position: absolute;
        bottom: 10%;
        margin-left: auto;
        margin-right: auto;
        width: 100%;
        align-items: center;
        justify-items: center;
        justify-content: center;
        align-content: center;
        display: flex;
        margin-bottom: 0;
    }
    .banner-buttons{
        display: none;
        margin-left: .2rem;
        margin-right: .2rem;
        align-self: center;
        justify-self: center;
        width: clamp(15px,5vw,20px);
        height: clamp(15px,5vw,20px);
    }
    .dots{
        position: absolute;
        bottom: 4%;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.4rem;
    }
    .dot {
        width: 15px;
        height: 15px;
        border-radius: 50%;
        background: #ddd;
        cursor: pointer;
        transition: background 0.3s ease, transform 0.3s ease, margin-left 0.3s ease, margin-right 0.3s ease,opacity 0.3s ease;
        margin-left: .2rem;
        margin-right: .2rem;
        opacity: .5;
    }
    .dot:hover{
        transform: scale(1.8);
        opacity: .8;
        margin-right: 0.4rem;
        margin-left: 0.4rem;
    }
    #b-btn1:checked ~ .banner-track {
        transform: translateX(0);
    }
    #b-btn2:checked ~ .banner-track {
        transform: translateX(-100%);
    }
    #b-btn3:checked ~ .banner-track {
        transform: translateX(-200%);
    }
    #b-btn4:checked ~ .banner-track {
        transform: translateX(-300%);
    }
    #b-btn5:checked ~ .banner-track {
        transform: translateX(-400%);
    }
    #b-btn1:checked ~ .dots label[for="b-btn1"],
    #b-btn2:checked ~ .dots label[for="b-btn2"],
    #b-btn3:checked ~ .dots label[for="b-btn3"],
    #b-btn4:checked ~ .dots label[for="b-btn4"],
    #b-btn5:checked ~ .dots label[for="b-btn5"] {
        background: #111;
    }
.titulo{
    font-size: 64px; margin-left:8rem; margin-top: 0rem; color: #ffffff;align-self:center;
}
.fondo-titulo{
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.40);background:linear-gradient(45deg,#E91E63,#E91E63,#ec407a);
    width: 65%;
    height: 10rem;
    margin-top:3rem;
    border-bottom-right-radius: 40px;
    display:flex;

}
/*cards-section*/

#cards-section{
    margin-left: 1rem;
    margin-right: 1rem;
    position: relative;
    height: auto;
    margin-top: 4rem;
    display: block;
    margin-bottom: 4rem;

    justify-items: center;
    justify-content: center;

    padding-bottom: 2rem;

}
.cards-container{
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-items: center;
    justify-content: center;
}
.card {
    position: relative;
    padding: 1.5rem;
    flex: 0 1 clamp(380px, 25%, 400px);
    height: 200px;
    /*height: clamp(360px, 20%, 380px);*/
    box-sizing: border-box;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.40);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;

    background: linear-gradient(135deg, #6A1B9A,#8E24AA,#6A1B9A);
    transition: transform 0.2s ease-in-out;
}

/* Gradiente encima */
.card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #1976D2, #1976D2, #6A1B9A);
    background-size: 200% 200%;
    background-position: 0% 50%;
    opacity: 0;
    border-radius: inherit;
    transition:
        opacity 0.8s ease-in-out,
        background-position .6s ease-in-out,
        transform 0.8s ease-in-out;;
    z-index: 0;

}

/* Hover: el gradiente se mueve y aparece */
.card:hover::before {
    opacity: 1;
    background-position: 100% 50%;
}
.card:hover{
        transform: scale(1.1);
    transition: transform 0.2s ease-in-out;
}

/* Contenido visible encima del gradiente */
.card > * {
    position: relative;
    z-index: 1;
}
.card h1{
    color: #ffffff;
    transition: color ease-in-out .5s;
    margin: auto;
}
.card h1:hover{
    color: #ffffff;

}
.icons{
    max-height:80%;
    margin: auto;
    color: #ffffff;
}

/*timeline section*/
#timeline{
    margin-left: 4rem;
    margin-right: 4rem;
    position: relative;

    margin-top: 2rem;
    margin-bottom: 2rem;
    display: flex;
    justify-items: center;
    justify-content: center;
    height: auto;
}
.timeline-card{
    width: clamp(300px,90%,1000px);
    border-radius: 8px;
    padding: .5rem;
    background-color: #ffffff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
.timeline-card h1{
    font-size: clamp(24px,2vw,36px);
    font-weight: bold;
    margin-bottom: 2rem;
    text-align: center;
}
.timeline-card-content{
    display: flex;
    flex-wrap: wrap;
}
.timeline-card-content p{
    padding: 1rem;
    max-width: 50%;
    font-size: clamp(16px,1vw,22px);
}
.timeline-image{
    width: clamp(250px,50%,600px);
    padding: 1rem;
    border-radius: 8%;
}
/*Emergencias*/

#emergencias{
    background-color: #ffffff;
    display:flex;
    flex-wrap:wrap;
    width:100%;
    justify-content: center;
    align-items: center;
    padding:2rem;
    gap: 4rem;
    box-sizing: border-box;
    box-shadow: 0 -4px 8px rgba(0, 0, 0, .20);
}
#emergencias h2{
    font-size: clamp(24px,6vw,48px);
}
   .emergencias-contenedor{

        display:flex;
        justify-items:center;
        justify-content:center;
        justify-self:center;
        align-items:center;
        gap: 2rem;
        flex-wrap: wrap;



    }
.banner-informacion{
    max-height:8rem;
}
   emergencia-imagenes{

   }

/*informacion*/

#informacion{
    background:linear-gradient(0deg,#1E3A8A,#1976D2);
    display: flex;
    padding-top: 2rem;
    padding-bottom:2rem;
    gap: 20rem;
    display: flex

}
.contenedor-informacion{
    display: flex; gap:1rem;  gap:2rem; justify-content:center;width:100%;flex-wrap:wrap;justify-items:center
    padding:1rem
}
.contenedor-texto{
    margin-bottom:1rem
}
.contenedor-int-texto{
    display:flex;gap:1rem;padding:1rem
}
.icono{
    max-height:2rem; fill: #ffffff
}
.titulo-texto-informacion{
    color:#ffffff
}
.texto-informacion{
    color:#ffffff
}

/* --- Responsive --- */
@media (max-width: 860px) {

    .menu-icon {
        display: block;
        transition: transform 0.17s ease-out;
    }
    .logo{
        max-width: 300px;
        width: 300px;
        margin-right: .2rem;
    }

    .nav-links {
        background-color: #fafafa;
        flex-direction: column;
        width: 100%;
        position: absolute;

        z-index: -1;
        transform: translateY(-1000px);
        top: 100%;
        left: 0;
        gap: 20px;
        align-items: center;
        justify-items: center;
        transition: transform 1s ease,opacity 0.5s ease;
        opacity: 0;

    }

    .nav-links li a {
        color: #000;
        text-decoration: none;
        padding: 10px;
        font-size: x-large;
    }

  /* Cuando el checkbox está activado, mostrar el menú */
    .menu-checkbox:checked + .menu-icon + .nav-links {
        pointer-events: all;
        display: flex;
        transform: translateY(0);
        background-color: #fafafa;
        height: 460px;
        opacity: 1;
        transition: transform 0.4s ease,opacity 0.3s ease;

    }

    .menu-checkbox + .menu-icon{

        transform: rotate(0deg);
    }
    .menu-checkbox:checked + .menu-icon{
        transform: rotate(90deg)
    }


    .nav-links li {
        border-top: 1px solid #444;

    }
    #banner-section{
        z-index: -10;
        position: relative;
    }
    .banner {
        max-width: 100%;
        z-index: -2;
        position: relative;
    }
    .dots{
        display: none;
    }
    /*card-section*/
    .card{
        flex: 0 1 clamp(400px, 60%, 800px);
    }

    /*timeline-section*/

    .timeline-card h1{
        font-size: clamp(24px,2vw,36px);
        font-weight: bold;
        margin-bottom: .5rem;
        text-align: center;
    }
    .timeline-card-content{

        justify-content: center;
    }
    .timeline-card-content p{
        padding: 1rem;
        max-width: 100%;
        font-size: clamp(16px,1vw,22px);
        text-align: center;
    }
    .timeline-image{
        width: clamp(325px,90%,600px);
        padding: 1rem;
        border-radius: 8px;

    }
    .titulo{
        font-size: 64px; margin-left:4rem; margin-top: 0rem; color: #ffffff
    }
    .fondo-titulo{
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.40);background:linear-gradient(45deg,#E91E63,#E91E63,#ec407a);
        width: 90%;
        height: 10rem;
        margin-top:3rem;
        border-bottom-right-radius: 40px
    }
    .icono{
        max-height:3rem; fill: #ffffff;
    }
    .titulo-texto-informacion{
        color:#ffffff;
        font-size: 40px;

    }
    .texto-informacion{
        color:#ffffff;
        font-size: 32px;
        padding:1rem
    }
    .contenedor-int-texto{
        align-text:center;
        justify-content:center;
    }
    .contenedor-informacion{
        justify-content:center;
        align-items:center;
        text-align:center;
        padding: 0.5rem
    }
}
