/* ============================================
   Birdie Club — Estilos móviles
   ============================================ */

@media (max-width: 1023px) {
  body {
    padding-bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
  }

  body.menu-open {
    overflow: hidden;
  }

  main {
    margin-top: 4.5rem;
  }

  .px-grid-margin {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .py-xl {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  /* Header compacto */
  .site-header .header-inner {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  /* Menú móvil */
  .mobile-menu-overlay {
    position: fixed;
    inset: 0;
    top: 4.5rem;
    z-index: 40;
    background: rgba(26, 28, 25, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  body.menu-open .mobile-menu-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-menu {
    position: relative;
    z-index: 45;
  }

  .mobile-menu.is-open {
    max-height: calc(100dvh - 4.5rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-menu a {
    display: block;
    padding: 0.625rem 0;
    min-height: 44px;
  }

  .mobile-menu-group-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    min-height: 44px;
    color: #1a1c19;
    font-family: 'Hanken Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 600;
  }

  .mobile-menu-group-items {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
    padding-left: 0.5rem;
  }

  .mobile-menu-group.is-open .mobile-menu-group-items {
    max-height: 500px;
  }

  .mobile-menu-group.is-open .mobile-menu-group-toggle .material-symbols-outlined {
    transform: rotate(180deg);
  }

  /* Barra inferior */
  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-top: 1px solid #bccbb8;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .mobile-bottom-nav-inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    max-width: 1280px;
    margin: 0 auto;
  }

  .mobile-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.125rem;
    padding: 0.5rem 0.25rem;
    min-height: 3.5rem;
    color: #3d4a3c;
    font-family: 'Manrope', sans-serif;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: color 0.2s;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-bottom-nav-item .material-symbols-outlined {
    font-size: 1.375rem;
  }

  .mobile-bottom-nav-item.is-active {
    color: #006e24;
  }

  .mobile-bottom-nav-item.is-active .material-symbols-outlined {
    font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
  }

  /* Navegación horizontal de secciones */
  .mobile-section-scroll {
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .mobile-section-pills {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .mobile-section-pills::-webkit-scrollbar {
    display: none;
  }

  .mobile-section-pill {
    flex-shrink: 0;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    border: 1px solid #bccbb8;
    background: #f4f4ee;
    color: #3d4a3c;
    font-family: 'Manrope', sans-serif;
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
  }

  .mobile-section-pill.is-active {
    background: #006e24;
    border-color: #006e24;
    color: #ffffff;
  }

  /* Tipografía responsive */
  .responsive-display {
    font-size: 1.75rem;
    line-height: 2.25rem;
    letter-spacing: -0.02em;
    font-weight: 800;
  }

  .responsive-headline {
    font-size: 1.5rem;
    line-height: 2rem;
    font-weight: 700;
  }

  /* Hero móvil */
  .mobile-hero {
    min-height: 28rem;
    height: auto;
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .mobile-hero .hero-gradient {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.25) 60%, rgba(0, 0, 0, 0.4) 100%);
  }

  .mobile-hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .mobile-hero-actions a {
    justify-content: center;
    text-align: center;
  }

  /* Tarjetas e imágenes */
  .historia-timeline-item .p-xl {
    padding: 1.25rem;
  }

  .mobile-community-image {
    height: 16rem;
  }

  /* Tablas con scroll */
  .mobile-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .mobile-table-wrap table {
    min-width: 32rem;
  }

  /* Botones táctiles */
  a.rounded-full,
  button.rounded-full {
    min-height: 44px;
  }

  /* Grid de accesos rápidos home */
  .mobile-quick-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .mobile-quick-grid a {
    padding: 0.75rem 0.5rem;
  }

  .mobile-quick-grid .material-symbols-outlined {
    font-size: 1.5rem;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .responsive-display {
    font-size: 2.25rem;
    line-height: 2.75rem;
  }

  .mobile-hero {
    min-height: 32rem;
  }

  .mobile-community-image {
    height: 22rem;
  }
}

@media (min-width: 1024px) {
  .responsive-display {
    font-size: 3rem;
    line-height: 3.5rem;
  }

  .responsive-headline {
    font-size: 2rem;
    line-height: 2.5rem;
  }

  main {
    margin-top: 6rem;
  }
}

@media (max-width: 1023px) {
  .lg\:scale-105 {
    transform: none;
  }
}
