﻿:root {
  --bg: #ffffff;
  --surface: #f5f5f5;
  --text: #000000;
  --muted: #6b7280;
  --border: rgba(0,0,0,0.08);
  --radius: 24px;
  --shadow: 0 16px 40px rgba(0,0,0,0.08);
  --transition: 0.4s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;

  -webkit-text-size-adjust: 100%; /* Bloquea el reescalado en Chrome/Safari móvil */
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  
}

main {
  max-width: 1500px;
  padding: 2rem;
  margin: 0 auto;
  opacity: 0;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
}

/* Preloader class */
.preloader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: grid;
  place-items: center;
  visibility: hidden;
}

.logo {
  /* clamp(mínimo, tamaño relativo al celular, máximo) */
  font-size: clamp(1.4rem, 5vw, 3.5rem); 
  font-weight: 600;
  text-transform: uppercase;
  perspective: 800px;
  
  /* Fuerza a que todo el nombre se mantenga en una sola línea */
  white-space: nowrap; 
  
  /* Un pequeño ajuste por si el nombre es muy largo en pantallas ultra chicas */
  max-width: 90vw;
  text-align: center;
}

/* Page Sections (General para PC) */
.page-section {
  padding: 120px 0;
  overflow-x: hidden;
}

.page-section--light {
  background: var(--surface);
}

.page-section__title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 3vw, 3rem);
  text-align: center;
  margin-bottom: 64px;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 0.15s forwards;
}

.page-section__inner {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: rgba(255,255,255,0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  padding: 8px 0;
  gap: 10px;
  min-height: 50px;
}

.site-header__logo {
  position: absolute;
  left: 0;
}

.site-header__logo img {
  max-height: 54px;
  width: auto;
}

.site-header__mobile-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

.site-header__mobile-btn {
  display: none;
  z-index: 20;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: #111111;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition), border-color var(--transition);
}

.site-header__mobile-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 0, 0, 0.28);
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.site-header__nav a {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
  transition: opacity var(--transition), color var(--transition);
}

.site-header__nav a:hover {
  opacity: 0.8;
}

/* Menú móvil desplegable */
.site-header__mobile-nav {
  display: flex;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 10;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.98);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  visibility: hidden;
  transition: max-height 0.35s ease, opacity 0.35s ease;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.site-header__mobile-nav a {
  padding: 18px 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.9rem;
  color: var(--text);
}

.site-header__mobile-nav a:first-child {
  border-top: none;
}

.site-header__mobile-toggle:checked ~ .site-header__mobile-nav {
  max-height: 400px;
  opacity: 1;
  visibility: visible;
}

/* Hero Base */
.page-section--hero {
  display: block;
  padding: 0;
}

.hero__logo-area {
  min-height: 48vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 0;
}

.page-section__inner.hero__grid {
  padding-top: 8px;
}

.hero__grid {
  display: grid;
  gap: 32px;
  align-items: center;
  justify-items: center;
}

.hero__content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.hero__content h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.75rem, 6vw, 4.5rem);
  margin: 20px 0 24px;
}

.hero__content .hero__logo {
  max-width: 420px;
  width: 100%;
  height: auto;
}

.hero__logo-banner {
  background: #ffffff;
  padding: 30px 48px;
  border-radius: 14px;
  box-shadow: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 680px;
}

.hero__logo-area .hero__logo {
  max-width: 360px;
  width: 100%;
  height: auto;
}

.hero__media {
  width: min(760px, 100%);
}

.hero__content .hero__eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 24px;
}

.hero__text {
  font-size: 1.1rem;
  color: #292524;
  max-width: 560px;
  margin-bottom: 32px;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 40px;
}

.hero__meta span {
  border: 1px solid rgba(0,0,0,0.15);
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
}

.hero__frame {
  width: 100%;
  min-height: 400px;
  background: var(--surface);
  border: 1px solid rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.06);
}

.hero__frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), transparent 65%);
  pointer-events: none;
}

.hero__frame p {
  color: var(--muted);
  z-index: 1;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 16px 28px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), background var(--transition), box-shadow var(--transition);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255,255,255,0.3);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn--primary {
  background: #000000;
  color: #ffffff;
}

.btn--primary:hover {
  background: #1f1f1f;
}

.btn--secondary {
  background: #ffffff;
  color: #000000;
  border: 1px solid rgba(0,0,0,0.12);
}

.btn--secondary:hover {
  background: #f3f3f3;
}

/* Cards Base */
.card,
.card--feature,
.card--service,
.card--testimonial,
.card--news,
.card--studio,
.card--education,
.contact__info,
.contact__form {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: var(--radius);
  padding: 32px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.card:hover,
.card--feature:hover,
.card--service:hover,
.card--testimonial:hover,
.card--news:hover,
.card--studio:hover,
.card--education:hover,
.contact__info:hover,
.contact__form:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.08);
  border-color: rgba(0,0,0,0.18);
}

.media__placeholder {
  height: 100%;
  min-height: 420px;
  border-radius: 18px;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.media__placeholder.mini {
  height: 260px;
}

.hero__content p,
.card--studio p,
.card--education p,
.card--news p,
.card--testimonial p {
  margin-bottom: 20px;
  color: #333333;
}

.stats__value {
  font-size: 2.5rem;
  font-weight: 700;
}

.stats__label {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.studio__image {
  background: #e5e7eb;
  min-height: 280px;
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.media__placeholder img,
.studio__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

.card--education {
  text-align: center;
}

.card--education .education__item {
  border-top: 1px solid rgb(205, 205, 205);
  padding-top: 24px;
}

.education__item:first-of-type {
  border-top: none;
  padding-top: 0;
}

.education__title {
  font-weight: 700;
  margin-bottom: 8px;
}

.education__year,
.news-date {
  color: var(--muted);
  font-size: 0.8rem;
}

.card__meta,
.info__label {
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 14px;
}

.card__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.link__cards {
  display: flex;
  gap: 16px;
  margin-top: 24px;
}

/* Footer Base */
/* Footer Base */
.site-footer {
  background: #000000;
  color: #ffffff;
  padding: 80px 0 40px; /* Le damos más aire arriba y abajo */
  width: 100%;
}

/* Centramos el contenedor al mismo ancho que el resto de la web (1200px) */
.site-footer__inner {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto; /* El truco mágico para que no se pegue a los bordes en PC */
  gap: 40px;
}

.site-footer a {
  display: block;
  color: #d1d5db;
  margin-bottom: 12px;
  transition: color var(--transition);
}

.site-footer a:hover {
  color: #ffffff; /* Pequeño destello blanco al pasar el mouse */
}

.site-footer__title {
  font-weight: 700;
  margin-bottom: 20px;
}

/* Centramos también la barra de créditos del final */
.site-footer__bottom {
  width: min(1200px, calc(100% - 48px));
  margin: 24px auto 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  font-size: 0.85rem;
  color: #9ca3af;
}

.contact__form form label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  color: #374151;
}

.contact__form input,
.contact__form textarea {
  width: 100%;
  padding: 16px;
  margin-top: 8px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 14px;
  background: #f8fafc;
  color: #111111;
  resize: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.contact__form input::placeholder,
.contact__form textarea::placeholder {
  color: #9ca3af;
}

.contact__form input:focus,
.contact__form textarea:focus {
  outline: none;
  border-color: rgba(0,0,0,0.22);
  box-shadow: 0 0 0 4px rgba(59,130,246,0.12);
  background: #ffffff;
}

.contact__form h3 {
  margin-bottom: 24px;
  font-family: 'Playfair Display', serif;
}

.social__links a {
  border: 1px solid rgba(255,255,255,0.18);
  padding: 10px 16px;
  border-radius: 999px;
  color: #ffffff;
}

.small__label {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.social__links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.info__block {
  margin-bottom: 24px;
}

.info__block:last-child {
  margin-bottom: 0;
}

/* Noticias Periodísticas (Estructura Base PC) */
.news-row {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: stretch;
}

.news-row--reverse {
  direction: rtl;
}

.news-row--reverse > * {
  direction: ltr;
}

.news-image-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.news-image-wrapper img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.05);
  transition: transform var(--transition), box-shadow var(--transition);
}

.news-row:hover .news-image-wrapper img {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.news-image-caption {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
  font-style: italic;
  padding-left: 4px;
  border-left: 2px solid var(--border);
}

/* Animaciones */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate {
  opacity: 0;
  transform: translateY(30px);
}

.animate.is-visible, .fade-up {
  animation: fadeInUp 0.9s ease-out forwards;
}

.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.25s; }
.delay-3 { animation-delay: 0.35s; }
.delay-4 { animation-delay: 0.45s; }
.delay-5 { animation-delay: 0.55s; }
.delay-6 { animation-delay: 0.65s; }


/* ==========================================================
   SISTEMA RESPONSIVO INTELIGENTE Y REESTRUCTURACIÓN GLOBAL
   ========================================================== */

/* --- PARCHE 1: ARREGLO DEL COMPORTAMIENTO DE LAS GRILLAS (PILARES EN COMPUTADORA) --- */
.util-grid {
  display: grid;
  gap: 24px;
}

/* Grillas dinámicas por defecto (Mobile First / Tablet / PC) */
.util-grid--two {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.util-grid--three {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

/* Activación de pilares reales en Escritorio */
@media (min-width: 901px) {
  .util-grid--two { grid-template-columns: 1fr 1fr; }
  /* Esto devuelve las reseñas y las áreas de práctica a sus 3 hermosos pilares */
  .util-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero__grid { grid-template-columns: 1.1fr 0.9fr; }
  .card--studio { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
  .contact__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__inner { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
  .site-footer__bottom { display: flex; justify-content: space-between; }
}


/* --- PARCHE 2: ARREGLO DEL BOTÓN DEL NAVBAR PEGADO --- */
@media (max-width: 900px) {
  .site-header__inner {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important; /* Empuja el logo a la izquierda y el botón a la derecha */
    align-items: center !important;
    width: 100% !important;
    padding: 10px 24px !important;
  }
  
  .site-header__logo {
    position: relative !important; /* Libera el posicionamiento absoluto para que respete el flujo flex */
    left: auto !important;
  }

  .site-header__mobile-btn {
    display: inline-flex !important;
    position: relative !important;
    margin-left: auto !important; /* Asegura el empuje total a la derecha */
  }

  .site-header__nav { 
    display: none !important; 
  }

  .page-section {
    padding: 80px 16px;
  }

  .page-section--hero {
    padding-top: 16px;
  }

  .hero__logo-area {
    min-height: auto;
    padding: 12px 0 10px;
  }

  .page-section__inner {
    width: 100% !important;
    padding: 0 16px !important;
  }

  .hero__logo-banner {
    padding: 22px 28px;
    max-width: 100%;
  }

  .hero__frame {
    min-height: 280px;
  }

  .hero__media {
    width: 100%;
  }

  .hero__meta {
    justify-content: center;
  }

  .hero__meta span {
    padding: 10px 14px;
  }

  .media__placeholder {
    min-height: 300px;
  }
}


/* --- PARCHE 3: CONTROL DE AUTOESCALA DE SECCIONES, MAPA Y SECCIÓN DE RESEÑAS --- */
/* Forzamos que la tarjeta contenedora del mapa sea flexible */
#testimonios-ubicacion .card--studio {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

/* El mapa se adapta de forma fluida y no desborda */
.studio__map-container {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 9; /* Mantiene la proporción dorada del mapa */
  min-height: 250px !important;
}

/* Evitamos saltos de línea descontrolados en textos de divs usando font-size fluido */
#testimonios-ubicacion h4, 
#testimonios-ubicacion p,
.card--testimonial p {
  word-break: break-word; /* Evita que palabras largas rompan el div */
}

#testimonios-ubicacion h4 {
  font-size: clamp(1.3rem, 4vw, 1.75rem) !important; /* Letra adaptativa para el título del mapa */
  line-height: 1.3;
}


/* --- PARCHE 4: CONTROL EXCLUSIVO CELULARES (Menos de 600px) --- */
@media (max-width: 600px) {
  html, body {
    overflow-x: hidden;
  }

  .contact__info a {
    display: inline-block !important;
    max-width: 100% !important;
    word-break: break-all !important; /* Si el mail es larguísimo, lo corta con elegancia antes de salirse del cuadro */
    font-size: clamp(0.8rem, 3.5vw, 1rem) !important; /* Achica el mail en proporción al ancho del celular */
  }

  .info__block {
    width: 100% !important;
    overflow: hidden; /* No permite que nada rompa la tarjeta */
  }

  .page-section {
    padding: 60px 16px; /* Ajuste sutil de aire */
  }

  .page-section--hero {
    padding-top: 8px;
  }

  .page-section__inner {
    width: 100% !important;
    padding: 0 12px !important;
  }

  .hero__logo-area {
    min-height: auto !important;
    padding: 10px 0 14px !important;
  }

  .hero__logo-banner {
    padding: 18px 22px !important;
  }

  .hero__frame {
    min-height: 240px !important;
  }

  .hero__content {
    gap: 18px !important;
  }

  .hero__meta {
    justify-content: center !important;
    gap: 12px !important;
    margin-bottom: 28px !important;
  }

  .hero__meta span {
    padding: 10px 12px !important;
    font-size: 0.8rem !important;
  }

  .hero__text { 
    font-size: clamp(0.95rem, 4vw, 1.05rem) !important; 
    max-width: 100% !important;
  }

  .hero__content h1 { 
    font-size: clamp(1.8rem, 8vw, 2.8rem) !important; 
    line-height: 1.2;
    margin-bottom: 0 !important;
  }

  .hero__media {
    width: 100% !important;
  }

  .media__placeholder {
    min-height: 260px !important;
  }

  .card, .card--testimonial, .contact__info, .contact__form {
    padding: 22px !important; /* Más espacio útil interno en celulares */
    width: 100% !important;
  }

  .testimonial-footer {
    flex-wrap: wrap; /* Si el nombre de la reseña es largo, baja ordenado */
    gap: 8px !important;
  }

  .site-footer__inner {
    padding-left: 8px !important;  /* Un pequeño extra de aire interno */
    padding-right: 8px !important;
    gap: 32px !important;
  }

  .site-footer__bottom {
    padding-left: 8px !important;
    padding-right: 8px !important;
    text-align: center !important; /* Centramos los derechos reservados en el celu para que quede simétrico */
  }

  .site-footer { 
    padding: 48px 24px 32px !important; /* El '24px' de los costados evita que se pegue a los bordes */
    width: 100% !important;
  }



}

/* Parche de Noticias Móvil */
@media (max-width: 900px) {
  .news-row, .news-row--reverse {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
    direction: ltr !important;
  }
  
  .news-row--reverse {
    display: flex;
    flex-direction: column-reverse; /* Texto arriba, foto abajo en móviles */
  }

  .news-image-wrapper img {
    height: 200px;
  }
}