:root {
  --brand-1: #017fba;
  --brand-2: #05517e;
  --brand-3: #002d55;
  --yellow: #ffe600;
  --muted: #6b6b6b;
  --bg: #f7f9fb;
  --card: #ffffff;
  --radius: 12px;
  --container: 1200px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  background: var(--bg);
  color: #222;
  scroll-behavior: smooth;
}

/* ===== HEADER ===== */
header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: linear-gradient(90deg, var(--bg) 0.2%, var(--brand-2) 40%);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.253);
  overflow: hidden;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

header.hidden { opacity: 0; transform: translateY(-100%); }

header::before {
  content: "";
  position: absolute;
  top: 0; right: -20%;
  width: 70%; height: 100%;
  background: rgba(255,255,255,0.08);
  transform: skewX(-25deg);
  z-index: 0;
}

.navbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container);
  margin: 0 auto;
  padding: 10px 24px;
}

.brand img { height: 120px; width: auto; object-fit: contain; }

nav ul {
  display: flex; gap: 24px; list-style: none; margin: 0; padding: 0;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
}

nav a::after {
  content: "";
  position: absolute;
  bottom: -4px; left: 0;
  width: 0%; height: 2px;
  background: var(--yellow);
  transition: width 0.3s ease;
}

nav a:hover { color: var(--yellow); }
nav a:hover::after { width: 100%; }

.cta {
  background: var(--yellow);
  color: var(--brand-3);
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  transition: background 0.3s;
}

.cta:hover { background: #fff06a; }
.mobile-nav-toggle { display: none; font-size: 1.8rem; color: #fff; background: none; border: none; cursor: pointer; }


/* Fuente y estilo uniforme para todos los títulos de secciones */
.titulo-seccion,
#normatividad h2,
#visitanos h2,
#nuestro-servicio h2,
#contactanos h2 {
    font-family: 'Poppins', sans-serif; /* o la que uses en Contáctanos */
    font-weight: 700;
    font-size: 2rem;
    color: var(--brand-1);
    margin-bottom: 30px;
    text-align: center;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('../img/revision.webp') center/cover no-repeat;
  filter: brightness(0.6);
  z-index: 1;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(1,127,186,0.5), rgba(5,81,126,0.7));
  z-index: 2;
}
.hero-content {
  position: relative;
  z-index: 3;
  max-width: 800px;
  padding: 20px;
}
.hero h1 { font-size: 3.5rem; }
.hero p { font-size: 1.2rem; color: #eaf7ff; }

.secondary-cta { padding:10px 16px;border-radius:10px;background:#eef6fb;color:var(--brand-2);text-decoration:none;font-weight:700; }

/* ===== QUIÉNES SOMOS ===== */
#quienes {
  position: relative;
  text-align: center;
  padding: 80px 0;
  color: #222;
  background: url("../img/cdasc.jpg") center/cover no-repeat;
  overflow: hidden;
}

#quienes::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(254, 254, 254, 0.616);
  z-index: 0;
}

#quienes .wrap {
  position: relative;
  z-index: 1;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}

#quienes h2 {
  color: var(--brand-1);
  font-size: 2.5rem;
  margin-bottom: 40px;
}

.mision-vision {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: center;
  margin-bottom: 60px;
}

.card-mv {
  background: var(--bg);
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  flex: 1;
  min-width: 280px;
  max-width: 520px;
  transition: transform 0.3s;
}

.card-mv:hover { transform: translateY(-6px); }
.card-mv img { width: 250px; margin-bottom: 15px; }
.card-mv h3 { color: var(--brand-2); margin-bottom: 10px; }
.card-mv p { color: var(--muted); line-height: 1.6; }

/* Carrusel */
.carousel {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.carousel img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: none;
  animation: fade 1.2s ease;
}

.carousel img.active {
  display: block;
}

@keyframes fade {
  from { opacity: 0; transform: scale(1.03); }
  to { opacity: 1; transform: scale(1); }
}

.frase {
  text-align: center;
  font-size: 1.4rem;
  color: var(--brand-2);
  font-weight: 600;
  margin-top: 40px;
}
/* ------------------------------
      NUESTRO SERVICIO
------------------------------ */
.servicio {
  padding: 60px 20px;
  background: #f7f7f7;
  text-align: center;
}

.section-title {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--brand-1);
  margin-bottom: 10px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: #444;
  margin-bottom: 40px;
}

/* TARJETAS ORIGINALES */
.servicios-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 25px;
  max-width: 1100px;
  margin: auto;
}

.servicio-box {
  background: #fff;
  padding: 25px;
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
  transition: .3s;
}

.servicio-box:hover {
  transform: translateY(-4px);
}

.servicio-box img {
  width: 80px;
  margin-bottom: 10px;
}

.servicio-box h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--brand-2);
}

.servicio-box p {
  color: #555;
}

/* NUEVAS TARJETAS */
.servicios-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 35px;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.servicio-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: .3s ease;
  padding-bottom: 20px;
}

.servicio-card:hover {
  transform: translateY(-6px);
}

.servicio-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}

.servicio-card h3 {
  font-size: 1.5rem;
  margin: 15px 0 8px;
  color: var(--brand-2);
}

.servicio-card p {
  color: #555;
  padding: 0 15px;
}

.btn-servicio {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 22px;
  background: var(--brand-1);
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  transition: .3s;
}

.btn-servicio:hover {
  background: var(--brand-2);
}

.btn-mas-info {
  display: inline-block;
  background: linear-gradient(90deg, #017fba, #002d55);
  color: #fff;
  padding: 12px 26px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition: 0.3s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.btn-mas-info:hover {
  background: linear-gradient(90deg, #019ae0, #00437c);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.25);
}

.btn-soat-cotizar {
    background: #25D366; /* Verde WhatsApp */
    color: white;
    padding: 14px 26px;
    border-radius: 14px;
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    transition: all 0.25s ease;
}

.btn-soat-cotizar:hover {
    background: #1ebe57;
    transform: translateY(-2px);
}



.stats { margin-top: 60px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; text-align: center; }

.stat-item { background: rgba(255,255,255,0.9); border-radius: var(--radius); box-shadow: 0 6px 18px rgba(12,30,60,0.08); padding: 24px; transition: transform 0.3s; }
.stat-item:hover { transform: translateY(-5px); }

.stat-number { font-size: 2.2rem; font-weight: 800; color: var(--brand-3); margin-bottom: 8px; }

.stat-item img { width: 70px; height: auto; animation: relojPulse 2s infinite ease-in-out; }
@keyframes relojPulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.08); opacity: 0.9; } }

#normatividad {
    padding: 70px 24px;
    text-align: center;
}

#normatividad h2 {
    font-size: 2rem;
    margin-bottom: 30px;
}

.lista-normas {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.norma {
    background: #ffffff;
    padding: 12px 18px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 5px solid #002D55;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: 0.3s ease;
}

.norma:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.norma h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: #002D55;
    text-align: left;
}

.btn.pdf {
    padding: 6px 14px;
    background: #002D55;
    color: white !important;
    font-size: 0.85rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s ease;
}

.btn.pdf:hover {
    background: #00498a;
}


.doc-card { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 4px 12px rgba(0,0,0,0.08); transition: transform .3s; }
.doc-card:hover { transform: translateY(-6px); }
.doc-card img { width: 60px; height: auto; margin-bottom: 10px; transition: transform .3s; }
.doc-card:hover img { transform: scale(1.1); }
.doc-card h4 { color: var(--brand-2); margin-bottom: 10px; font-weight: 600; }
.actions { display: flex; justify-content: center; gap: 10px; margin-top: 10px; }

.btn { border: none; cursor: pointer; padding: 8px 14px; border-radius: 6px; font-weight: 600; text-decoration: none; transition: 0.3s; }
.btn.view { background: var(--brand-1); color: #fff; }
.btn.download { background: var(--brand-2); color: #fff; }
.btn:hover { opacity: 0.8; }

.pdf-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.pdf-container {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  max-width: 90%;
  max-height: 90%;
  overflow: auto;
  position: relative;
}

.pdf-container canvas {
  width: 100%;
  height: auto;
}

.pdf-controls {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.pdf-controls button {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  background: #007bff;
  color: #fff;
  cursor: pointer;
}

.closeBtn {
  position: absolute;
  top: 10px;
  right: 16px;
  font-size: 24px;
  cursor: pointer;
}

#pdf-canvas { width: 100%; height: auto; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.closeBtn { position: absolute; top: 10px; right: 14px; background: none; border: none; font-size: 28px; cursor: pointer; color: #333; }

#visitanos { position: relative; background: url("img/fondo-visitanos.jpg") center/cover no-repeat; padding: 80px 0; text-align: center; color: #002d55; }
#visitanos::before { content: ""; position: absolute; inset: 0; background: rgba(255, 255, 255, 0.6); z-index: 0; }
#visitanos .wrap { position: relative; z-index: 1; }

.map-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; margin-top: 50px; }
.map-card { background: rgba(255, 255, 255, 0.9); border-radius: 16px; box-shadow: 0 6px 16px rgba(0,0,0,0.1); padding: 20px; transition: transform 0.3s; }
.map-card:hover { transform: translateY(-5px); }
.map-card h3 { color: var(--brand-2); margin-bottom: 12px; }
.map-card p { font-size: 0.95rem; color: #333; margin-top: 8px; }

/* SECCIÓN CONTACTO */
#contactanos {
  padding: 80px 24px;
  text-align: center;
}

.titulo-seccion {
  font-size: 2rem;
  margin-bottom: 30px;
  font-weight: 700;
  color: var(--brand-1);
}

/* CONTENEDOR */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 1100px;
  margin: auto;
  align-items: start;
}

@media (max-width: 900px) {
  .contact-container {
    grid-template-columns: 1fr;
  }
}

/* FORMULARIO */
#contactForm {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 30px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.form-group {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.form-group label {
  font-weight: 600;
  margin-bottom: 6px;
}

#contactForm input,
#contactForm textarea {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-family: inherit;
}

#contactForm textarea {
  resize: vertical;
  min-height: 120px;
}

/* COLUMNA DERECHA */
.info-contacto {
  background: #ffffff;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  text-align: left;
}

.info-contacto h3 {
  margin-bottom: 12px;
  font-size: 1.4rem;
  color: var(--brand-1);
}

.info-contacto ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 25px;
}

.info-contacto li {
  margin-bottom: 8px;
  font-size: 1rem;
}

/* BOTÓN WHATSAPP */
.btn-whatsapp {
  display: block;
  width: 100%;
  background: #25D366;
  color: #fff;
  text-align: center;
  padding: 14px;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  transition: 0.2s ease-in-out;
}

.btn-whatsapp:hover {
  background: #1ebe5d;
  transform: translateY(-2px);
}
/* Botón flotante de WhatsApp */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background-color: #25D366;
    color: #fff;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: background 0.3s;
    cursor: pointer;
    text-decoration: none;
}

.whatsapp-float:hover {
    background-color: #1ebe57;
}

.whatsapp-float i {
    font-size: 28px;
}


footer { background: linear-gradient(180deg, var(--brand-2), #022a46); color: #fff; padding: 40px 24px; text-align: center; }
/* TODO: Insert full CSS */ 
body { font-family: Arial; }

/* ============================
   OPTIMIZACIÓN PARA CELULARES
   ============================ */
@media (max-width: 768px) {

  /* HEADER */
  .navbar {
    padding: 8px 14px;
  }

  .brand img {
    height: 70px;   /* antes 120px */
  }

  nav ul {
    display: none;  /* ocultamos menú normal */
  }

  .mobile-nav-toggle {
    display: block;
  }

  /* HERO */
  .hero {
    height: 60vh; /* antes 85vh */
  }

  .hero h1 {
    font-size: 2rem;
    line-height: 1.2;
  }

  .hero p {
    font-size: 1rem;
  }

  /* QUIENES SOMOS */
  #quienes {
    padding: 40px 0;
  }

  .card-mv img {
    width: 180px;
  }

  .mision-vision {
    flex-direction: column;
  }

  /* CARRUSEL */
  .carousel img {
    height: 260px;
  }

  /* SERVICIOS */
  .servicios-container,
  .servicios-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .servicio-card img {
    height: 150px;
  }

  /* ESTADISTICAS */
  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .stat-number {
    font-size: 1.6rem;
  }

  /* NORMATIVIDAD */
  .norma {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .norma h4 {
    font-size: 0.9rem;
  }

  /* VISÍTANOS */
  .map-grid {
    grid-template-columns: 1fr;
  }

  iframe {
    height: 220px !important;
  }

  /* CONTACTO */
  .contact-container {
    grid-template-columns: 1fr;
    padding: 0 10px;
  }

  #contactForm,
  .info-contacto {
    padding: 20px;
  }

  /* BOTÓN WHATSAPP FLOTANTE */
  .whatsapp-float {
    width: 55px;
    height: 55px;
    bottom: 18px;
    right: 18px;
  }

  .whatsapp-float i {
    font-size: 24px;
  }

  /* FOOTER */
  footer {
    padding: 30px 14px;
  }

}
