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

body {
  font-family: 'Segoe UI', sans-serif;
  background: #f5f1eb;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Contenedor principal de las secciones */
.container { 
  max-width: 1280px; 
  margin: 0 auto; 
  padding: 0 2rem; 
  flex: 1; 
  width: 100%;
}

/* ==========================================================================
   BANDERAS (Ajustado a 20px de altura)
   ========================================================================== */
.flag-bar { height: 20px; display: flex; }
.flag-guatemala { display: flex; flex: 1; }
.flag-guatemala .blue { background: #4997d0; width: 50%; }
.flag-guatemala .white { background: #fff; width: 50%; }
.flag-usa { display: flex; flex: 1; }
.flag-usa .stripes {
  background: repeating-linear-gradient(90deg, #b22234 0px, #b22234 12.5%, #fff 12.5%, #fff 25%);
  width: 70%;
}
.flag-usa .blue-star {
  background: #3c3b6e;
  width: 30%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.8rem;
}

/* ==========================================================================
   NAVEGACIÓN FIJA CON ESPACIO SUPERIOR Y BLOQUES RECTOS (Estilo Photoshop)
   ========================================================================== */
nav {
  display: flex;
  justify-content: center;
  gap: 3rem;
  padding: 0; /* Mantiene los botones tocando los bordes superior e inferior */
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  border-bottom: 2px solid #dce1e9;
  position: sticky;
  top: 0;
  z-index: 10;
  
  /* Margen superior para mantener el respiro visual y esquinas redondeadas abajo */
  margin-top: 0.5rem; 
  border-radius: 0 0 12px 12px; 
  
  width: 100%;
  overflow: hidden; /* Evita que el color del botón activo se salga de las esquinas redondeadas */
}

nav a {
  text-decoration: none;
  font-size: 1.35rem; /* ¡AUMENTADO! Mayor tamaño y legibilidad en computadoras */
  font-weight: 500;
  color: #1e2a3a;
  padding: 1.2rem 1.5rem; /* Acolchado para dar altura total al bloque */
  border-radius: 0; /* Bloques rectos y limpios */
  transition: 0.2s;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
nav a:hover { background: #dce1e9; }
nav a.active { background: #3c3b6e; color: #fff; }

/* ==========================================================================
   SECCIÓN SOBRE NOSOTROS (Estructura de 2 Columnas)
   ========================================================================== */
#page-sobre { 
  text-align: center; 
}

/* Contenedor Grid para separar Texto y Logo lado a lado */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr; /* El texto toma un poco más de espacio */
  gap: 3rem; /* Separación entre columnas */
  align-items: center; /* Centrado vertical recíproco */
  max-width: 1000px;
  margin: 2rem auto 0 auto;
}

/* Columna de Texto: Alineación natural a la izquierda */
.about-text {
  text-align: left;
}
.about-text p { 
  color: #2b3a4e; 
  margin-bottom: 1.5rem; 
  font-size: 1.25rem; /* ¡AUMENTADO! Texto más cómodo de leer */
  line-height: 1.6; /* Interlineado cómodo para lectura */
}

/* Columna del Logo y Efecto Suave */
.about-logo-wrapper {
  display: flex;
  justify-content: center;
}
.about-logo {
  width: 100%;
  max-width: 280px;
  height: auto;
  object-fit: contain;
  background: transparent;
  transition: all 0.4s ease-in-out; 
  will-change: transform, filter;
}
.about-logo:hover {
  filter: drop-shadow(0px 10px 15px rgba(73, 151, 208, 0.4)); /* Resplandor azul */
  transform: translateY(-3px);
}

/* ==========================================================================
   REPRODUCTOR DE VIDEO Y MINIATURAS
   ========================================================================== */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 4px;
  background: #232323;
  margin: 3rem 0 2.5rem;
  box-shadow: 0px 15px 25px rgba(0, 0, 0, 0.55), 
              0px 5px 10px rgba(0, 0, 0, 0.4);
}
.video-wrapper iframe {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%; border: 0;
}
.videos-section-title {
  font-size: 1.8rem;
  font-weight: 400;
  color: #1e2a3a;
  margin: 1.5rem 0 1.2rem;
  border-bottom: 2px solid #4997d0;
  display: inline-block;
  padding-bottom: 0.2rem;
}
.thumbnails {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 3rem;
}
.thumbnail {
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
  background: #fff;
  border: 1px solid #dce1e9;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}
.thumbnail:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
  border-color: #4997d0;
}
.thumbnail img { width: 100%; height: 160px; object-fit: cover; display: block; }
.thumbnail .title { padding: 12px; font-size: 14px; background: white; color: #1e2a3a; font-weight: 500; line-height: 1.4; }

/* ==========================================================================
   CONTROL DE VISIBILIDAD CON ANIMACIÓN SUAVE (FADE-IN)
   ========================================================================== */
.page-section { 
  display: none; 
  padding: 2rem 0; 
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}
.page-section.active-section { 
  display: block; 
  opacity: 1;
  transform: translateY(0);
}

/* Títulos principales h2 */
.page-section h2, .contact-info h2 {
  font-weight: 300;
  font-size: 2rem;
  border-bottom: 2px solid #4997d0;
  display: inline-block;
  padding-bottom: 0.3rem;
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   SECCIÓN DE CONTACTO EXCLUSIVA Y SIMÉTRICA
   ========================================================================== */
#page-contacto {
  padding: 3.5rem 0 3.5rem 0 !important;
}
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start !important;
}
.contact-info { 
  text-align: left; 
  margin-top: 2.5rem !important;
}
.contact-item { display: flex; align-items: center; gap: 0.8rem; margin: 0.8rem 0; font-size: 1.1rem; }
.contact-item i { width: 2rem; color: #3c3b6e; font-size: 1.3rem; }

/* Formulario */
.contact-form {
  display: flex;
  flex-direction: column;
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  text-align: left;
}
.form-group { margin-bottom: 1.2rem; }
.form-group label { 
  display: block; 
  margin-bottom: 0.5rem; 
  font-weight: 500; 
  color: #1e2a3a; 
  font-size: 1.1rem; /* ¡AUMENTADO! Más presencia a las etiquetas del formulario */
}
.form-group input, .form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid #dce1e9;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s;
}
.form-group input:focus, .form-group textarea:focus { border-color: #3c3b6e; outline: none; }
.form-group textarea { min-height: 120px; resize: vertical; }

/* Botón Rojo */
.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  background: #ff4d4d;
  color: white;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  font-size: 1rem;
}
.btn:hover {
  background: #e04444;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 77, 77, 0.2);
}
.btn:disabled { background: #6c757d; cursor: not-allowed; transform: none; box-shadow: none; }

.form-success-msg {
  display: none;
  background-color: #e8f8f0;
  color: #2ecc71;
  border: 1px solid #d1f2db;
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1.2rem;
  font-weight: 500;
  align-items: center;
  gap: 0.5rem;
}

/* ==========================================================================
   FOOTER & ICONOS SOCIALES
   ========================================================================== */
.footer-social {
  margin-top: 2rem;
  padding: 1.8rem 0;
  border-top: 2px solid #dce1e9;
  text-align: center;
  background: #fafbfc;
  border-radius: 40px 40px 0 0;
}
.social-icons { display: flex; justify-content: center; gap: 2.5rem; flex-wrap: wrap; }
.social-icons a {
  color: #1e2a3a;
  font-size: 2.2rem;
  width: 4.2rem;
  height: 4.2rem;
  border-radius: 60px;
  background: #fff;
  border: 1px solid #dce1e9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: 0.25s;
  text-decoration: none;
}
.social-icons a:hover { transform: scale(1.1) translateY(-5px); }

.social-icons a.ico-facebook:hover { color: #1877f2; border-color: #1877f2; }
.social-icons a.ico-twitter:hover { color: #1da1f2; border-color: #1da1f2; }
.social-icons a.ico-youtube:hover { color: #ff0033; border-color: #ff0033; }
.social-icons a.ico-tiktok:hover { color: #000; border-color: #000; text-shadow: 0 0 8px #ff0050; }
.social-icons a.ico-instagram:hover { color: #e4405f; border-color: #e4405f; }

.footer-copy { margin-top: 1.5rem; font-size: 0.9rem; color: #6a7a8c; }
.footer-copy i { color: #4997d0; }
.footer-copy a { text-decoration: none; color: inherit; font-style: normal; }
.footer-copy a:hover { color: #4997d0; font-weight: bold; }

/* ==========================================================================
   ADAPTACIÓN RESPONSIVA (CELULARES Y TABLETS)
   ========================================================================== */
@media (max-width: 992px) {
  .thumbnails { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .contact-container { grid-template-columns: 1fr; gap: 2rem; }
  
  /* En teléfonos el "Sobre Nosotros" se apila verticalmente y se centra */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .about-text {
    text-align: center;
  }
  .about-logo {
    max-width: 200px;
  }
}

@media (max-width: 640px) {
  nav { gap: 0.3rem; }
  /* Ajustado responsivamente a 1.05rem para que quepa bien en pantallas chicas */
  nav a { font-size: 1.05rem; padding: 1rem 0.6rem; } 
  .social-icons { gap: 1.2rem; }
  .social-icons a { width: 3.6rem; height: 3.6rem; font-size: 1.8rem; }
  .thumbnails { grid-template-columns: 1fr; }
  .thumbnail img { height: 180px; }
}