/* ==========================================================================
   PARTE 1: VARIABLES, RESET Y HEADER GENERAL
   ========================================================================== */
:root {
    --primary: #0d234d;        /* Azul Marino Oscuro Principal */
    --secondary: #0056b3;      /* Azul Eléctrico de Acento */
    --accent: #b0b5bc;         /* Gris Plata Metálico */
    --white: #ffffff;
    --white-trans: rgba(255, 255, 255, 0.95);
    --dark-bg: rgba(26, 37, 47, 0.98);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(rgba(1, 1, 1, 0.4), rgba(1, 1, 1, 0.55)), 
                url('fondo-hero.png') no-repeat center center / cover;
    background-blend-mode: overlay; 
    background-attachment: fixed;
    color: #333333;
    line-height: 1.6;
}

section {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 36px;
    color: var(--white);
    margin-bottom: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--dark-bg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    z-index: 1000;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    position: relative;
}

.logo img {
    height: 65px;
    width: auto;
    display: block;
}

.menu-toggle {
    display: none;
}

nav ul {
    display: flex;
    list-style: none;
    align-items: center;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    color: var(--white);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
    padding: 5px 0;
}

nav ul li a:hover {
    color: var(--secondary);
}
/* ==========================================================================
   PARTE 2: HERO, GRIDS Y TARJETAS GEOMÉTRICAS
   ========================================================================== */
.hero {
    background: linear-gradient(
        to bottom, 
        var(--primary) 0px, 
        var(--primary) 24px, 
        var(--white-trans) 24px, 
        var(--white-trans) 100%
    );
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    max-width: 700px;
    margin: 120px auto 0 auto;
    height: auto;
    min-height: 50vh;
    padding: 50px 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-content {
    width: 100%;
}

.hero-content img {
    width: 100%;
    max-width: 480px;
    height: auto;
    border-style: solid;
    border-color: #d9ecf9;
    border-radius: 20px;
    display: block;
    margin: 0 auto 25px auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.hero h2 {
    color: var(--primary);
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.hero p {
    color: #444444;
    font-size: 16px;
    margin-bottom: 30px;
    font-weight: 500;
}

.about-grid, .services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    width: 100%;
}

.about-card {
     background: linear-gradient(
        to bottom, 
        var(--primary) 0px, 
        var(--primary) 24px, 
        var(--white-trans) 24px, 
        var(--white-trans) 100%
    );
    position: relative;
    background-color: var(--white-trans);
    padding: 60px 35px;
    border-radius: 28px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    display: flex;
    flex-direction: column;
    max-height: 650px;
 
}

/* Vector Superior Izquierdo */

/* Vector Inferior Derecho */


.about-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.22);
}

.about-card h3 {
    position: relative;
    z-index: 2;
    margin-top: 20px;
    margin-bottom: 20px;
    color: var(--primary);
    font-size: 26px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.about-card p {
    position: relative;
    z-index: 2;
    font-size: 14.5px;
    color: #2b2b2b;
    line-height: 1.7;
    margin-bottom: 25px;
    font-weight: 500;
}

.about-card img {
    position: relative;
    z-index: 2;
    border-radius: 18px;
    width: 100%;
    max-width: 360px;
    margin: auto auto 20px auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.service-card {
     background: linear-gradient(
        to bottom, 
        var(--primary) 0px, 
        var(--primary) 24px, 
        var(--white-trans) 24px, 
        var(--white-trans) 100%
    );
    padding: 40px 30px;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    transition: transform 0.3s, box-shadow 0.3s;
    border-top: 4px solid var(--primary);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}
.service-card img {
    position: relative;
    z-index: 2;
    border-radius: 18px;
    width: 100%;
    max-width: 360px;
    margin: auto auto 20px auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   PARTE 3: FORMULARIO, MODALES, FOOTER Y RESPONSIVE
   ========================================================================== */
.contact-container {
     background: linear-gradient(
        to bottom, 
        var(--primary) 0px, 
        var(--primary) 24px, 
        var(--white-trans) 24px, 
        var(--white-trans) 100%
    );
    max-width: 600px;
    margin: 0 auto;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--primary);
    font-weight: 700;
    font-size: 14px;
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #cccccc;
    border-radius: 6px;
    font-size: 15px;
    color: #333333;
    background-color: #ffffff;
    transition: border-color 0.3s ease;
}
.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--secondary);
}
.form-group textarea { height: 140px; resize: vertical; }
.btn-sm{
   display: block;
    
    padding: 14px;
    background-color: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.3s ease;  
}
.btn-sm:hover { background-color: var(--secondary); }
.btn-submit {
    display: block;
    width: 100%;
    padding: 14px;
    background-color: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.btn-submit:hover { background-color: var(--secondary); }

.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    overflow-y: auto;
}
.modal-content {
    background: linear-gradient(
        to bottom, 
        var(--primary) 0px, 
        var(--primary) 24px, 
        var(--white-trans) 24px, 
        var(--white-trans) 100%
    );
    background-color: #ffffff;
    max-width: 750px; width: 100%; padding: 40px;
    border-radius: 12px; box-shadow: 0 5px 25px rgba(0,0,0,0.3);
    position: relative; max-height: 90vh; overflow-y: auto;
}
.modal-content img { width: 100%; height: auto; border-radius: 8px; margin-top: 15px; }
.modal-content .pequeña { width: 50%; height: auto; border-radius: 8px; margin-top: 15px; margin-left: auto; margin-right: auto; display: flex;}
.modal-content .modal-img { width: 35%; height: auto; border-radius: 8px; margin-top: 15px; margin-left: auto; margin-right: auto; display: flex;}
.close-modal{ color:#14026b;font-size: 28px;}
.close-modal:hover{cursor:pointer; color:red;}
footer {
    background-color: var(--dark-bg);
    color: var(--white); text-align: center; padding: 40px 20px;
    margin-top: 60px; font-size: 14px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
}
.footer-sub { font-size: 12px; color: #bbbbbb; }

.whatsapp-float {
    position: fixed; bottom: 30px; right: 30px; width: 60px; height: 60px;
    background-color: #25d366; color: var(--white); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 32px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3); z-index: 999; text-decoration: none;
    transition: transform 0.3s ease;
}
.whatsapp-float:hover { transform: scale(1.1); }

/* AJUSTES RESPONSIVOS DE CONTROL TOTAL (CELULARES Y TABLETAS) */
@media (max-width: 850px) {
    body { background-attachment: scroll !important; background-size: cover; }
    header { position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; background-color: var(--dark-bg); }
    .nav-container { display: flex; justify-content: space-between; align-items: center; padding: 10px 20px; width: 100%; }
    .logo img { height: 50px; width: auto; }
    .menu-toggle { display: block !important; background: none; border: none; color: #ffffff; font-size: 28px; cursor: pointer; padding: 5px; z-index: 1001; }
    nav { display: block !important; position: absolute; top: 100%; left: 0; width: 100%; background-color: var(--dark-bg); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 4px 15px rgba(0,0,0,0.4); max-height: 0; overflow: hidden; transition: max-height 0.4s ease-in-out; z-index: 999; }
    nav.active { max-height: 350px; }
    nav ul { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; padding: 15px 0; margin: 0; }
    nav ul li { margin: 0 !important; width: 100%; text-align: center; }
    nav ul li a { display: block; width: 100%; padding: 14px 0; color: #ffffff; font-size: 16px; font-weight: 600; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
    nav ul li:last-child a { border-bottom: none; }
    .hero { height: auto !important; min-height: auto; margin-top: 100px; padding: 35px 20px; width: 90%; max-width: 550px; }
    .hero-content img { width: 100%; max-width: 320px; height: auto; margin: 0 auto 15px auto; }
    .hero h2 { font-size: 24px; line-height: 1.3; }
    .hero p { font-size: 14px; padding: 0 10px; }
    .about-grid, .services-grid { grid-template-columns: 1fr !important; gap: 25px; padding: 10px; }
    .about-card, .service-card { max-height: none !important; padding: 45px 20px; }
    .about-card::before { width: 140px; height: 65px; }
    .about-card::after { width: 130px; height: 80px; }
    section { padding: 50px 15px; }
    .section-title { font-size: 26px; margin-bottom: 30px; }
    .modal-content { width: 92% !important; max-width: 100%; padding: 25px 20px; }
}
.video-container {
  width: 100%;
  max-width: 450px;     /* Ajusta este número para hacerlo más grande o pequeño */
  margin: 20px auto;    /* Crea espacio arriba/abajo y lo centra horizontalmente */
  box-shadow: 0 4px 15px rgba(0,0,0,0.2); /* Opcional: le da un toque moderno */
  border-radius: 8px;   /* Opcional: redondea las esquinas del contenedor */
  overflow: hidden;     /* Asegura que el video respete las esquinas redondeadas */
}

/* El video se adapta al 100% de su nuevo contenedor */
.video-responsivo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

  /* Estilos generales de la tabla */
    .tabla-calendario {
      width: 100%;
      max-width: 800px;
      border-collapse: collapse;
      font-family: Arial, sans-serif;
      margin: 20px auto;
      box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
      border: 1px solid #060e4a;
    }

    /* Encabezado principal (Título) */
    .tabla-calendario th.titulo-principal {
      background-color: #050367;
      color: white;
      font-size: 1.3rem;
      padding: 12px;
      text-align: center;
    }

    /* Subencabezados (Curso / Fecha) */
    .tabla-calendario th.subtitulo {
      background-color: #21395c;
      color: white;
      font-size: 1.1rem;
      padding: 10px;
      font-weight: normal;
      border: 1px solid #7ea7d8;
    }

    /* Celdas de datos */
    .tabla-calendario td {
      padding: 12px 15px;
      border: 1px solid #3b47ca;
      color: #000000;
      font-size: 0.95rem;
    }

    /* Columna de Cursos (Texto en negrita) */
    .tabla-calendario td.curso {
      font-weight: bold;
      background-color: #e4e6e9;
      width: 55%;
    }

    /* Columna de Fechas (Texto centrado / negrita para destacar) */
    .tabla-calendario td.fecha {
      font-weight: bold;
      text-align: center;
      background-color: #e4e6e9;
      width: 45%;
    }

    /* Efecto responsivo para pantallas pequeñas */
    @media (max-width: 600px) {
      .tabla-calendario th.titulo-principal {
        font-size: 1.1rem;
      }
      .tabla-calendario th.subtitulo, 
      .tabla-calendario td {
        font-size: 0.85rem;
        padding: 8px;
      }
    }


    /* Estilos comunes para todos los botones */
.btn {
    width:60%;
    position: relative;
    padding: 5px 5px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background-color: #fff;
    color: #333;
    outline: none;
    transition: all 0.3s ease;
    /* Asegura que no se deformen en pantallas pequeñas */
    min-width: 160px;
    flex: 1 1 calc(20% - 10px); 
}

/* Ajuste para pantallas muy pequeñas (móviles) */
@media (max-width: 480px) {
    .btn {
        flex: 1 1 100%; 
    }
}

/* --- 1. BOTÓN DESPLAZAMIENTO (SLIDE) --- */
.btn-slide {
    display: flex;
    background: transparent;
    color: #3498db;
    border: 2px solid #16025c;
    overflow: hidden;
    z-index: 1;
}
.btn-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background-color: #16025c;
    transition: all 0.4s ease;
    z-index: -1;
}
.btn-slide:hover {
    color: #fff;
}
.btn-slide:hover::before {
    left: 0;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}