/* Custom Properties - Centralización de Estilos y Paleta */
:root {
  --bg-color: #700b0b;
  --text-color: #ffffff;
  --text-muted: #cccccc;
  --accent-color: #ff0000;
  --sidebar-bg: rgba(255, 255, 255, 0.05);
  --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --transition-speed: 0.3s;
}

/* Reset Estándar para evitar saltos de maquetación */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth; /* Logra el comportamiento SPA nativo */
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-main);
  line-height: 1.6;
  padding: 0;
  overflow-x: hidden; /* Evita por completo el scroll horizontal */
  width: 100%;
}

/* Tipografías y Enlaces */
h1, h2, h3 {
  margin-bottom: 1rem;
  text-align: center;
}

a {
  color: var(--text-color);
  text-decoration: none;
  transition: color var(--transition-speed);
}

a:hover {
  text-decoration: underline;
  color: var(--text-muted);
}

/* Helpers */
.responsive-img {
  width: 100%;
  height: auto;
  display: block;
}

/* Header & Navegación Principal */
.main-header {
  max-width: 1200px;
  margin: 0 auto 20px auto;
}

/* Contenedor Grid (Reemplaza Tablas Obsoletas) */
.layout-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px; /* Evita que todo el sitio toque los bordes de la pantalla */
  display: grid;
  grid-template-columns: 300px 1fr; /* 300px para sidebar, el resto para el contenido */
  gap: 30px;
}

@media (max-width: 768px) {
  .layout-container {
    grid-template-columns: 1fr; /* Se vuelve una sola columna en móviles */
    padding: 0 15px;
  }
}

/* Componente: Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-box {
  background-color: var(--sidebar-bg);
  padding: 20px;
  border-radius: 6px;
  border-left: 4px solid var(--accent-color);
}

.sidebar-box h3 {
  font-size: 1.1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  padding-bottom: 5px;
}

.link-action {
  color: var(--accent-color);
  font-weight: bold;
  font-size: 0.9rem;
}

.resource-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
}

.btn-resource {
  display: block;
  background-color: rgba(255, 255, 255, 0.1);
  padding: 10px;
  text-align: center;
  border-radius: 4px;
  font-size: 0.9rem;
}

.btn-resource:hover {
  background-color: rgba(255, 255, 255, 0.2);
  text-decoration: none;
}

.separator-bambu {
  display: block;
  margin: 0 auto;
}

/* Componente: Contenido Principal (SPA Sections) */
.main-content {
  display: flex;
  flex-direction: column;
  gap: 15px; /* Separación clara entre zonas SPA */
}

.content-section {
  padding-top: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 10px;
}

.main-figure {
  text-align: center;
  margin: 20px 0;
}

.main-figure img {
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.main-figure figcaption {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.presentation-text {
  max-width: 800px;
  margin: 0 auto;
  text-align: justify;
  padding: 0 15px; /* Añade este colchón para que el texto no toque los bordes en móviles */
}

.presentation-text p {
  margin-bottom: 15px;
}

.signature {
  text-align: right;
  font-style: italic;
  font-weight: bold;
  margin-top: 20px;
}

.objectives-box {
  max-width: 800px;
  margin: 0 auto;    
  background: rgba(0,0,0,0.2);
  padding: 25px;
  border-radius: 8px;
 /*margin-top: 30px*/;
}

.styled-list {
  padding-left: 20px;
}

.styled-list li {
  margin-bottom: 12px;
}

/* Grid de Imágenes Moderno */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 15px;
  justify-items: center;
  margin-top: 20px;
}

.photo-item img {
  border: 2px solid var(--text-color);
  border-radius: 4px;
  transition: transform var(--transition-speed);
}

.photo-item img:hover {
  transform: scale(1.05);
}

/* Footer */
.main-footer {
  max-width: 1200px;
  margin: 40px auto 0 auto;
  text-align: center;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  flex-wrap: wrap;
  gap: 20px;
}

@media (max-width: 600px) {
  .footer-content {
    flex-direction: column;
  }
}



/*  Section Contacto*/
/* ==========================================================================
   SECCIÓN AVANZADA: UBICACIÓN Y CONTACTO
   ========================================================================== */

.contact-advanced-section {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.academy-header {
  text-align: center;
  background: rgba(0, 0, 0, 0.2);
  padding: 25px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.academy-header h3 {
  font-size: 1.5rem;
  letter-spacing: 1px;
  color: var(--text-color);
}

.academy-slogan {
  font-size: 0.95rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: -5px;
  margin-bottom: 15px;
}

.director-title {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--text-color);
}

.director-meta {
  font-style: italic;
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* Lista de Afiliaciones */
.affiliations-box h4 {
  font-size: 1rem;
  margin-bottom: 10px;
  color: var(--text-color);
}

.affiliations-box ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  font-weight: bold;
}

.affiliations-box li {
  background: rgba(255, 255, 255, 0.1);
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.1);
}

.invitation-text {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px dashed rgba(255,255,255,0.2);
  font-size: 0.95rem;
}

/* Grillas Internas de Información */
.info-grid, .location-pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.requirements-card, .exams-card, .pricing-card, .location-card {
  background: rgba(255, 255, 255, 0.03);
  padding: 20px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.05);
}

.requirements-card h4, .exams-card h4, .pricing-card h4, .location-card h4 {
  font-size: 1.1rem;
  margin-bottom: 15px;
  border-bottom: 2px solid var(--bg-color);
  padding-bottom: 5px;
}

.styled-bullet-list {
  padding-left: 20px;
}

.styled-bullet-list li {
  margin-bottom: 5px;
}

/* Tabla de Horarios Responsiva */
.schedule-container h3 {
  margin-bottom: 15px;
}

.table-responsive-wrapper {
  width: 100%;
  overflow-x: auto; /* Permite scroll horizontal solo en pantallas muy pequeñas */
  -webkit-overflow-scrolling: touch;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  min-width: 600px; /* Previene el colapso de celdas de texto */
}

.schedule-table th, .schedule-table td {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.schedule-table th {
  background-color: rgba(0, 0, 0, 0.5);
  font-size: 0.95rem;
}

.schedule-table td {
  font-size: 0.9rem;
}

.day-cell {
  font-weight: bold;
  background-color: rgba(255, 255, 255, 0.05);
}

/* Precios y Ubicación */
.price-item {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.enrollment-status {
  margin-top: 15px;
  font-weight: bold;
  color: #ffcc00;
  text-align: center;
  font-size: 0.9rem;
}

.address-info {
  font-style: normal;
  margin-bottom: 15px;
  font-size: 0.95rem;
}

.address-info p {
  margin-bottom: 5px;
}

.map-figure {
  text-align: center;
}

.map-figure img {
  border: 3px solid #fff;
  border-radius: 4px;
  max-width: 100%;
  height: auto;
}

/* Galería Histórica Stacked */
.dojo-gallery h3 {
  margin-bottom: 5px;
}

.gallery-quote {
  text-align: center;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 25px;
}

.gallery-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 35px;
}

.gallery-item {
  max-width: 500px;
  width: 100%;
  background: rgba(0,0,0,0.2);
  padding: 10px;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

.gallery-item figcaption {
  margin-top: 10px;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--text-muted);
  text-align: justify;
}


/* ==========================
            Iframe
============================*/

.footer-iframe {
  width: 100%; /* Cambiado a 100% para que se mantenga dentro de los límites del celular */
  position: relative;
  height: 650px; 
  display: block;
  border: none;
  overflow: hidden;
}

/* Ajuste responsivo estricto para pantallas de celular */
@media (max-width: 768px) {
  .footer-iframe {
    height: 1200px; /* Mayor altura en móviles ya que las columnas se apilan verticalmente */
  }
}

/* ==========================
      Tarjeta Mensualidad
============================*/

/* --- CONFIGURACIÓN DE PARALELO EN PC --- */
.pricing-flex {
  display: flex !important;
  flex-direction: row;        /* Los pone uno al lado del otro */
  justify-content: space-around; /* Distribuye el espacio de forma equilibrada */
  gap: 30px;                  /* Separación entre ambos bloques */
  margin: 20px 0;             /* Margen vertical por encima y debajo */
  width: 100%;
}

/* Hace que ambos bloques internos compartan el espacio equitativamente */
.pricing-flex > div {
  flex: 1;
}

/* --- AJUSTE RESPONSIVO EN CELULARES --- */
@media (max-width: 768px) {
  .pricing-flex {
    flex-direction: column !important; /* Se apilan verticalmente en móviles */
    gap: 20px;                         /* Reduce la separación en pantallas chicas */
  }
}
