/* ============================= */
/* 🎨 VARIABLES DE COLORES */
/* ============================= */
:root {
  --primary: #0f4c81;
  --secondary: #1C69A8;
  --accent: #f59e0b;
  --light: #f9fafb;
  --dark: #1e293b;
  --text-light: #e2e8f0;
  --danger: #d32f2f;
  --whatsapp: #25d366;
  --whatsapp-hover: #1ebe57;
}

/* ============================= */
/* 🔄 RESET Y BASE */
/* ============================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Poppins', sans-serif;
  background: var(--light);
  color: var(--dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }

/* ============================= */
/* 📦 UTILIDADES */
/* ============================= */
.container {
  width: 100%;
  max-width: 1200px;
  margin: auto;
  padding: 20px;
}
.muted { color: #6b7280; }
.small { font-size: .9rem; }
h1, h2, h3, h4 { font-weight: 700; color: var(--secondary); letter-spacing: -0.5px; }
p { color: var(--secondary); }

/* Botones */
.btn {
  display: inline-block;
  padding: .8rem 1.4rem;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  transition: all .3s ease, box-shadow .3s ease;
  box-shadow: 0 4px 12px rgba(15,76,129,.3);
}
.btn:hover {
  background: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(245,158,11,.4);
}
.btn-maps {
  padding: 12px 24px;
  background: #007bff;
  color: white;
  border-radius: 8px;
  font-weight: 500;
  transition: background .3s ease;
}
.btn-maps:hover { background: #0056b3; }

/* ============================= */
/* 🖼️ HEADER */
/* ============================= */
.header-bg {
  position: relative;
  height: 600px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}
.portada-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.header-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 1100px;
  padding: 0 1rem;
}
.header-content h1 {
  font-size: 2.8rem;
  margin-bottom: .6rem;
  color: var(--accent);
}
.header-content p {
  font-size: 1.1rem;
  color: var(--text-light);
}

/* ============================= */
/* 📌 NAV */
/* ============================= */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .8rem 1rem;
  background: var(--secondary);
  flex-wrap: wrap;
}
.nav .logo {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.nav .logo img { height: 70px; }
.nav .logo span {
  font-size: 1.3rem;
  font-weight: 700;
  color: #f1f5f9;
}
.nav a {
  color: var(--text-light);
  font-size: .95rem;
  font-weight: 500;
}
.nav a:hover { color: var(--accent); }
.nav-links { display: flex; gap: 1rem; }

/* Contact info (cabecera) */
.contact-info {
  display: flex;
  flex-direction: column;
  font-size: .8rem;
  color: var(--text-light);
  margin-left: 1rem;
  text-align: right;
}

/* Social icons */
.social-icons {
  display: flex;
  gap: .5rem;
  font-size: 1.2rem;
  margin-left: 1rem;
}
.social-icons a { color: #f1f5f9; transition: color .3s ease; }
.social-icons a:hover { color: var(--accent); }

/* ============================= */
/* 🏗️ SECCIONES */
/* ============================= */
section.variant {
  margin: 2rem 0;
  padding: 1.2rem;
  border-radius: 30px;
  background: white;
  box-shadow: 0 6px 40px rgba(0,0,0,.05);
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 1.5rem;
  align-items: center;
}
.hero h2 {
  font-size: 1.9rem;
  margin: .5rem 0;
  color: var(--primary);
}
.hero p { color: #4b5563; }
.hero aside {
  background: var(--light);
  border-radius: 12px;
  padding: 1rem;
}

/* Grid */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

/* Card */
.card {
  background: white;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 4px 14px rgba(0,0,0,.06);
  transition: .3s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,.1);
}

/* Galería */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 8px;
}
.gallery img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 10px;
}

/* ============================= */
/* 📑 FORMULARIOS */
/* ============================= */
form {
  background: #fff;
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0,0,0,.05);
  max-width: 600px;
  margin: 0 auto;
}
form input, form textarea, form select {
  width: 100%;
  padding: .7rem 1rem;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  margin-top: .6rem;
  font-family: 'Poppins', sans-serif;
  font-size: .95rem;
  transition: border-color .3s ease, box-shadow .3s ease;
}
form input:focus, form textarea:focus, form select:focus {
  border-color: var(--secondary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(28,105,168,.2);
}
form textarea { min-height: 100px; resize: vertical; }
form button {
  margin-top: 1rem;
  background: var(--primary);
  color: #fff;
  padding: .8rem 1.4rem;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: background .3s ease;
}
form button:hover { background: var(--accent); }

/* ============================= */
/* 📍 UBICACIÓN - MAPA */
/* ============================= */
.ubicacion-container-full { width: 100%; text-align: center; }
.ubicacion-titulo { font-weight: 600; margin: 1rem 0; font-size: 1.8rem; color: #333; }
.ubicacion-texto { color: #555; margin-bottom: 1rem; font-size: 1rem; }
.ubicacion-mapa-full { width: 100%; height: 300px; }
.ubicacion-mapa-full iframe { width: 100%; height: 100%; border: 0; }

/* Dirección */
.direccion {
  background: #f9fafb;
  border-radius: 12px;
  padding: 25px;
  text-align: left;
  color: #1e293b;
  width: 100%;
  box-sizing: border-box;
}
.direccion h4 {
  color: #1a73e8;
  margin-bottom: 0.8rem;
  font-size: 1.2rem;
}
.direccion p { margin: .4rem 0; font-size: .95rem; }
.direccion a {
  display: inline-block;
  margin-top: .5rem;
  color: #1a73e8;
  font-weight: 500;
}
.direccion a:hover { text-decoration: underline; }

/* ============================= */
/* ⚡ WHATSAPP FLOTANTE */
/* ============================= */
.whatsapp-container {
  position: fixed;
  bottom: 30px;
  right: 20px;
  z-index: 2000;
}
.whatsapp-float {
  width: 80px;
  height: 80px;
  background-color: var(--whatsapp);
  color: #fff;
  border-radius: 80%;
  font-size: 28px;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .3s ease, background-color .3s ease;
  animation: floatPulse 3s ease-in-out infinite;
}
.whatsapp-float:hover { transform: scale(1.1); background-color: var(--whatsapp-hover); }

.whatsapp-options {
  position: absolute;
  bottom: 70px;
  right: 0;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  width: 240px;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.whatsapp-options.show { display: flex; animation: fadeInUp .3s ease; }
.whatsapp-options a {
  padding: 12px 15px;
  color: #333;
  font-size: .9rem;
  border-bottom: 1px solid #f0f0f0;
  transition: background .2s ease;
}
.whatsapp-options a:hover { background: #f9fafb; color: var(--whatsapp); }
.whatsapp-options a:last-child { border-bottom: none; }

/* Animaciones */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes floatPulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* ============================= */
/* 🦶 FOOTER */
/* ============================= */
footer {
  background: #0f172a;
  color: var(--text-light);
  padding: clamp(1rem, 2vw, 1.5rem);
  margin-top: 2rem;
  text-align: center;
  font-size: clamp(.8rem, 2vw, .9rem);
  line-height: 1.5;
}

/* ============================= */
/* 📞 CONTACTO (Sección) */
/* ============================= */
#contact {
  text-align: center;
  padding: 3rem 1rem;
  background-color: #f3f4f6;
}
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  align-items: start;
  padding: 2rem;
  max-width: 1000px;
  margin: 0 auto;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
.contact-info,
.direccion {
  background: #f9fafb;
  border-radius: 12px;
  padding: 25px;
  text-align: left;
  color: #1e293b;
  width: 100%;
  box-sizing: border-box;
}
.contact-info h4,
.direccion h4 {
  color: #1a73e8;
  margin-bottom: 0.8rem;
  font-size: 1.2rem;
}
.contact-info p,
.direccion p {
  margin: 0.4rem 0;
  font-size: 0.95rem;
}
.contact-info a,
.direccion a {
  color: #1a73e8;
  text-decoration: none;
  word-break: break-word;
}
.contact-info a:hover,
.direccion a:hover {
  text-decoration: underline;
}
.btn-maps {
  display: inline-block;
  background-color: #1a73e8;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  transition: background 0.3s ease;
  margin-top: 10px;
}
.btn-maps:hover {
  background-color: #0f5fd6;
}

/* ============================= */
/* 📱 MEDIA QUERIES */
/* ============================= */
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 1.5rem;
  }
  #contact h2 { font-size: 1.6rem; }
  .contact-info, .direccion {
    padding: 20px;
    font-size: 0.95rem;
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  #contact { padding: 30px 0px; }
  #contact h2 { font-size: 1.4rem; }
  .contact-info, .direccion {
    padding: 15px;
    font-size: 0.85rem;
  }
  .contact-info p, .direccion p {
    font-size: 0.85rem;
    line-height: 1.3;
  }
}

/* Celulares pequeños */
@media (max-width:576px) {
  body { font-size:.95rem; }
  .container { max-width:100%; padding:1rem; }
  .header-bg { height:auto; padding:2rem 1rem; }
  .header-content h1 { font-size:1.6rem; }
  .nav { flex-direction:column; align-items:flex-start; padding:1rem; }
  .nav-links { flex-direction:column; width:100%; gap:.8rem; margin-top:.5rem; }
  .hero { grid-template-columns:1fr; text-align:center; }
  form { padding: 20px; }
  form input, form textarea { font-size:.9rem; padding:.55rem; }
  footer { font-size:.85rem; padding:1rem; }
  .whatsapp-float { width:50px; height:50px; font-size:24px; }
}

/* Tablets */
@media (min-width:576px) and (max-width:992px) {
  .container { max-width:95%; padding:1rem; }
  .contact-grid { grid-template-columns:1fr; gap:1.25rem; }
}

/* Escritorio grande */
@media (min-width:1200px) {
  .container { max-width:1200px; }
  .header-bg { height:600px; }
  .header-content h1 { font-size:2.8rem; }
}

.whatsapp-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
}

.whatsapp-float {
  background-color: #25d366;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50px;
  padding: 10px 15px;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: all 0.3s;
}

.whatsapp-float:hover {
  transform: scale(1.05);
  background-color: #1ebc57;
}

.whatsapp-options {
  display: none;
  position: absolute;
  bottom: 60px;
  right: 0;
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  overflow: hidden;
  width: 250px;
}

.whatsapp-options a {
  display: block;
  padding: 10px;
  text-decoration: none;
  color: #333;
  border-bottom: 1px solid #eee;
}

.whatsapp-options a:hover {
  background-color: #f2f2f2;
}

.whatsapp-options.show {
  display: block;
}

