/* =========================================================
   RESPONSIVE - Mobile y Tablet
   ========================================================= */

/* ============ TABLET (1024px) ============ */
@media (max-width: 1024px) {
  :root {
    --space-4xl: 4rem;
    --space-3xl: 3rem;
  }

  /* Hero practice bar: 3 columnas */
  .hero-practice-list {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-practice-item:nth-child(3n) {
    border-right: none;
  }

  .hero-practice-item:nth-child(-n+3) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: var(--space-md);
  }

  .hero-practice-item:nth-child(n+4) {
    padding-top: var(--space-md);
  }

  /* Stats: 2 columnas */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg) 0;
  }

  .stat-item {
    border-right: none;
  }

  .stat-item:nth-child(odd) {
    border-right: 1px solid var(--color-border);
  }

  /* Areas: 3 columnas */
  .areas-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2xl) 0;
  }

  .area-card:nth-child(3n)::after {
    display: none;
  }

  .split-decor-personas {
    right: -12%;
    width: clamp(400px, 46vw, 500px);
    max-height: 94%;
  }

  .split-personas > :not(.split-decor) {
    max-width: min(520px, 52%);
  }

  .about-grid {
    grid-template-columns: minmax(340px, 45%) minmax(0, 55%);
    min-height: 480px;
  }

  .about-content {
    padding: var(--space-3xl) var(--space-2xl);
  }

  .about-image {
    height: 315px;
  }

  .about-quote {
    margin-left: -24px;
    padding: var(--space-lg) var(--space-xl);
  }

  /* Footer tablet */
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
  }

  .footer-brand {
    grid-column: 1 / -1;
    text-align: center;
  }

  .footer-brand .footer-logo {
    margin-left: auto;
    margin-right: auto;
  }

  .footer-brand .footer-description {
    margin-left: auto;
    margin-right: auto;
  }

  .footer-brand .footer-social {
    justify-content: center;
  }
}

/* ============ MOBILE (768px) ============ */
@media (max-width: 768px) {
  :root {
    --header-height: 70px;
    --container-padding: 1.25rem;
    --space-5xl: 4rem;
    --space-4xl: 3rem;
    --space-3xl: 2.5rem;
  }

  /* HEADER MÓVIL */
  .menu-toggle {
    display: flex;
  }

  .header-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background-color: var(--color-navy);
    flex-direction: column;
    gap: 0;
    padding: var(--space-lg) var(--container-padding);
    transform: translateY(-150%);
    transition: transform var(--transition-base);
    box-shadow: var(--shadow-lg);
    align-items: stretch;
  }

  .header-nav.active {
    transform: translateY(0);
  }

  .header-nav-link {
    padding: var(--space-md) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: var(--fs-base);
  }

  .header-nav-link::after {
    display: none;
  }

  .header-cta .btn {
    display: none;
  }

  /* HERO MÓVIL */
  .hero {
    min-height: auto;
    padding: calc(var(--header-height) + var(--space-xl)) 0 0;
  }

  .hero-bg {
    width: 100%;
    height: 50%;
    bottom: auto;
    top: var(--header-height);
    opacity: 0.3;
    background-size: cover;
    background-position: center top;
  }

  .hero-bg::before {
    background: linear-gradient(to bottom, transparent 0%, var(--color-navy) 100%);
  }

  .hero-content {
    max-width: 100%;
    padding-bottom: var(--space-2xl);
    padding-top: var(--space-2xl);
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .hero-practice-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-practice-item {
    padding: var(--space-sm) var(--space-sm);
    font-size: 0.65rem;
    flex-direction: column;
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .hero-practice-item:nth-child(2n) {
    border-right: none;
  }

  .hero-practice-item:nth-last-child(-n+2) {
    border-bottom: none;
  }

  /* SPLIT MÓVIL */
  .split {
    grid-template-columns: 1fr;
  }

  .split-side {
    padding: var(--space-2xl) var(--space-lg);
  }

  .split-side > :not(.split-decor),
  .split-empresas > :not(.split-decor),
  .split-personas > :not(.split-decor) {
    max-width: 100%;
    margin-right: 0;
  }

  .split-decor-empresas {
    right: -18%;
    width: min(62%, 260px);
    max-height: 72%;
    opacity: 0.42;
  }

  .split-decor-personas {
    right: clamp(-64px, -8vw, -28px);
    width: clamp(300px, 58vw, 360px);
    max-height: 86%;
    opacity: 1;
  }

  /* STATS MÓVIL */
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stat-item {
    padding: var(--space-md);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
  }

  .stat-icon {
    grid-row: auto;
    align-self: center;
    margin-top: 0;
  }

  .stat-item:nth-child(odd) {
    border-right: 1px solid var(--color-border);
  }

  .stat-item:nth-child(-n+2) {
    border-bottom: 1px solid var(--color-border);
    padding-bottom: var(--space-lg);
  }

  .stat-item:nth-child(n+3) {
    padding-top: var(--space-lg);
  }

  .stat-number {
    font-size: var(--fs-2xl);
  }

  /* SOBRE NOSOTROS MÓVIL */
  .about-grid {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: var(--space-xl);
  }

  .about-image-wrapper {
    order: 0;
    padding: 0 var(--space-lg) var(--space-3xl);
  }

  .about-content {
    padding: var(--space-3xl) var(--space-lg) var(--space-xl);
  }

  .about-image {
    height: 280px;
  }

  .about-quote {
    width: 100%;
    margin: -28px 0 0;
    flex: none;
    min-height: 130px;
    padding: var(--space-lg);
    grid-template-columns: 40px minmax(0, 1fr);
    gap: var(--space-md);
  }

  .about-quote-mark::before {
    font-size: 3rem;
  }

  .about-quote-text {
    padding-left: 0;
    font-size: var(--fs-sm);
  }

  /* AREAS MÓVIL */
  .areas-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl) 0;
  }

  .area-card {
    padding: 0 var(--space-md);
  }

  .area-card::after {
    display: none;
  }

  .area-card:nth-child(odd)::after {
    content: "";
    display: block;
    position: absolute;
    top: 8px;
    right: 0;
    width: 2px;
    height: calc(100% - 8px);
    background-color: rgba(15, 42, 61, 0.16);
    transform: scaleX(0.5);
    transform-origin: right center;
  }

  .area-card-description {
    max-width: 170px;
  }

  /* CONTACTO MÓVIL */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .contact-form-wrapper {
    padding: var(--space-lg);
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-turnstile {
    justify-content: center;
  }

  /* FOOTER MÓVIL */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
  }

  .footer-brand {
    grid-column: 1 / -1;
    text-align: center;
  }

  .footer-brand .footer-logo {
    margin-left: auto;
    margin-right: auto;
  }

  .footer-brand .footer-description {
    margin-left: auto;
    margin-right: auto;
  }

  .footer-brand .footer-social {
    justify-content: center;
  }

  .footer-grid .footer-column:last-child {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-legal-links {
    flex-direction: column;
    gap: var(--space-sm);
  }
}

/* ============ MOBILE PEQUEÑO (480px) ============ */
@media (max-width: 480px) {
  :root {
    --fs-3xl: 2rem;
    --fs-2xl: 1.5rem;
  }

  .container {
    padding: 0 1rem;
  }

  .hero-title {
    font-size: 2.25rem;
  }

  .areas-grid {
    grid-template-columns: 1fr;
  }

  .area-card:nth-child(odd)::after {
    display: none;
  }

  .area-card:not(:last-child) {
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid rgba(15, 42, 61, 0.16);
  }

  .area-card:not(:first-child) {
    padding-top: var(--space-xl);
  }
}
