/* =====================================================================
   malgom.css — ajustes propios sobre la plantilla
   ===================================================================== */

/* ---------- Tarjetas de portada: un solo párrafo, visible en táctil ---------- */
.features-content p,
.features-content p.hidden-sm { display: block; }
@media (hover: none), (max-width: 992px) {
  .features-post .content-hide { display: block !important; }
}

/* ---------- Logo: que no se parta en móvil ---------- */
.main-header .logo a { white-space: nowrap; }
@media screen and (max-width: 767px) {
  .main-header .logo { padding-left: 16px !important; }
  .main-header .logo a { font-size: 22px; }
}
@media screen and (max-width: 400px) {
  .main-header .logo a { font-size: 18px; letter-spacing: -0.3px; }
}

/* ---------- Portada ---------- */
/* Imagen de respaldo: se ve aunque el navegador no soporte vídeo */
.main-banner {
  background: #162239 url(../images/video-portada-poster.webp) center / cover no-repeat;
  min-height: 100vh;
}
#bg-video { display: block; width: 100%; height: 100vh; object-fit: cover; }
.main-banner .caption h1 {
  margin-top: 30px;
  margin-bottom: 30px;
  font-size: 64px;
  text-transform: uppercase;
  font-weight: 800;
  color: #fff;
  letter-spacing: 1px;
}
.main-banner .caption h1 em { font-style: normal; color: #f5a425; font-weight: 900; }
@media screen and (max-width: 1180px) { .main-banner .caption h1 { font-size: 58px; } }
@media screen and (max-width: 767px)  { .main-banner .caption h1 { font-size: 36px; } }

/* ---------- Pestañas (sustituye a jQuery UI) ---------- */
#tabs .tabs-content > article { display: none; }
#tabs .tabs-content > article.activo { display: block; }
#tabs ul li a { cursor: pointer; }
#tabs .tabs-content .main-button a,
.boton-naranja {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 22px;
  background: #f5a425;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  border: 0;
  border-radius: 3px;
  cursor: pointer;
}
.boton-naranja:hover { background: #f8b44b; color: #fff; }

/* ---------- Ventanas emergentes ---------- */
.modal-content { border-radius: 4px; }
.modal-header h5 { font-weight: 700; color: #162239; }
.modal-body { font-size: 15px; line-height: 1.6; color: #333; }

/* ---------- Formularios ---------- */
.campo-trampa { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
form select.form-control {
  color: #fff;
  background-color: rgba(250,250,250,0.1);
  border: none;
  border-radius: 0;
  height: 40px;
  font-size: 13px;
  margin-bottom: 30px;
}
form select.form-control option { color: #162239; }
.casilla-privacidad {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 20px;
  text-align: left;
}
form .casilla-privacidad input[type="checkbox"] { margin-top: 3px; margin-bottom: 0; padding: 0; flex: 0 0 auto; width: 16px; height: 16px; }
.casilla-privacidad a { color: #f5a425; text-decoration: underline; }
.info-legal {
  color: rgba(255,255,255,0.75);
  font-size: 11px;
  line-height: 1.5;
  margin: -8px 0 20px;
  text-align: left;
}
.info-legal a { color: #f5a425; }
.estado-form {
  margin-top: 15px;
  padding: 12px 15px;
  font-size: 14px;
  border-radius: 3px;
  display: none;
}
.estado-form.ok { display: block; background: #1e7b4a; color: #fff; }
.estado-form.error { display: block; background: #a83232; color: #fff; }
.estado-form.enviando { display: block; background: rgba(255,255,255,0.15); color: #fff; }
button.button[disabled] { opacity: .6; cursor: wait; }

/* ---------- Datos de contacto y mapa ---------- */
.datos-contacto {
  color: #fff;
  margin-top: 30px;
  font-size: 14px;
  line-height: 1.8;
}
.datos-contacto i { color: #f5a425; width: 22px; }
.mapa-aviso {
  height: 422px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  padding: 30px;
  background: rgba(22,34,57,0.85);
  color: #fff;
  font-size: 14px;
  line-height: 1.6;
}
.mapa-aviso i { font-size: 40px; color: #f5a425; }
@media (max-width: 767px) { #map { margin-top: 30px; } .mapa-aviso { height: 300px; } }

/* ---------- Pie ---------- */
footer .enlaces-legales { margin-top: 8px; font-size: 12px; }
footer .enlaces-legales a,
footer .enlaces-legales button {
  color: rgba(255,255,255,0.8);
  background: none;
  border: 0;
  padding: 0;
  margin: 0 8px;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}
footer .enlaces-legales a:hover,
footer .enlaces-legales button:hover { color: #f5a425; }

/* ---------- Panel de privacidad (cookies) ----------
   Se llama "mlg-pref" a propósito: algunos navegadores y bloqueadores
   ocultan automáticamente los elementos con nombres típicos de avisos de cookies. */
.mlg-pref {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 2000;
  max-width: 720px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  margin: 0 auto;
  background: #fff;
  color: #222;
  padding: 20px;
  border-radius: 6px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.35);
  font-size: 14px;
  line-height: 1.55;
}
.mlg-pref[hidden], .mlg-pref [hidden] { display: none !important; }
.mlg-pref p { font-size: 14px; margin: 0 0 12px; color: #222; }
.mlg-pref .mlg-pref-titulo { font-size: 16px; font-weight: 800; color: #162239; margin-bottom: 6px; }
.mlg-pref a { color: #b36a00; text-decoration: underline; }
.mlg-pref-opciones { border-top: 1px solid #e5e5e5; margin: 4px 0 14px; padding-top: 12px; }
.mlg-pref-opcion { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 12px; font-size: 13px; line-height: 1.5; cursor: pointer; color: #222; font-weight: 400; }
.mlg-pref-opcion input { width: 18px; height: 18px; margin-top: 2px; flex: 0 0 auto; accent-color: #162239; }
.mlg-pref-opcion strong { color: #162239; }
.mlg-pref-botones, .mlg-estado-botones { display: flex; flex-wrap: wrap; gap: 10px; }
.mlg-btn {
  flex: 1 1 140px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 3px;
  cursor: pointer;
  border: 2px solid #162239;
}
.mlg-btn-pri { background: #162239; color: #fff; }
.mlg-btn-sec { background: #fff; color: #162239; }
.mlg-btn:focus-visible { outline: 3px solid #f5a425; outline-offset: 2px; }

/* Bloque de configuración dentro de cookies.html */
.mlg-estado {
  background: #f4f5f7;
  border-left: 4px solid #f5a425;
  padding: 16px 18px;
  margin: 10px 0 20px;
  border-radius: 3px;
  transition: box-shadow .3s;
}
.mlg-estado.resaltado { box-shadow: 0 0 0 4px rgba(245,164,37,.55); }
.mlg-estado-botones { max-width: 520px; }

/* ---------- Páginas legales ---------- */
body.legal {
  background: #f4f5f7;
  color: #222;
  padding-top: 110px;
}
body.legal .main-header .main-menu a { line-height: 80px; }
.legal-contenido {
  max-width: 860px;
  margin: 0 auto 60px;
  padding: 40px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.legal-contenido h1 { font-size: 30px; font-weight: 800; color: #162239; margin-bottom: 6px; }
.legal-contenido .actualizado { color: #777; font-size: 13px; margin-bottom: 30px; }
.legal-contenido h2 { font-size: 19px; font-weight: 700; color: #162239; margin: 32px 0 12px; }
.legal-contenido p, .legal-contenido li { font-size: 15px; line-height: 1.7; }
.legal-contenido ul { list-style: disc; padding-left: 22px; margin-bottom: 1rem; }
.legal-contenido table { width: 100%; font-size: 14px; margin: 10px 0 20px; border-collapse: collapse; }
.legal-contenido th, .legal-contenido td { border: 1px solid #ddd; padding: 8px 10px; vertical-align: top; }
.legal-contenido th { background: #162239; color: #fff; }
.legal-contenido .dato { background: #fff3cd; padding: 0 4px; border-radius: 2px; }
.legal-contenido a { color: #b36a00; text-decoration: underline; }
@media (max-width: 767px) {
  body.legal { padding-top: 90px; }
  .legal-contenido { padding: 24px 16px; margin: 0 0 40px; border-radius: 0; }
  .legal-contenido h1 { font-size: 24px; }
  .legal-contenido table { display: block; overflow-x: auto; }
}

/* =====================================================================
   Imágenes: mantener su proporción (los atributos width/height del HTML
   solo sirven para reservar el hueco mientras cargan)
   ===================================================================== */
.tabs-content img,
.video-item figure img,
section.courses .item img { height: auto; }

/* =====================================================================
   MÓVIL: las imágenes acompañan al texto, no lo sustituyen
   ===================================================================== */
@media screen and (max-width: 767px) {

  /* --- "¿Por qué elegir...?": pestañas como fila deslizable --- */
  #tabs ul {
    -webkit-column-count: auto; -moz-column-count: auto; column-count: auto;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin: 0;
    padding: 2px 0 8px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  #tabs ul::-webkit-scrollbar { display: none; }
  #tabs ul::after { display: none; }
  #tabs ul li { flex: 0 0 auto; scroll-snap-align: start; }
  #tabs ul li a {
    padding: 8px 14px;
    font-size: 12px;
    letter-spacing: .5px;
    white-space: nowrap;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 20px;
  }
  #tabs ul li a:before,
  #tabs ul li a:after { display: none; }
  #tabs ul .ui-tabs-active a { background: #f5a425; border-color: #f5a425; color: #fff; }

  /* --- Contenido de cada pestaña: miniatura a la izquierda + texto --- */
  .tabs-content { margin-top: 22px; text-align: left; }
  .tabs-content .row { flex-wrap: nowrap; align-items: flex-start; margin: 0; }
  .tabs-content .row > [class*="col-"] { padding: 0; }
  .tabs-content .row > [class*="col-"]:first-child { flex: 0 0 92px; max-width: 92px; margin-right: 14px; }
  .tabs-content .row > [class*="col-"]:last-child { flex: 1 1 auto; max-width: none; min-width: 0; }
  .tabs-content img {
    width: 92px;
    height: 92px !important;
    object-fit: cover;
    border-radius: 6px;
    padding: 0;
  }
  #tabs h4 { margin-top: 0; margin-bottom: 8px; font-size: 20px; }
  #tabs p { font-size: 14px; line-height: 22px; }
  #tabs .tabs-content .boton-naranja { margin-top: 8px; }

  /* --- Especialidades: tarjetas más bajas, se ve que hay más al lado --- */
  section.courses { padding: 0 0 70px; }
  section.courses .item img { height: 120px !important; object-fit: cover; }
  section.courses .item .down-content { padding: 16px 18px; min-height: 130px; }
  section.courses .item .down-content h4 { font-size: 15px; margin-bottom: 8px; }
  section.courses .item .down-content p { margin-bottom: 0; }

  /* --- Vídeo: miniatura apaisada y discreta --- */
  section.video .left-content { margin-bottom: 24px; }
  .video-item figure img { height: 170px !important; object-fit: cover; }
  .video-item .video-caption { height: 56px; padding: 18px 16px; }
  .video-item .video-caption h4 { font-size: 13px; margin: 0; }
  .video-item figure a:before { width: 44px; height: 44px; bottom: 6px; right: 12px; }
  .video-item figure a:after { border-width: 10px 0 10px 15px; bottom: 18px; right: 25px; }
}
