/* ===================== VARIABLES ===================== */
:root {
  --bg: #ffffff;
  --bg-alt: #f9fafc;
  --text: #1f2937;
  --muted: #6b7280;
  --accent: #0f4c81;
  --accent-light: #1b6fb4;
  --success: #25d366;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 6px 16px rgba(0,0,0,0.08);
  --transition: 0.3s ease;
}


/* ===================== RESET ===================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Montserrat", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 24px;
}

/* ===================== HEADER ===================== */
.site-header {
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  color: white;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  backdrop-filter: blur(8px);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition);
}
.logo:hover {
  transform: scale(1.05);
}
.logo img {
  width: 100%;
  padding: 6px;
}

.site-header h1 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

.site-header .tag {
  font-size: 0.85rem;
  opacity: 0.9;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.main-nav a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  position: relative;
  transition: color var(--transition);
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 2px;
  background: #ffeb3b;
  transition: width var(--transition);
}
.main-nav a:hover::after {
  width: 100%;
}
.cta {
  background: rgba(255,255,255,0.15);
  padding: 8px 14px;
  border-radius: 8px;
  transition: background var(--transition);
}
.cta:hover {
  background: rgba(255,255,255,0.25);
}
.nav-toggle {
  display: none;
  font-size: 1.8rem;
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
}

/* ===================== HERO ===================== */
.hero {
  position: relative;
  background: url('https://images.pexels.com/photos/3182764/pexels-photo-3182764.jpeg?auto=compress&cs=tinysrgb&dpr=2&w=1600') no-repeat center center/cover;
  color: white;
  padding: 120px 20px;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: auto;
}
.hero h2 {
  font-size: 2rem;
  font-weight: 700;
  margin: 12px 0;
}
.hero .accent {
  color: var(--success);
}
.hero p {
  color: #f0f4f8;
  margin-bottom: 22px;
}
.actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.btn {
  background: var(--success);
  color: white;
  padding: 12px 20px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  transition: all var(--transition);
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.btn.ghost {
  background: transparent;
  border: 2px solid white;
  color: white;
}
.btn.ghost:hover {
  background: var(--success);
  border-color: var(--success);
}


/* ===================== SECCIONES ===================== */
.section {
  padding: 70px 0;
}
.section-title {
  font-size: 1.8rem;
  color: var(--accent);
  margin-bottom: 8px;
  text-align: center;
}
.section-lead {
  color: var(--muted);
  text-align: center;
  margin-bottom: 40px;
}
.bg-light {
  background: var(--bg-alt);
}
.grid {
  display: grid;
  gap: 24px;
}
.services {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
  border: 1px solid #eef2f7;
  transition: all var(--transition);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.card h4 {
  color: var(--accent);
  margin-bottom: 10px;
}

/* ===================== FAQ ===================== */
.faq-list details {
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid #eef2f7;
  margin-bottom: 10px;
  transition: all var(--transition);
}
.faq-list details[open] {
  background: var(--bg-alt);
  border-color: var(--accent-light);
}

/* ===================== CONTACTO ===================== */
.contact-section .map iframe {
  width: 100%;
  height: 240px;
  border-radius: 10px;
}
.form input, .form textarea {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #dce3ee;
  margin-top: 6px;
  font-family: inherit;
  transition: border-color var(--transition);
}
.form input:focus, .form textarea:focus {
  border-color: var(--accent);
  outline: none;
}

/* ===================== FOOTER ===================== */
.site-footer {
  background: linear-gradient(90deg, #0a2a66, #1b4c88);
  color: white;
  padding: 40px 0;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}
.footer-nav a {
  display: inline-block;
  margin-right: 10px;
  color: white;
  text-decoration: none;
  transition: color var(--transition);
}
.footer-nav a:hover {
  color: #ffeb3b;
}
.copyright {
  text-align: center;
  margin-top: 20px;
  font-size: 0.9rem;
  opacity: 0.8;
}

/* ===================== FLOATING BUTTONS ===================== */
.whatsapp-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: var(--success);
  color: white;
  padding: 12px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}
.whatsapp-float:hover {
  transform: translateY(-4px);
}

.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 80px;
  background: var(--accent);
  color: white;
  border: 0;
  padding: 10px 12px;
  border-radius: 10px;
  display: none;
  cursor: pointer;
}
.back-to-top.show {
  display: block;
  animation: fadeIn 0.4s ease;
}


/* ===================== ANIMACIONES ===================== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
  .main-nav {
    display: none;
    flex-direction: column;
    background: var(--accent);
    position: absolute;
    top: 70px;
    right: 0;
    left: 0;
    text-align: center;
    padding: 16px 0;
  }
  .main-nav.show {
    display: flex;
  }
  .nav-toggle {
    display: block;
  }
  .two-col {
    grid-template-columns: 1fr;
  }
}


/* 🔔 Estilo del mensaje flotante (toast) */
.toast {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%) scale(0.8);
  background: #333;
  color: white;
  padding: 15px 25px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  opacity: 0;
  transition: all 0.4s ease;
  z-index: 9999;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

.toast.success { background: #28a745; }  /* Verde éxito */
.toast.error { background: #dc3545; }    /* Rojo error */
.toast.info { background: #007bff; }     /* Azul info */


/* Mensaje del formulario premium */
.form-message {
  position: relative;
  padding: 1rem 1.5rem 1rem 3rem;
  margin-top: 1rem;
  border-radius: 10px;
  font-weight: 500;
  font-size: 1rem;
  display: none;
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

/* Cuando se muestra */
.form-message.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Íconos antes del texto */
.form-message::before {
  content: '';
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
}

/* Éxito */
.form-message.success {
  background-color: #e6ffed;
  border-left: 5px solid #34d399;
  color: #065f46;
}
.form-message.success::before {
  content: "✅";
}

/* Error */
.form-message.error {
  background-color: #ffe6e6;
  border-left: 5px solid #f87171;
  color: #b91c1c;
}
.form-message.error::before {
  content: "❌";
}



/* Sección Nosotros */
#nosotros {
  padding: 4rem 2rem;
  background-color: #f9fafb;
  overflow: hidden;
}

/* Layout de dos columnas */
#nosotros .two-col {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
}

/* Cada columna */
#nosotros .two-col > div {
  flex: 1 1 300px;
  opacity: 0;               /* para animación */
  transform: translateY(30px); /* efecto de subir */
  transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Animación cuando entra al viewport */
#nosotros .two-col > div.show {
  opacity: 1;
  transform: translateY(0);
}

/* Títulos */
#nosotros h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 1.8rem;        /* igual que .section-title */
  line-height: 1.4;         /* mismo interlineado */
  letter-spacing: 0.5px;    /* igual que otros títulos */
  color: var(--accent);
  margin-bottom: 8px;
  text-align: center;
}



/* Párrafos */
#nosotros p {
  font-size: 1rem;
  line-height: 1.6;
  color: #374151;
  margin-bottom: 1rem;
}

/* Imagen / ilustración del equipo */
#nosotros .img-placeholder {
  background-color: #fff;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  text-align: center;
}

#nosotros .img-placeholder img {
  max-width: 100%;
  border-radius: 12px;
  display: block;
  margin: 0 auto;
}


/* ===================== Sección Contacto ===================== */
#contacto h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 1.8rem;       /* Igual que .section-title */
  line-height: 1.4;
  letter-spacing: 0.5px;
  color: var(--accent);
  margin-bottom: 8px;
  text-align: center;
}

#contacto p {
  font-size: 1rem;          /* Igual que .section-lead */
  line-height: 1.6;
  color: var(--muted);
  text-align: center;
  margin-bottom: 16px;
}

/* Ajuste del formulario para que luzca más uniforme */
#contacto .form {
  max-width: 500px;
  margin: 0 auto;
  padding: 22px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid #eef2f7;
  background: var(--card);
}

#contacto .form-row {
  margin-top: 12px;
  text-align: center;
}

#contacto .map {
  margin-top: 20px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}


/* Animación tipo “Nosotros” aplicada a todas las secciones */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.reveal.show {
  opacity: 1;
  transform: translateY(0);
}

/* Map estilizado */
.map iframe {
  width: 100%;
  height: 250px;
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}


/* Animación de aparición */
section, 
.two-col > div, 
.card, 
form, 
.map {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease;
}

section.show, 
.two-col > div.show, 
.card.show, 
form.show, 
.map.show {
  opacity: 1;
  transform: translateY(0);
}


/* --- Botón flotante de WhatsApp --- */
.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 25px;
  right: 25px;
  background-color: #25D366;
  color: white;
  border-radius: 50%;
  text-align: center;
  font-size: 32px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  background-color: #1ebe5d;
}
