:root {
    --primary: #0066ff;
    --secondary: #00a8ff;
    --light-blue: #e3f2fd;
    --white: #ffffff;
    --dark-blue: #0051cc;
    --ink: #003366;
    --gradient-primary: linear-gradient(135deg, #0066ff 0%, #00a8ff 100%);
    --gradient-hover: linear-gradient(145deg, #0066ff 0%, #0051cc 100%);
    --gradient-card: linear-gradient(145deg, #ffffff 0%, #e3f2fd 100%);
    --shadow-soft: 0 10px 30px rgba(0, 102, 255, 0.10);
    --shadow-medium: 0 15px 40px rgba(0, 102, 255, 0.15);
    --shadow-hard: 0 20px 50px rgba(0, 102, 255, 0.20);
    --radius-lg: 20px;
    --radius-md: 14px;
    --container-max: 1280px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    color: #333;
    background-color: #f8fbfe;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(0, 168, 255, 0.06) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(0, 102, 255, 0.06) 0%, transparent 20%);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 { font-family: 'Montserrat', sans-serif; font-weight: 700; color: var(--ink); }

a { color: inherit; }

.section { max-width: var(--container-max); margin: 0 auto; padding: 0 1.5rem; }

.section-title { text-align: center; margin-bottom: 2.5rem; }
.section-title .eyebrow { display:block; color: var(--primary); text-transform: uppercase; font-weight: 700; letter-spacing: 4px; font-size: .8rem; margin-bottom: .5rem; }
.section-title h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); margin: 0; }

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #e3f2fd; }
::-webkit-scrollbar-thumb { background: var(--gradient-primary); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--dark-blue); }

/* ============ TOPBAR ============ */
.topbar {
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-soft);
    position: sticky;
    top: 0;
    z-index: 1030;
}
.topbar-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: .85rem 1.5rem;
  display: grid;
  gap: .7rem 1.5rem;
}
.topbar-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.topbar-brand {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  min-width: 0;
}
.topbar-logo img { max-height: 120px; display:block; }
.topbar-brand > img,
.small-logo-wrap img { max-height: 120px; width: auto; display: block; }

/* Small logo wrapper with caption */
.small-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px; /* reducir espacio entre imagen y leyenda */
  min-width: 0;
}
.small-logo-wrap img { max-width: 100%; }
.logo-caption {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: .78rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-top: -30px; /* subir la leyenda hacia la imagen */
}
.topbar-actions { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.topbar-action {
  border: 0;
  background: var(--gradient-primary);
  color: #fff !important;
  padding: .7rem 1.1rem;
  border-radius: 50px;
  font: inherit;
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  white-space: nowrap;
}
.topbar-action:hover { color: #fff !important; transform: translateY(-2px); }
.topbar-links {
    display: flex;
    align-items: center;
  justify-content: center;
    gap: clamp(.65rem, 1.5vw, 1.4rem);
    flex-wrap: nowrap;
    font-size: clamp(.82rem, .9vw, 1rem);
  padding-block: .9rem .75rem;
  border-top: 1px solid rgba(0, 102, 255, .1);
}
.topbar-links a { text-decoration: none; color: #4a5a6a; font-weight: 500; display:flex; align-items:center; gap:.35rem; transition: color .2s; white-space: nowrap; }
.topbar-links a:hover { color: var(--primary); }
.topbar-links i { color: var(--primary); }

.topbar-burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--light-blue);
  color: var(--primary);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.topbar-burger:hover { background: var(--gradient-primary); color: #fff; }

@media (max-width: 991px) {
  .topbar-burger { display: inline-flex; }

    .topbar-links {
      display: none;
      flex-direction: column;
      align-items: stretch;
      gap: .5rem;
      flex-wrap: wrap;
    }
    .topbar-links.is-open {
      display: flex;
    }
    .topbar-links a {
      padding: .65rem .75rem;
      border-radius: 10px;
      background: var(--light-blue);
    }

  .topbar-inner {
    padding: .7rem 1rem;
  }

  .topbar-main {
    flex-direction: column;
    align-items: stretch;
    gap: .9rem;
  }

  .topbar-brand {
    justify-content: center;
    flex-wrap: wrap;
    gap: .75rem 1.25rem;
  }

  .topbar-logo img { max-height: 72px; }
  .topbar-brand > img,
  .small-logo-wrap img { max-height: 64px; }
  .logo-caption { font-size: .68rem; margin-top: -4px; }

  .topbar-actions {
    justify-content: center;
    width: 100%;
  }

  .topbar-action {
    flex: 1 1 220px;
    text-align: center;
  }
}

@media (max-width: 576px) {
  .topbar-brand {
    gap: .5rem .7rem;
  }

  .topbar-logo,
  .topbar-brand > img,
  .small-logo-wrap {
    max-width: 30%;
  }

  .topbar-logo img,
  .topbar-brand > img,
  .small-logo-wrap img {
    max-height: 52px;
    width: auto;
  }

  .logo-caption { font-size: .6rem; letter-spacing: .3px; }
  .logo-caption { margin-top: -2px; }

  .topbar-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-action {
    flex-basis: auto;
    width: 100%;
  }
}

/* ============ HERO / CARRUSEL ============ */
.hero { position: relative; }
#header-carousel .carousel-item,
#header-carousel .carousel-item img {
    height: 88vh;
    min-height: 520px;
    max-height: 920px;
    object-fit: cover;
}
.carousel-caption {
    background: none;
    padding: 0;
    bottom: auto;
    top: 50%;
    transform: translateY(-50%);
    left: 5%;
    right: 5%;
    text-align: center;
}
.carousel-caption h5, .carousel-caption h1, .carousel-caption .btn {
    text-shadow: 2px 3px 10px rgba(0,0,0,.55);
}
.carousel-caption h1 { color:#fff; font-size: clamp(2rem, 5vw, 3.8rem); margin: .4rem 0 1.2rem; }
.carousel-caption h5 { color:#fff; letter-spacing: 3px; font-size: .95rem; }
.carousel-caption .btn-hero {
    display:inline-block;
    background: rgba(255,255,255,.15);
    border: 2px solid #fff;
    color: #fff;
    padding: .7rem 2.2rem;
    border-radius: 50px;
    text-decoration:none;
    font-weight: 600;
    backdrop-filter: blur(4px);
    transition: all .3s ease;
}
.carousel-caption .btn-hero:hover { background: #fff; color: var(--ink); }
.carousel-fade .carousel-item { transition: opacity 1.1s ease-in-out !important; }
@media (max-width: 768px) {
    #header-carousel .carousel-item, #header-carousel .carousel-item img { height: 72vh; min-height: 460px; }
}

/* Franja de acción bajo el hero */
.hero-cta-bar {
    background: #fff;
    box-shadow: var(--shadow-medium);
    border-radius: var(--radius-lg);
    margin: -60px auto 0;
    position: relative;
    z-index: 5;
    max-width: 1100px;
    padding: 1.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.hero-cta-bar .buttons { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-cta-bar img { max-width: 190px; height: auto; }
.btn-gradient {
    background: var(--gradient-primary);
    border: none;
    color: #fff;
    font-weight: 700;
    padding: .85rem 1.9rem;
    border-radius: 50px;
    box-shadow: var(--shadow-soft);
    transition: all .3s ease;
}
.btn-gradient:hover { transform: translateY(-3px); box-shadow: var(--shadow-hard); color:#fff; }
@media (max-width: 640px) {
    .hero-cta-bar { flex-direction: column; margin-top: -40px; text-align: center; }
    .hero-cta-bar .buttons { justify-content: center; width: 100%; }
    .hero-cta-bar .buttons .btn-gradient { flex: 1 1 auto; }
}

/* ============ INFO / VALORES (cajas) ============ */
.info-strip { padding: 4rem 0 1rem; }
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1.25rem;
}
.info-box {
    text-align: center;
    border-radius: 16px;
    padding: 1.75rem 1.25rem;
    background: var(--gradient-card);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255,255,255,.8);
    transition: all .35s cubic-bezier(.175,.885,.32,1.275);
    cursor: pointer;
    text-decoration: none;
    display: block;
}
.info-box i { font-size: 1.9rem; color: var(--primary); margin-bottom: .75rem; display:block; }
.info-box h6 { margin: 0 0 .3rem; font-size: .95rem; }
.info-box span { font-size: .8rem; color: #7a8a9a; }
.info-box:hover { background: var(--gradient-hover); transform: translateY(-8px); box-shadow: var(--shadow-hard); }
.info-box:hover i, .info-box:hover h6, .info-box:hover span { color: #fff !important; }

/* ============ CURSOS - GRID ============ */
.courses-section { padding: 4.5rem 0; }
.courses-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}
.cat-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    transition: transform .35s ease, box-shadow .35s ease;
    background: #fff;
}
.cat-item:hover { transform: translateY(-6px); box-shadow: var(--shadow-hard); }
.img-fluid2 { width: 100%; height: 200px; object-fit: cover; display: block; transition: transform .5s ease; }
.cat-item:hover .img-fluid2 { transform: scale(1.08); }
.cat-overlay {
    position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 1rem;
    background: linear-gradient(to top, rgba(0,0,0,.78), rgba(0,0,0,.15) 60%, transparent);
}
.cat-overlay h4 { margin: 0; color: #fff; font-size: 1.05rem; font-weight: 600; }
@media (max-width: 1100px) { .courses-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { .courses-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .courses-grid { grid-template-columns: 1fr; } }

/* Categorías (modal "todos los cursos") */
.category-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 30px -10px rgba(37,99,235,.15);
    transition: all .35s ease;
}
.category-card:hover { transform: translateY(-8px) scale(1.02); box-shadow: 0 20px 40px -10px rgba(6,182,212,.35); }
.category-card .card-img-top { height: 150px; }
.category-card .card-body { text-align: center; padding: 1.5rem; }

/* ============ NAV DE PROGRAMAS (pills) ============ */
.course-nav-wrap { padding: 0 0 4rem; }
.course-nav {
    background: var(--gradient-card);
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .75rem;
}
.course-nav-item {
    padding: .8rem 1.6rem;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    color: var(--ink);
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,102,255,.08);
    transition: all .3s cubic-bezier(.175,.885,.32,1.275);
    white-space: nowrap;
}
.course-nav-item:hover { background: var(--gradient-hover); color: #fff; transform: translateY(-4px); box-shadow: var(--shadow-hard); }

/* ============ CURSOS DE VERANO ============ */
.summer-section { padding: 1rem 0 4.5rem; }
.curso-card {
    border: none; background: #fff; border-radius: 18px; overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,.08); transition: all .35s ease;
    display: flex; flex-direction: column;
}
.curso-card:hover { transform: translateY(-8px); box-shadow: 0 22px 45px rgba(0,0,0,.14); }
.curso-card-img { background: #f8f9fa; padding: 1.2rem; }
.curso-card-img img { width: 100%; height: 160px; object-fit: cover; border-radius: 12px; transition: transform .5s ease; }
.curso-card:hover .curso-card-img img { transform: scale(1.06); }
.curso-card-body { padding: 0 1.2rem 1.4rem; text-align: center; display: flex; flex-direction: column; gap: .8rem; flex: 1; justify-content: space-between; }
.curso-card-body h3 { font-size: 1.05rem; margin: 0; }
.btn-whatsapp {
    background: linear-gradient(45deg, #25D366, #128C7E); color: #fff; border: none; font-weight: 600;
    border-radius: 50px; padding: .6rem 1rem; text-decoration:none; transition: all .3s ease;
}
.btn-whatsapp:hover { transform: scale(1.04); box-shadow: 0 12px 25px rgba(37,211,102,.35); color:#fff; }
.fade-slide-in { opacity: 0; transform: translateY(24px); animation: fadeSlideIn .7s ease forwards; animation-delay: calc(var(--delay, 0) * .08s); }
@keyframes fadeSlideIn { to { opacity: 1; transform: translateY(0); } }

/* ============ SEDES ============ */
.locations-section { padding: 4.5rem 0; background: linear-gradient(180deg, transparent, rgba(0,102,255,.04) 15%, rgba(0,102,255,.04) 85%, transparent); }
.locations-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.location-card {
    position: relative; border-radius: var(--radius-md); overflow: hidden; cursor: pointer;
    box-shadow: var(--shadow-soft); transition: all .35s ease; height: 260px;
}
.location-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.location-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hard); }
.location-card:hover img { transform: scale(1.08); }
.location-overlay {
    position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 1.1rem;
    background: linear-gradient(to top, rgba(0,20,50,.92), rgba(0,20,50,.35) 55%, transparent);
    color: #fff;
}
.location-region { text-transform: uppercase; font-size: .7rem; letter-spacing: 2px; color: #8fd3ff; font-weight: 700; }
.location-overlay h5 { color: #fff; margin: .2rem 0 .35rem; }
.location-overlay p { font-size: .78rem; margin: 0; opacity: .9; line-height: 1.35; }
@media (max-width: 992px) { .locations-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 576px) { .locations-grid { grid-template-columns: 1fr; } }

/* ============ MODALES ============ */
.modal-content { border-radius: 22px; overflow: hidden; border: none; box-shadow: var(--shadow-hard); }
.modal-header { background: var(--gradient-primary); color: #fff; border-bottom: none; padding: 1.4rem 1.7rem; }
.modal-title { font-weight: 700; font-size: 1.35rem; color: #fff; }
.modal-body { background: #fff; color: #333; padding: 1.6rem; background-size: cover; background-position: center; }
.modal-body-inner { background: rgba(255,255,255,.92); border-radius: 12px; padding: 1.1rem 1.3rem; }
.modal-body-inner h6 { color: var(--primary); text-transform: uppercase; font-size: .8rem; letter-spacing: 1px; margin-top: .6rem; }
.modal-body-inner h6:first-child { margin-top: 0; }
.modal-footer { background: var(--light-blue); border-top: none; padding: 1.1rem 1.5rem; }
.btn-close-white { filter: brightness(0) invert(1); opacity: .85; }
.submodal-card { cursor: pointer; border: none; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-soft); transition: all .4s cubic-bezier(.175,.885,.32,1.275); height: 100%; }
.submodal-card:hover { box-shadow: var(--shadow-hard); transform: translateY(-8px); }
.submodal-card img { height: 170px; object-fit: cover; width: 100%; }

/* Modal de programas académicos: más ancho, compacto y con mejor estilo */
#modalProgramas .modal-dialog {
  max-width: 1400px;
  width: min(96vw, 1400px);
  height: calc(100vh - 2rem);
  margin: 1rem auto;
}
#modalProgramas .modal-content {
  height: 100%;
    overflow: hidden;
    border: none;
    border-radius: 24px;
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.16);
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
}
#modalProgramas .modal-header {
    padding: 1.2rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
#modalProgramas .modal-header .modal-title {
    margin: 0 auto;
    text-align: center;
    width: 100%;
    padding-right: 2rem;
}
#modalProgramas .modal-header .btn-close {
    position: absolute;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
}
#modalProgramas .modal-body {
  min-height: 0;
  overflow: hidden;
    padding: 1.2rem 1.4rem 1.4rem;
}
#modalProgramas .modal-footer {
    padding: 1rem 1.4rem 1.2rem;
}
#modalProgramas .modal-content {
    margin: 1.2rem;
}

#modalProgramas .programas-frame-wrap {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
}

#modalProgramas .programas-frame-wrap iframe {
  display: block;
  width: 113.64%;
  height: 113.64%;
  border: 0;
  transform: scale(.88);
  transform-origin: top left;
}

#modalProgramas .category-card {
    min-height: 100%;
}
#modalProgramas .category-card .card-img-top {
    min-height: 150px;
    height: auto;
    padding: 1.2rem;
}
#modalProgramas .category-card .card-body {
    padding: 1rem 1rem 1.2rem;
}
#modalProgramas .category-card .card-title {
    font-size: 1rem;
    margin-bottom: .4rem;
}
#modalProgramas .category-card p {
    font-size: .9rem;
    line-height: 1.4;
}

@media (max-width: 768px) {
    #modalProgramas .modal-dialog {
        width: calc(100vw - 1rem);
        max-width: none;
    height: calc(100vh - 1rem);
    margin: .5rem auto;
    }
    #modalProgramas .modal-content {
        margin: .3rem;
        border-radius: 18px;
    }
    #modalProgramas .modal-header {
        padding: 1rem 1.1rem;
    }
    #modalProgramas .modal-body {
      padding: .75rem;
    }
    #modalProgramas .modal-footer {
        padding: .9rem 1rem;
    }
    #modalProgramas .category-card .card-img-top {
        min-height: 120px;
        padding: .9rem;
    }
    #modalProgramas .category-card .card-body {
        padding: .9rem;
    }
    #modalProgramas .category-card .card-title {
        font-size: .95rem;
    }
    #modalProgramas .category-card p {
        font-size: .85rem;
    }

    #modalProgramas .programas-frame-wrap iframe {
      width: 111.12%;
      height: 111.12%;
      transform: scale(.9);
    }
}

@media (max-width: 576px) {
    #modalProgramas .modal-dialog {
        width: calc(100vw - .5rem);
        margin: .25rem auto;
    }
    #modalProgramas .modal-content {
        margin: .15rem;
        border-radius: 16px;
    }
    #modalProgramas .modal-body {
        padding: .8rem;
    }
    #modalProgramas .modal-header .modal-title {
        font-size: 1.05rem;
        padding-right: 1.5rem;
    }
    #modalProgramas .row > [class^="col"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
    #modalProgramas .category-card {
        margin-bottom: .25rem;
    }
}

/* Modal inglés */
.bg-image-wrapper { position: relative; min-height: 340px; background-image: url('img/america.jpeg'); background-size: cover; background-position: center; }
.background-overlay { position: absolute; inset: 0; background: rgba(255,255,255,.85); backdrop-filter: blur(3px); }
.content-wrapper { position: relative; z-index: 2; color: #212529; }
.content-wrapper h6 { color: #b45309; }
.content-wrapper ul li { transition: transform .2s ease; }
.content-wrapper ul li:hover { transform: translateX(6px); }

/* ============ WHATSAPP FLOTANTE ============ */
#whatsapp-button {
    position: fixed; right: 22px; bottom: 22px; z-index: 1040;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border-radius: 50%; width: 62px; height: 62px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 25px rgba(37,211,102,.4);
    transition: all .3s cubic-bezier(.175,.885,.32,1.275);
}
#whatsapp-button:hover { transform: scale(1.1); box-shadow: 0 15px 35px rgba(37,211,102,.5); }
#whatsapp-button img { width: 30px; height: 30px; }

/* ============ FOOTER ============ */
footer.site-footer { background: #0b1b2b; color: #cdd9e6; padding: 4.5rem 0 0; margin-top: 5rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2.5rem; max-width: var(--container-max); margin: 0 auto; padding: 0 1.5rem 3rem; }
.footer-grid h5 { color: var(--secondary); text-transform: uppercase; letter-spacing: 3px; font-size: .85rem; margin-bottom: 1.3rem; }
.footer-grid p { margin: 0 0 .6rem; font-size: .92rem; }
.footer-links { display: flex; flex-direction: column; gap: .6rem; }
.footer-links a { color: #cdd9e6; text-decoration: none; font-size: .92rem; }
.footer-links a:hover { color: var(--secondary); }
.footer-social { display: flex; gap: .6rem; margin-top: 1.2rem; }
.footer-social a { width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; text-decoration: none; transition: all .25s; }
.footer-social a:hover { background: var(--primary); border-color: var(--primary); }
.footer-newsletter .input-group input { padding: .9rem 1rem; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); color: #fff; }
.footer-newsletter .input-group input::placeholder { color: #93a4b5; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 1.3rem 1.5rem; }
.footer-bottom-inner { max-width: var(--container-max); margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .75rem; font-size: .85rem; }
.footer-bottom-inner a { color: #cdd9e6; text-decoration: none; }
.footer-bottom-inner ul { list-style: none; display: flex; gap: 1.2rem; margin: 0; padding: 0; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* Accesibilidad: foco visible */
a:focus-visible, button:focus-visible, .cat-item:focus-visible, .location-card:focus-visible {
    outline: 3px solid var(--secondary); outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}


/* ============================================================ */
/* CORRECCIONES DE BUGS - AGREGADO */
/* ============================================================ */

/* 1. Eliminar backdrop gris y permitir interacción con la página */
.modal-backdrop {
    background: transparent !important;
    opacity: 0 !important;
    pointer-events: none !important;
    display: none !important;
}
.modal {
    pointer-events: none;
}
.modal-dialog {
    pointer-events: auto;
}

/* 2. Restaurar variables sobrescritas por style.css */
:root {
    --primary: #0066ff;
    --secondary: #00a8ff;
    --light-blue: #e3f2fd;
    --white: #ffffff;
    --dark-blue: #0051cc;
    --ink: #003366;
    --gradient-primary: linear-gradient(135deg, #0066ff 0%, #00a8ff 100%);
    --gradient-hover: linear-gradient(145deg, #0066ff 0%, #0051cc 100%);
    --gradient-card: linear-gradient(145deg, #ffffff 0%, #e3f2fd 100%);
    --shadow-soft: 0 10px 30px rgba(0, 102, 255, 0.10);
    --shadow-medium: 0 15px 40px rgba(0, 102, 255, 0.15);
    --shadow-hard: 0 20px 50px rgba(0, 102, 255, 0.20);
}

/* 3. Restaurar tipografía */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--ink);
}

/* 4. Restaurar estilos de modal */
.modal-content {
    border-radius: 22px !important;
    border: none !important;
    overflow: hidden !important;
}
.modal-header {
    background: var(--gradient-primary) !important;
    color: #fff !important;
    border-bottom: none !important;
}
.modal-title {
    color: #fff !important;
    font-weight: 700 !important;
}
.modal-footer {
    background: var(--light-blue) !important;
    border-top: none !important;
}

/* 5. Restaurar botones primarios */
.btn-primary {
    background: var(--gradient-primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
}
.btn-primary:hover {
    background: var(--gradient-hover) !important;
    border-color: var(--dark-blue) !important;
}

/* 6. Restaurar enlaces */
a {
    color: inherit;
}
a:hover {
    color: var(--primary);
}

/* 7. Gradientes para tarjetas de categoría en modales */
.grad-1 { background: linear-gradient(135deg, #0066ff, #00a8ff) !important; }
.grad-2 { background: linear-gradient(135deg, #ff6b6b, #feca57) !important; }
.grad-3 { background: linear-gradient(135deg, #48dbfb, #0abde3) !important; }
.grad-4 { background: linear-gradient(135deg, #1dd1a1, #10ac84) !important; }
.grad-5 { background: linear-gradient(135deg, #5f27cd, #341f97) !important; }
.grad-6 { background: linear-gradient(135deg, #ff9ff3, #f368e0) !important; }
.grad-7 { background: linear-gradient(135deg, #00d2d3, #01a3a4) !important; }

/* 8. Corregir opacidad de imágenes */
.img-fluid1, .img-fluid2 {
    opacity: 1 !important;
}

/* 9. Corregir carousel indicators de Bootstrap 5 */
.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.5);
    border: 2px solid rgba(255,255,255,0.8);
    margin: 0 6px;
    transition: all 0.3s ease;
}
.carousel-indicators button.active {
    background-color: #fff;
    transform: scale(1.2);
}

/* 10. Corregir locations grid - eliminar comportamiento de columnas Bootstrap */
.locations-grid > .col-lg-4,
.locations-grid > .col-md-6 {
    padding: 0;
    max-width: none;
    flex: none;
}

/* 11. Body background */
body {
    background-color: #f8fbfe !important;
    color: #333 !important;
}

/* 12. Text primary */
.text-primary {
    color: var(--primary) !important;
}

/* 13. Prevenir acumulación de backdrops huérfanos */
.modal-backdrop.show {
    opacity: 0 !important;
}

/* 14. Modal de inglés - forzar header consistente */
#modalIngles .modal-header {
    background: var(--gradient-primary) !important;
}
#modalIngles .modal-header .btn-close {
    filter: brightness(0) invert(1);
}
#modalIngles .modal-title {
    color: #fff !important;
}

/* 15. Corregir z-index de modales para evitar superposición problemática */
.modal {
    z-index: 1050;
}
#whatsapp-button {
  z-index: 1060;
}

/* 16. Asegurar que las tarjetas de curso mantengan proporción */
.category-card .card-img-top {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}



/* ============================================================ */
/* FIX: Cursos cards — eliminar lag y parpadeo al cargar        */
/* ============================================================ */

/* Forzar visibilidad inmediata de imágenes de cursos */
.courses-grid .img-fluid2 {
    opacity: 1 !important;
    transform: none !important;
    transition: transform .35s ease !important; /* solo hover zoom */
    will-change: auto;
}

/* Optimizar cat-item para evitar repaints */
.cat-item {
    will-change: auto;
    transform: translateZ(0); /* force layer sin costo de memoria */
    contain: layout style; /* limita el área de repaint */
}
.cat-item:hover {
    will-change: transform;
}

/* Prevenir que el observer del JS aplique estilos a estas imágenes */
.courses-grid .img-fluid2[style*="opacity: 0"] {
    opacity: 1 !important;
}
.courses-grid .img-fluid2[style*="transform: scale(1.05)"] {
    transform: none !important;
}



/* ============================================================
   GRID CURSOS - ULTRA LIGERO
   ============================================================ */

.cursos-grid-rapido {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    width: 100%;
}

/* TARJETA */
.curso-card {
    position: relative;
    height: 200px;
    min-width: 0;
    overflow: hidden;
    border-radius: 12px;
    background: #e9eef3;
    cursor: pointer;

    /* MUY IMPORTANTE:
       no usar transform ni will-change */
    transition: box-shadow .18s ease;
}

/* IMAGEN */
.curso-card img {
    display: block;
    width: 100%;
    height: 100%;

    object-fit: cover;

    /* Sin transform */
    transform: none;

    /* Sin animación */
    transition: none;

    /* Evita problemas de decodificación */
    image-rendering: auto;
}

/* OSCURECIMIENTO */
.curso-card::after {
    content: "";
    position: absolute;
    inset: 0;

    background: linear-gradient(
        to top,
        rgba(0,0,0,.75),
        rgba(0,0,0,0.02)
    );

    pointer-events: none;
}

/* TEXTO */
.curso-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;

    z-index: 2;

    padding: 16px;

    transform: none;
    transition: none;
}

.curso-overlay h4 {
    margin: 0;

    color: #fff;

    font-size: 16px;
    line-height: 1.25;
    font-weight: 700;

    text-shadow: 0 1px 3px rgba(0,0,0,.5);
}

/* HOVER MUY LIGERO */
.curso-card:hover {
    box-shadow: 0 6px 18px rgba(0,0,0,.14);
}


/* ============================================================
   TABLET
   ============================================================ */

@media (max-width: 992px) {

    .cursos-grid-rapido {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .curso-card {
        height: 190px;
    }
}


/* ============================================================
   CELULAR
   ============================================================ */

@media (max-width: 650px) {

    .cursos-grid-rapido {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .curso-card {
        height: 165px;
        border-radius: 10px;
    }

    .curso-overlay {
        padding: 11px;
    }

    .curso-overlay h4 {
        font-size: 14px;
    }
}


/* ============ TOPBAR DROPDOWN HOVER (Material) ============ */
.hover-dropdown-wrap{
    position: relative;
    display: inline-flex;
}
.hover-dropdown-panel{
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    max-width: calc(100vw - 2rem);
    padding-top: 14px; /* puente invisible para no perder el hover */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px) scale(.97);
    transition: opacity .28s cubic-bezier(.4,0,.2,1), transform .28s cubic-bezier(.4,0,.2,1), visibility .28s;
    z-index: 1035;
}
.hover-dropdown-wrap:hover .hover-dropdown-panel,
.hover-dropdown-wrap:focus-within .hover-dropdown-panel{
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}
.hdp-inner{
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-hard);
    overflow: hidden;
    border: 1px solid rgba(0,102,255,.08);
}
.hdp-header{
    background: var(--gradient-primary);
    color: #fff;
    padding: .9rem 1.3rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: .85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: .6rem;
}
.hdp-grid{
    display: grid;
    grid-template-columns: repeat(3, minmax(150px, 1fr));
    gap: .35rem;
    padding: .9rem;
    width: 620px;
    max-width: 80vw;
}
.hdp-list{
    display: flex;
    flex-direction: column;
    gap: .3rem;
    padding: .8rem;
    width: 300px;
    max-width: 82vw;
}
.hdp-item{
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .6rem .7rem;
    border-radius: 12px;
    text-decoration: none;
    color: var(--ink);
    font-size: .82rem;
    font-weight: 500;
    transition: background .2s ease, transform .2s ease, color .2s ease;
    cursor: pointer;
}
.hdp-item i{
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background: var(--light-blue);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    transition: background .2s ease, color .2s ease;
}
.hdp-item:hover{
    background: var(--light-blue);
    color: var(--dark-blue);
    transform: translateX(3px);
}
.hdp-item:hover i{
    background: var(--gradient-primary);
    color: #fff;
}
.hdp-item-all{
    border-top: 1px solid rgba(0,102,255,.12);
    margin-top: .3rem;
    padding-top: .75rem;
    font-weight: 700;
    color: var(--primary);
}
@media (max-width: 991px){
  .hover-dropdown-wrap {
    position: static;
  }

  .hover-dropdown-panel {
    left: 50%;
    right: auto;
    width: min(92vw, 620px);
    max-width: 92vw;
    transform: translate(-50%, -10px) scale(.97);
  }

  .hover-dropdown-wrap.is-open .hover-dropdown-panel,
  .hover-dropdown-wrap:focus-within .hover-dropdown-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0) scale(1);
  }

  .hdp-panel-careers .hdp-inner {
    width: min(92vw, 620px);
  }

  .hdp-career-grid {
    grid-template-columns: repeat(2, 1fr);
    max-height: 60vh;
  }
}

@media (max-width: 576px){
  .hover-dropdown-panel {
    width: min(92vw, 360px);
  }

  .hdp-panel-careers .hdp-inner {
    width: min(92vw, 360px);
  }

  .hdp-career-grid {
    grid-template-columns: 1fr;
    max-height: 55vh;
  }
}


/* ============ PANEL CARRERAS PROFESIONALES ============ */
.hdp-panel-careers .hdp-inner{ width: 760px; max-width: 92vw; }
.hdp-career-grid{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .9rem;
    padding: 1rem;
    max-height: 460px;
    overflow-y: auto;
}
.hdp-career-card{
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    min-height: 195px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-shadow: 0 8px 20px rgba(0,0,0,.10);
    transition: transform .3s cubic-bezier(.175,.885,.32,1.275), box-shadow .3s ease;
    background: linear-gradient(135deg, var(--card-from), var(--card-to));
}
.hdp-career-card:hover{ transform: translateY(-5px) scale(1.02); box-shadow: 0 16px 32px rgba(0,0,0,.20); }
.hcc-bg{
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 5rem; color: #fff; opacity: .20; pointer-events: none;
}
.hcc-body{
    position: relative; z-index: 2;
    padding: .9rem .95rem 1rem;
    background: linear-gradient(to top, rgba(0,0,0,.62), rgba(0,0,0,.05) 75%);
}
.hcc-body h6{ color:#fff; font-family:'Montserrat',sans-serif; font-weight:700; font-size:.9rem; margin:0 0 .25rem; }
.hcc-body p{ color: rgba(255,255,255,.92); font-size:.72rem; line-height:1.3; margin:0 0 .5rem; min-height: 2.3em; }
.hcc-meta{ display:flex; flex-wrap:wrap; gap:.3rem; margin-bottom:.6rem; }
.hcc-meta span{ background: rgba(255,255,255,.2); color:#fff; font-size:.6rem; font-weight:600; padding:.15rem .5rem; border-radius:20px; backdrop-filter: blur(2px); }
.hcc-btn{
    display: inline-flex; align-items: center; gap: .35rem;
    background: #fff; color: var(--card-to);
    border: none; font-size: .72rem; font-weight: 700;
    padding: .4rem .85rem; border-radius: 30px;
    text-decoration: none; cursor: pointer;
    transition: all .25s ease;
}
.hcc-btn:hover{ background: var(--card-to); color: #fff; transform: translateX(2px); }
.hdp-panel-careers .hdp-item-all{ margin: 0 1rem 1rem; }



