  /* ==========================================================================
           1. CSS Variables (Custom Properties) - Arquitectura escalable
           ========================================================================== */
  :root {
      --primary-color: #1e3c72;
      --primary-dark: #152a55;
      --secondary-color: #2a5298;
      --accent-color: #ffd700;
      --text-main: #333333;
      --text-light: #666666;
      --bg-light: #f8f9fa;
      --bg-white: #ffffff;
      --border-color: #e2e8f0;
      --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
      --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
      --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
      --transition-speed: 0.3s;
      --border-radius: 8px;
      --max-width: 1200px;
  }

  /* ==========================================================================
           2. Reset moderno y tipografía base
           ========================================================================== */
  *,
  *::before,
  *::after {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
  }

  html {
      scroll-behavior: smooth;
      /* Smooth scroll nativo para anclas */
      overflow-x: hidden;
      /* Evita scroll horizontal por animaciones AOS */
  }

  body {
      font-family: 'Inter', system-ui, -apple-system, sans-serif;
      line-height: 1.6;
      color: var(--text-main);
      background-color: var(--bg-light);
      -webkit-font-smoothing: antialiased;
      overflow-x: hidden;
  }

  img {
      max-width: 100%;
      height: auto;
      display: block;
  }

  /* ==========================================================================
           3. Layout y Componentes Principales
           ========================================================================== */
  header {
      background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
      color: var(--bg-white);
      padding: 5rem 1rem;
      text-align: center;
      box-shadow: var(--shadow-md);
      position: relative;
      overflow: hidden;
  }

  /* Efecto de patrón sutil en el header para darle más profundidad */
  header::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
      background-size: 20px 20px;
      opacity: 0.5;
      pointer-events: none;
  }

  header h1 {
      font-size: clamp(2rem, 5vw, 3.5rem);
      /* Tipografía fluida y responsiva */
      font-weight: 700;
      margin-bottom: 1rem;
      letter-spacing: -0.02em;
      position: relative;
  }

  header p {
      font-size: clamp(1.1rem, 2.5vw, 1.5rem);
      font-weight: 300;
      color: var(--accent-color);
      position: relative;
  }

  /* Navegación Sticky */
  nav {
      background-color: var(--bg-white);
      position: sticky;
      top: 0;
      z-index: 100;
      box-shadow: var(--shadow-sm);
      border-bottom: 1px solid var(--border-color);
  }

  nav ul {
      list-style: none;
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      max-width: var(--max-width);
      margin: 0 auto;
  }

  nav a {
      color: var(--text-main);
      text-decoration: none;
      padding: 1.2rem 1.5rem;
      display: block;
      font-weight: 600;
      transition: color var(--transition-speed), background-color var(--transition-speed);
      position: relative;
  }

  /* Indicador de hover estilo línea inferior animada */
  nav a::after {
      content: '';
      position: absolute;
      bottom: 0;
      left: 50%;
      transform: translateX(-50%);
      width: 0;
      height: 3px;
      background-color: var(--secondary-color);
      transition: width var(--transition-speed) ease;
  }

  nav a:hover::after,
  nav a:focus::after {
      width: 100%;
  }

  nav a:hover,
  nav a:focus {
      color: var(--secondary-color);
      background-color: var(--bg-light);
      outline: none;
  }

  .menu-toggle {
      display: none;
      font-size: 1.5rem;
      color: var(--primary-color);
      padding: 1rem;
      cursor: pointer;
      text-align: right;
      border: none;
      background: none;
      width: 100%;
      font-family: inherit;
      font-weight: 600;
  }

  /* Contenedor principal superpuesto */
  .container {
      max-width: var(--max-width);
      margin: 0 auto;
      padding: 0 2rem;
      background-color: var(--bg-white);
      box-shadow: var(--shadow-lg);
      border-radius: var(--border-radius);
      margin-top: -3rem;
      /* Superposición sobre el header */
      position: relative;
      z-index: 10;
      margin-bottom: 3rem;
  }

  section {
      padding: 5rem 0;
      border-bottom: 1px solid var(--border-color);
  }

  section:last-child {
      border-bottom: none;
  }

  section h2 {
      font-size: 2.2rem;
      margin-bottom: 2.5rem;
      color: var(--primary-color);
      position: relative;
      padding-bottom: 0.5rem;
      text-align: center;
  }

  section h2::after {
      content: '';
      position: absolute;
      left: 50%;
      transform: translateX(-50%);
      bottom: 0;
      height: 4px;
      width: 80px;
      background-color: var(--accent-color);
      border-radius: 2px;
  }

  /* ==========================================================================
           4. Grillas y Contenido
           ========================================================================== */
  .content-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
      gap: 4rem;
      align-items: center;
  }

  .text-content p {
      margin-bottom: 1.5rem;
      font-size: 1.1rem;
      color: var(--text-light);
      line-height: 1.8;
  }

  .text-content strong {
      color: var(--primary-color);
      font-weight: 600;
  }

  .image-placeholder {
      background-color: var(--bg-light);
      border-radius: var(--border-radius);
      overflow: hidden;
      box-shadow: var(--shadow-md);
      aspect-ratio: 4/3;
      position: relative;
  }

  .image-placeholder img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .image-placeholder:hover img {
      transform: scale(1.08);
      /* Zoom in fluido */
  }

  /* ==========================================================================
           5. Tarjetas (Cards)
           ========================================================================== */
  .cards-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
      gap: 2.5rem;
  }

  .card {
      background: var(--bg-white);
      border: 1px solid var(--border-color);
      border-radius: var(--border-radius);
      padding: 3rem 2rem;
      text-align: center;
      transition: all var(--transition-speed) ease;
      position: relative;
      overflow: hidden;
      z-index: 1;
  }

  /* Efecto de hover avanzado para las tarjetas */
  .card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(135deg, rgba(30, 60, 114, 0.05) 0%, transparent 100%);
      z-index: -1;
      opacity: 0;
      transition: opacity var(--transition-speed);
  }

  .card:hover {
      transform: translateY(-10px);
      box-shadow: var(--shadow-lg);
      border-color: var(--secondary-color);
  }

  .card:hover::before {
      opacity: 1;
  }

  .card h3 {
      color: var(--secondary-color);
      margin-bottom: 1.2rem;
      font-size: 1.6rem;
      font-weight: 700;
  }

  .card p {
      color: var(--text-light);
      font-size: 1.05rem;
  }

  /* ==========================================================================
           6. Contacto
           ========================================================================== */
  .contact-info {
      background: linear-gradient(to right, var(--bg-light), var(--bg-white));
      padding: 3rem;
      border-radius: var(--border-radius);
      border-left: 5px solid var(--primary-color);
      font-size: 1.2rem;
      color: var(--text-light);
      box-shadow: var(--shadow-sm);
      max-width: 800px;
      margin: 0 auto;
  }

  .contact-info p {
      margin-bottom: 1rem;
      display: flex;
      align-items: center;
      gap: 10px;
  }

  .contact-info strong {
      color: var(--primary-dark);
      min-width: 100px;
  }

  .contact-link {
      color: var(--secondary-color);
      text-decoration: none;
      font-weight: 600;
      transition: color var(--transition-speed);
  }

  .contact-link:hover {
      color: var(--accent-color);
      text-decoration: underline;
  }

  /* ==========================================================================
           7. Galería y Modal (Lightbox)
           ========================================================================== */
  .gallery-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
      gap: 1.5rem;
  }

  .gallery-item {
      border-radius: var(--border-radius);
      overflow: hidden;
      aspect-ratio: 1;
      /* Mantiene las miniaturas cuadradas */
      cursor: pointer;
      box-shadow: var(--shadow-sm);
      position: relative;
  }

  .gallery-item::after {
      content: '\1F50D';
      /* Icono de lupa unicode */
      font-size: 2rem;
      color: white;
      display: flex;
      align-items: center;
      justify-content: center;
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(30, 60, 114, 0.4);
      opacity: 0;
      transition: opacity var(--transition-speed);
  }

  .gallery-item:hover::after {
      opacity: 1;
  }

  .gallery-item img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 0.5s ease;
  }

  .gallery-item:hover img {
      transform: scale(1.1);
  }

  /* Modal / Lightbox accesible */
  .modal {
      display: none;
      position: fixed;
      z-index: 1000;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(15, 23, 42, 0.95);
      /* Azul muy oscuro casi negro */
      backdrop-filter: blur(8px);
      opacity: 0;
      transition: opacity var(--transition-speed);
  }

  .modal.show {
      display: flex;
      opacity: 1;
      align-items: center;
      justify-content: center;
      flex-direction: column;
  }

  .modal-content {
      max-width: 90%;
      max-height: 80vh;
      border-radius: var(--border-radius);
      box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
      object-fit: contain;
  }

  .modal-controls {
      position: absolute;
      width: 100%;
      display: flex;
      justify-content: space-between;
      top: 50%;
      transform: translateY(-50%);
      padding: 0 3rem;
      pointer-events: none;
  }

  .modal-prev,
  .modal-next {
      color: white;
      font-size: 2rem;
      cursor: pointer;
      pointer-events: auto;
      background: rgba(255, 255, 255, 0.1);
      border: 2px solid rgba(255, 255, 255, 0.2);
      width: 60px;
      height: 60px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 50%;
      transition: all var(--transition-speed);
      user-select: none;
      backdrop-filter: blur(4px);
  }

  .modal-prev:hover,
  .modal-next:hover {
      background: var(--primary-color);
      border-color: var(--primary-color);
      transform: scale(1.1);
  }

  .modal-close {
      position: absolute;
      top: 30px;
      right: 40px;
      color: white;
      font-size: 3rem;
      cursor: pointer;
      transition: color var(--transition-speed), transform var(--transition-speed);
      line-height: 1;
  }

  .modal-close:hover {
      color: var(--accent-color);
      transform: rotate(90deg);
  }

  #modal-caption {
      margin-top: 1.5rem;
      color: #fff;
      font-size: 1.2rem;
      text-align: center;
      max-width: 80%;
      font-weight: 300;
  }

  /* ==========================================================================
           8. Footer
           ========================================================================== */
  footer {
      background-color: var(--primary-dark);
      color: var(--bg-light);
      text-align: center;
      padding: 4rem 1rem;
      margin-top: 2rem;
  }

  /* ==========================================================================
           9. Botón flotante de WhatsApp
           ========================================================================== */
  .whatsapp-float {
      position: fixed;
      width: 60px;
      height: 60px;
      bottom: 30px;
      right: 30px;
      background-color: #25d366;
      color: #FFF;
      border-radius: 50px;
      box-shadow: var(--shadow-lg);
      z-index: 1000;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed);
  }

  .whatsapp-float:hover {
      transform: translateY(-5px) scale(1.05);
      box-shadow: 0 15px 25px rgba(37, 211, 102, 0.4);
  }

  .whatsapp-float img {
      width: 35px;
      height: 35px;
      /* Asegurar que la imagen no tenga un background negro y que se vea clara */
  }

  /* ==========================================================================
           10. Media Queries (Responsive Design)
           ========================================================================== */
  @media (max-width: 768px) {
      .container {
          margin-top: 0;
          border-radius: 0;
          padding: 0 1rem;
      }

      .menu-toggle {
          display: block;
      }

      nav ul {
          display: none;
          flex-direction: column;
          width: 100%;
          background-color: var(--bg-white);
      }

      nav ul.open {
          display: flex;
      }

      nav a {
          border-top: 1px solid var(--border-color);
          text-align: center;
          padding: 1.5rem;
      }

      nav a::after {
          display: none;
          /* Quitamos la línea en móvil */
      }

      .content-grid {
          gap: 2rem;
      }

      section h2 {
          font-size: 1.8rem;
      }

      .modal-controls {
          padding: 0 1rem;
      }

      .modal-prev,
      .modal-next {
          width: 45px;
          height: 45px;
          font-size: 1.5rem;
      }

      .whatsapp-float {
          width: 50px;
          height: 50px;
          bottom: 20px;
          right: 20px;
      }

      .whatsapp-float img {
          width: 28px;
          height: 28px;
      }

      .contact-info {
          padding: 2rem 1rem;
      }

      .contact-info p {
          flex-direction: column;
          align-items: flex-start;
          gap: 2px;
          word-break: break-word; /* Romper líneas largas */
      }
      
      .contact-info a {
          word-break: break-all; /* Forzar el quiebre de palabras muy largas como emails */
      }
  }