/* =========================================================
   TAEKWONDO CANAL II — Acabado visual y responsive
   Ajustes finales de marca, contacto, formulario y accesibilidad.
   ========================================================= */

/* Marca: zona segura real alrededor del símbolo y jerarquía de color correcta. */
.brand,
.legal-brand{
  min-width:0;
}
.brand-mark{
  width:58px;
  height:58px;
  padding:2px;
  box-sizing:border-box;
  overflow:visible;
}
.brand-mark img,
.legal-brand img{
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center;
  display:block;
}
.brand .brand-name{
  min-width:0;
  display:block;
  color:var(--white, #f3efe6);
}
.brand .brand-accent{
  color:var(--red, #d81e2c);
}
.brand .brand-name small{
  color:var(--grey, #9a9691);
}
.brand-footer .brand-name{
  display:inline-block;
}
.legal-brand img{
  padding:2px;
}


/* La cabecera dispone de más ancho útil y cambia a menú compacto antes de solaparse. */
.nav-row{
  max-width:1360px;
}
@media (min-width:1221px){
  .brand{ font-size:1.1rem; }
  .brand small{ letter-spacing:2px; }
  .primary-nav a{
    padding-left:10px;
    padding-right:10px;
    letter-spacing:1px;
    font-size:.79rem;
  }
  .nav-cta{
    padding-left:15px;
    padding-right:15px;
    letter-spacing:1.2px;
    font-size:.75rem;
  }
}

/* Ningún texto o control puede forzar desbordamiento horizontal. */
main,
section,
.wrap,
.contact-grid,
.contact-grid > *,
form,
.field,
.row-2{
  min-width:0;
}
a[href^="mailto:"]{
  overflow-wrap:anywhere;
  word-break:break-word;
}

/* Bloque de contacto más limpio y enlaces claramente interactivos. */
.info-block{
  margin-bottom:22px;
  padding-bottom:18px;
  border-bottom:1px solid rgba(255,255,255,.075);
}
.info-block p{
  max-width:100%;
  line-height:1.65;
}
.info-block a{
  color:var(--white);
  text-decoration-line:underline;
  text-decoration-color:rgba(216,30,44,.65);
  text-decoration-thickness:1px;
  text-underline-offset:4px;
  transition:color .2s ease, text-decoration-color .2s ease;
}
.info-block a:hover,
.info-block a:focus-visible{
  color:var(--red);
  text-decoration-color:var(--red);
}
.contact-email{
  max-width:100%;
}
.contact-email a{
  display:inline;
  max-width:100%;
  font-size:clamp(.9rem,1.25vw,1rem);
  letter-spacing:-.012em;
  overflow-wrap:anywhere;
  word-break:normal;
}
.contact-email .email-local,
.contact-email .email-domain{
  white-space:nowrap;
}

/* Formulario: tarjeta visual, controles consistentes y estado legible. */
#bookingForm{
  align-self:start;
  padding:clamp(24px,3.2vw,36px);
  background:linear-gradient(145deg,rgba(30,30,33,.97),rgba(21,21,23,.98));
  border:1px solid rgba(255,255,255,.10);
  border-top:3px solid var(--red);
  box-shadow:0 24px 60px rgba(0,0,0,.28);
}
.form-intro{
  padding-bottom:22px;
  margin-bottom:4px;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.form-intro .eyebrow{
  margin-bottom:10px;
}
.form-intro h3{
  margin:0 0 8px;
  font-size:clamp(1.35rem,2.2vw,1.75rem);
  line-height:1.15;
}
.form-intro p{
  color:var(--grey);
  font-size:.9rem;
  line-height:1.6;
}
.field input,
.field select,
.field textarea{
  display:block;
  width:100%;
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
  border-radius:var(--radius,2px);
}
.field select{
  text-overflow:ellipsis;
}
.field textarea{
  resize:vertical;
  min-height:116px;
}
.consent{
  min-width:0;
}
.consent input{
  width:18px;
  height:18px;
  min-width:18px;
  flex:0 0 18px;
  accent-color:var(--red);
}
.consent label{
  min-width:0;
  overflow-wrap:anywhere;
}
.submit-btn{
  min-height:54px;
  width:100%;
  border-radius:var(--radius,2px);
  box-shadow:0 10px 28px rgba(216,30,44,.16);
}
#formStatus:empty{
  display:none;
}
#formStatus:not(:empty){
  display:block;
  min-height:0;
  padding:12px 14px;
  border:1px solid currentColor;
  background:rgba(255,255,255,.035);
  line-height:1.5;
}

/* Detalles de acabado global. */
.btn,
.nav-cta,
.submit-btn,
.back-link{
  -webkit-tap-highlight-color:transparent;
}
.map-frame{
  overflow:hidden;
  background:var(--black-2);
}
footer .footer-links a,
.legal-footer a{
  text-underline-offset:4px;
}

@media (max-width:1220px){
  .brand-mark{
    width:52px;
    height:52px;
  }
}

@media (max-width:560px){
  .brand-mark{
    width:46px;
    height:46px;
    padding:2px;
  }
  .brand .brand-name{
    font-size:.95rem;
    line-height:1.05;
  }
  #bookingForm{
    padding:22px 18px 24px;
  }
  .form-intro{
    padding-bottom:18px;
  }
  .contact-email a{
    font-size:.91rem;
  }
  .contact-email .email-domain{
    display:block;
  }
  .btn-row .btn{
    width:100%;
    text-align:center;
  }
  .map-frame{
    height:240px;
  }
}

@media (max-width:380px){
  .brand .brand-name{
    font-size:.86rem;
    letter-spacing:.5px;
  }
  .contact-email .email-local{
    white-space:normal;
  }
}

/* Pantallas muy estrechas: los títulos y la cabecera legal nunca fuerzan ancho extra. */
@media (max-width:380px){
  :where(h1,h2,h3),
  :where(h1,h2,h3) span{
    text-wrap:wrap;
    white-space:normal;
    overflow-wrap:anywhere;
  }
  .about-media::before{
    top:-8px;
    left:-8px;
  }
  .about-media::after{
    right:-8px;
    bottom:-8px;
  }
  .legal-nav{
    gap:9px;
  }
  .legal-brand{
    gap:7px;
    flex:1 1 auto;
    min-width:0;
  }
  .legal-brand img{
    width:40px;
    height:40px;
    flex:0 0 40px;
  }
  .legal-brand span{
    display:block;
    max-width:102px;
    font-size:.72rem;
    line-height:1.15;
    overflow-wrap:anywhere;
  }
  .back-link{
    flex:0 0 auto;
    padding:7px 8px;
    font-size:.62rem;
    letter-spacing:.3px;
    white-space:nowrap;
  }
}


/* =========================================================
   V3B — últimos ajustes solicitados
   ========================================================= */

/* El símbolo respira dentro de la cabecera y no roza ningún borde. */
.brand-mark{
  padding:5px;
}
.legal-brand img{
  padding:5px;
}

/* Mantiene “Sobre nosotros” perfectamente centrado y en una sola línea. */
.primary-nav ul a[href="sobre-nosotros.html"]{
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  white-space:nowrap;
}

/* Contraste máximo para la llamada a la acción del menú. */
.primary-nav .nav-cta,
.primary-nav .nav-cta:visited{
  color:#fff !important;
}
.primary-nav .nav-cta:hover,
.primary-nav .nav-cta:focus-visible{
  color:#fff !important;
}

@media (max-width:1220px){
  .brand-mark{
    padding:4px;
  }
}

@media (max-width:560px){
  .brand-mark{
    padding:4px;
  }
}

/* =========================================================
   V3C — Equipo alineado y adaptación móvil reforzada
   ========================================================= */

html{
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
}

/* Al navegar mediante anclas, el encabezado fijo no tapa la sección. */
section[id],
#reserva,
#profesores{
  scroll-margin-top:calc(var(--header-h, 78px) + 18px + env(safe-area-inset-top));
}

/* Fichas del equipo: fotografía y contenido forman una sola pieza visual. */
#profesores .team-detail{
  display:grid;
  grid-template-columns:minmax(290px, 34%) minmax(0, 1fr);
  gap:0;
  align-items:stretch;
  margin-bottom:42px;
  overflow:hidden;
  background:linear-gradient(145deg, rgba(30,30,33,.98), rgba(18,18,20,.99));
  border:1px solid rgba(255,255,255,.10);
  border-top:3px solid var(--red);
  box-shadow:0 22px 54px rgba(0,0,0,.24);
}
#profesores .team-detail:last-child{
  margin-bottom:0;
}
#profesores .team-detail .team-photo{
  position:relative;
  width:100%;
  height:100%;
  min-height:100%;
  aspect-ratio:auto;
  overflow:hidden;
  border:0;
  border-right:1px solid rgba(255,255,255,.10);
  background:var(--black-2);
}
#profesores .team-detail .team-photo::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:linear-gradient(180deg, transparent 70%, rgba(10,10,11,.20) 100%);
}
#profesores .team-detail .team-photo img{
  width:100%;
  height:100%;
  min-height:100%;
  object-fit:cover;
  object-position:50% 18%;
}
#profesores #lucia-gomez-corbaton .team-photo img{
  object-position:50% 16%;
}
#profesores #pablo-rodas-fernandez .team-photo img{
  object-position:50% 14%;
}
#profesores .team-detail-body{
  min-width:0;
  padding:clamp(30px, 3.7vw, 48px);
}
#profesores .team-detail-body h2{
  margin:0;
  font-size:clamp(1.65rem, 2.45vw, 2.25rem);
  line-height:1.08;
}
#profesores .team-detail-body .team-role{
  margin:12px 0 5px;
  line-height:1.35;
}
#profesores .team-detail-body .team-belt{
  margin-bottom:22px;
  max-width:760px;
  line-height:1.5;
}
#profesores .team-detail-body > p{
  max-width:820px;
  line-height:1.72;
}
#profesores .detail-list{
  margin-top:26px;
  gap:0;
}
#profesores .detail-list > div{
  grid-template-columns:minmax(132px, .29fr) minmax(0, 1fr);
  gap:20px;
  padding:16px 0;
}
#profesores .detail-list dt{
  line-height:1.45;
}
#profesores .detail-list dd{
  line-height:1.65;
}

/* Tablets: sigue siendo una ficha compacta, sin separar visualmente foto y texto. */
@media (max-width:980px){
  #profesores .team-detail{
    grid-template-columns:minmax(235px, 36%) minmax(0, 1fr);
  }
  #profesores .team-detail-body{
    padding:30px 28px 34px;
  }
  #profesores .detail-list > div{
    grid-template-columns:1fr;
    gap:6px;
  }
}

/* Móvil: formulario primero, tipografía legible en iOS y controles táctiles. */
@media (max-width:820px){
  #profesores .team-detail{
    grid-template-columns:1fr;
  }
  #profesores .team-detail .team-photo{
    height:auto;
    min-height:0;
    aspect-ratio:4 / 3;
    border-right:0;
    border-bottom:1px solid rgba(255,255,255,.10);
  }
  #profesores .team-detail .team-photo img{
    min-height:0;
    object-position:50% 20%;
  }
  #profesores #lucia-gomez-corbaton .team-photo img{
    object-position:50% 20%;
  }
  #profesores #pablo-rodas-fernandez .team-photo img{
    object-position:50% 18%;
  }
  #reserva #bookingForm{
    order:-1;
  }
}

@media (max-width:600px){
  header{
    padding-top:env(safe-area-inset-top);
  }
  main{
    padding-top:calc(var(--header-h) + env(safe-area-inset-top));
  }
  nav.primary-nav{
    max-height:calc(100dvh - var(--header-h) - env(safe-area-inset-top));
    padding-bottom:calc(22px + env(safe-area-inset-bottom));
  }
  section{
    padding-top:62px;
    padding-bottom:62px;
  }
  .page-hero{
    min-height:360px;
    padding-bottom:38px;
  }
  .contact-grid{
    gap:38px;
  }
  #bookingForm{
    width:100%;
    padding:22px 16px 24px;
    gap:16px;
    border-radius:4px;
  }
  .form-intro{
    padding-bottom:18px;
  }
  .form-intro h3{
    font-size:1.45rem;
  }
  .field{
    gap:7px;
  }
  .field label{
    font-size:.76rem;
    line-height:1.4;
    letter-spacing:1.05px;
  }
  .field input,
  .field select,
  .field textarea{
    min-height:50px;
    padding:13px 14px;
    font-size:16px;
    line-height:1.35;
    border-radius:3px;
  }
  .field textarea{
    min-height:122px;
  }
  .field-error{
    min-height:0;
    font-size:.78rem;
    line-height:1.35;
  }
  .consent{
    display:grid;
    grid-template-columns:20px minmax(0, 1fr);
    gap:12px;
    align-items:start;
  }
  .consent input{
    width:20px;
    height:20px;
    min-width:20px;
    margin-top:2px;
  }
  .consent label{
    font-size:.9rem;
    line-height:1.55;
  }
  .form-note{
    color:#89857f;
    font-size:.84rem;
    line-height:1.55;
  }
  .submit-btn{
    min-height:54px;
    padding:16px 14px;
    font-size:.86rem;
    line-height:1.25;
    letter-spacing:1.3px;
  }
  #formStatus:not(:empty){
    font-size:.88rem;
    overflow-wrap:anywhere;
  }
  #profesores .team-detail{
    margin-bottom:30px;
    border-radius:3px;
  }
  #profesores .team-detail-body{
    padding:24px 20px 28px;
  }
  #profesores .team-detail-body h2{
    font-size:1.55rem;
    line-height:1.12;
  }
  #profesores .team-detail-body .team-role{
    margin-top:10px;
    font-size:.8rem;
  }
  #profesores .team-detail-body .team-belt{
    margin-bottom:18px;
    font-size:.76rem;
    letter-spacing:.8px;
  }
  #profesores .team-detail-body > p{
    font-size:.95rem;
    line-height:1.65;
  }
  #profesores .detail-list{
    margin-top:18px;
  }
  #profesores .detail-list > div{
    padding:14px 0;
  }
  #profesores .detail-list dt{
    font-size:.74rem;
  }
  #profesores .detail-list dd{
    font-size:.92rem;
    line-height:1.55;
  }
}

@media (max-width:390px){
  .wrap{
    padding-left:16px;
    padding-right:16px;
  }
  #bookingForm{
    padding-left:14px;
    padding-right:14px;
  }
  .form-intro h3{
    font-size:1.36rem;
  }
  #profesores .team-detail-body{
    padding-left:18px;
    padding-right:18px;
  }
}


/* =========================================================
   V3F — Formato uniforme para todo el equipo docente
   ========================================================= */
@media (min-width:821px){
  #profesores .team-detail{
    grid-template-columns:minmax(270px, 31%) minmax(0, 1fr);
    align-items:start;
  }
  #profesores .team-detail .team-photo{
    align-self:start;
    width:calc(100% - 52px);
    height:auto;
    min-height:0;
    aspect-ratio:4 / 5;
    margin:32px 26px;
    border:1px solid rgba(255,255,255,.14);
    background:#111214;
    box-shadow:0 16px 34px rgba(0,0,0,.28);
  }
  #profesores .team-detail .team-photo img{
    width:100%;
    height:100%;
    min-height:0;
    object-fit:cover;
    object-position:50% 28%;
  }
  #profesores #joaquin-casares .team-photo img{
    object-position:50% 34%;
  }
  #profesores #lucia-gomez-corbaton .team-photo img{
    object-position:50% 24%;
  }
  #profesores #pablo-rodas-fernandez .team-photo img{
    object-position:50% 28%;
  }
}

@media (max-width:820px){
  #profesores .team-detail .team-photo{
    width:min(72%, 300px);
    height:auto;
    min-height:0;
    aspect-ratio:4 / 5;
    margin:26px auto 0;
    border:1px solid rgba(255,255,255,.14);
    border-bottom:1px solid rgba(255,255,255,.14);
    box-shadow:0 14px 28px rgba(0,0,0,.26);
  }
  #profesores .team-detail .team-photo img{
    width:100%;
    height:100%;
    min-height:0;
    object-fit:cover;
    object-position:50% 28%;
  }
  #profesores #joaquin-casares .team-photo img{
    object-position:50% 34%;
  }
  #profesores #lucia-gomez-corbaton .team-photo img{
    object-position:50% 24%;
  }
  #profesores #pablo-rodas-fernandez .team-photo img{
    object-position:50% 28%;
  }
}

@media (max-width:390px){
  #profesores .team-detail .team-photo{
    width:min(78%, 260px);
    margin-top:22px;
  }
}


/* V3G — alineación uniforme del menú desplegable */
@media (max-width:1220px){
  .primary-nav ul a[href="sobre-nosotros.html"]{
    justify-content:flex-start;
    text-align:left;
  }
}
