/* =========================
   RESET GENERAL
========================= */

*{
  margin:0;
  padding:0;
  box-sizing:border-box;
  font-family:Arial;
}

html{
  scroll-behavior:smooth;
}

body{
  background:#eeeeee;
  overflow-x:hidden;
}

img{
  max-width:100%;
  display:block;
}


/* =========================
 NAVBAR
========================= */

.navbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:15px 40px;
  background:#083a5b;
  color:white;
  flex-wrap:wrap;
  gap:20px;
}

.logo{
  display:flex;
  align-items:center;
  gap:10px;
}

.logo img{
  width:105px;
}


/* =========================
 NAV LINKS
========================= */

nav{
  display:flex;
  align-items:center;
  gap:20px;
  flex-wrap:wrap;
}

nav a,
.dropdown-btn{
  color:white;
  text-decoration:none;
  font-size:15px;
  position:relative;
  cursor:pointer;
  padding-bottom:5px;
}

/* EFECTO */

nav a::after,
.dropdown-btn::after{
  content:"";
  position:absolute;
  left:0;
  bottom:0;
  width:0%;
  height:2px;
  background:#ffffff;
  transition:width 0.3s ease;
}

nav a:hover::after,
.dropdown-btn:hover::after{
  width:100%;
}


/* =========================
 DROPDOWN
========================= */

.dropdown{
  position:relative;
  display:inline-block;
}

.dropdown-content{
  display:none;
  position:absolute;
  top:120%;
  left:0;
  background:#0d3b5c;
  border-radius:6px;
  min-width:180px;
  overflow:hidden;
  z-index:100;
}

.dropdown-content a{
  display:block;
  padding:10px 15px;
  font-size:14px;
}

.dropdown-content a:hover{
  background:rgba(255,255,255,0.1);
}

.dropdown:hover .dropdown-content{
  display:block;
}


/* =========================
 BANNER
========================= */

.banner{
  position:relative;
  height:300px;
  background:url("FotosIndex/Bomberos.jpg") center/cover no-repeat;
  overflow:hidden;
}

.banner::after{
  content:"";
  position:absolute;
  width:100%;
  height:100%;
  background:rgba(255, 9, 9, 0.6);
  top:0;
  left:0;
}

.banner-texto{
  position:absolute;
  top:50%;
  left:50px;
  transform:translateY(-50%);
  color:white;
  z-index:2;
}

.banner-texto h1{
  font-size:clamp(40px, 7vw, 70px);
  margin-bottom:10px;
}

.banner-texto p{
  font-size:14px;
  letter-spacing:1px;
}


/* =========================
 CONTENEDOR
========================= */

.contenedor{
  display:flex;
  justify-content:center;
  padding:50px 20px;
}


/* =========================
 GRID
========================= */

.grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(140px, 1fr));
  gap:25px;
  width:100%;
  max-width:900px;
}


/* =========================
 TARJETAS
========================= */

.card{
  background:#f5f5f5;
  border-radius:12px;
  padding:20px 15px;
  text-align:center;
  box-shadow:0 3px 8px rgba(0,0,0,0.15);
  cursor:pointer;
  transition:0.3s ease;
  text-decoration:none;
  color:#333;
}

.card:hover{
  transform:translateY(-5px);
  background:#ff0101;
  color:white;
  box-shadow:0 8px 20px rgba(255,0,0,0.3);
}


/* ICONOS */

.card img{
  width:60px;
  margin:0 auto 12px;
  transition:0.3s ease;
}

.card:hover img{
  transform:scale(1.08);
}


/* TEXTOS */

.card h3{
  font-size:15px;
  margin-bottom:6px;
}

.card span{
  font-size:13px;
  display:block;
  line-height:1.5;
}


/* =========================
 CONTACTOS
========================= */

.franja-contactos{
  background-color:#c62828;
  color:white;
  padding:60px 20px;
  text-align:center;
}

.franja-contactos h2{
  margin-bottom:40px;
  font-size:28px;
  letter-spacing:2px;
}

.contenedor-contactos{
  display:flex;
  justify-content:center;
  align-items:flex-start;
  flex-wrap:wrap;
  gap:40px;
}


/* ITEMS */

.contacto-item{
  display:flex;
  align-items:center;
  gap:20px;
  text-align:left;
  max-width:340px;
}

.icono-img{
  width:60px;
  height:auto;
}


/* EMERGENCIA */

.emergencia{
  flex-direction:column;
  text-align:center;
}

.texto-emergencia{
  font-weight:bold;
  letter-spacing:1px;
}


/* EFECTO 911 */

.numero-911 img{
  width:120px;
  margin-top:15px;
  animation:pulso 1.5s infinite;
}


/* =========================
 ANIMACIÓN
========================= */

@keyframes pulso{

  0%{
      transform:scale(1);
      filter:drop-shadow(0 0 0px rgba(255,255,255,0.5));
  }

  50%{
      transform:scale(1.1);
      filter:drop-shadow(0 0 20px rgba(255,255,255,0.9));
  }

  100%{
      transform:scale(1);
      filter:drop-shadow(0 0 0px rgba(255,255,255,0.5));
  }

}


/* =========================
 FOOTER
========================= */

footer{
  background:#111;
  color:white;
  text-align:center;
  padding:25px;
  margin-top:40px;
}


/* =========================
 RESPONSIVE
========================= */

@media(max-width:992px){

  .grid{
      grid-template-columns:repeat(3, 1fr);
  }

}

@media(max-width:768px){

  .navbar{
      flex-direction:column;
      text-align:center;
      padding:20px;
  }

  nav{
      justify-content:center;
  }

  .banner{
      height:240px;
  }

  .banner-texto{
      left:20px;
      right:20px;
  }

  .banner-texto h1{
      font-size:45px;
  }

  .grid{
      grid-template-columns:repeat(2, 1fr);
  }

  .contacto-item{
      flex-direction:column;
      text-align:center;
  }

  .dropdown-content{
      left:50%;
      transform:translateX(-50%);
  }

}

@media(max-width:480px){

  .grid{
      grid-template-columns:1fr;
  }

  .banner{
      height:200px;
  }

  .banner-texto h1{
      font-size:34px;
  }

  .banner-texto p{
      font-size:12px;
  }

}