/* ==========================================================================
   IVOR MONTOYA | ESTILOS RESPONSIVE Y MOBILE FIRST ADICIONALES
   ivormontoya.es
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TABLETS Y PANTALLAS MEDIANAS (MAX-WIDTH: 1024PX)
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  .services-clean-grid {
    --cards-visible: 3;
    --cards-gap: 16px;
  }
}

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-pillars {
    grid-template-columns: repeat(2, 1fr);
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
  }

  .hero-visual {
    max-width: 580px;
    margin: 0 auto;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about-media-box {
    max-width: 520px;
    margin: 0 auto;
  }

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

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

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

/* --------------------------------------------------------------------------
   2. MÓVILES Y PANTALLAS ESTRECHAS (MAX-WIDTH: 768PX)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  :root {
    --header-height: 70px;
  }

  /* Menú de navegación móvil (Drawer accesible) */
  .menu-toggle {
    display: inline-flex;
    z-index: 1002;
  }

  .site-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 380px;
    height: 100vh;
    background: rgba(6, 20, 38, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid var(--color-border-glow);
    padding: calc(var(--header-height) + 1.5rem) 2rem 2.5rem 2rem;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    transition: right var(--transition-normal);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.6);
    z-index: 1001;
    overflow-y: auto;
  }

  .site-nav.is-open {
    right: 0;
  }

  .nav-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 1000;
  }

  .nav-backdrop.is-active {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    width: 100%;
  }

  .nav-link {
    font-size: 1.15rem;
    width: 100%;
    display: block;
    padding: 0.6rem 0;
  }

  .header-cta .btn {
    display: none; /* Se reubica dentro del drawer en móvil */
  }

  .nav-drawer-cta {
    display: block;
    width: 100%;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border-subtle);
  }

  .nav-drawer-cta .btn {
    width: 100%;
  }

  /* Ajustes de componentes */
  .services-clean-grid {
    --cards-visible: 2;
    --cards-gap: 14px;
  }

  .services-clean-subtitle {
    border-left: none;
    padding-left: 0;
    width: 100%;
  }

  .services-clean-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

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

  .about-values-grid {
    grid-template-columns: 1fr;
  }

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

  .blog-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .blog-search-box {
    max-width: 100%;
  }

  .floating-badge {
    position: static;
    margin-top: 1rem;
    animation: none;
  }

  .btn-group {
    flex-direction: column;
    width: 100%;
  }

  .btn-group .btn {
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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

  .footer-legal-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
}

/* --------------------------------------------------------------------------
   3. PANTALLAS PEQUEÑAS (MAX-WIDTH: 480PX)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  .services-clean-grid {
    --cards-visible: 1;
    --cards-gap: 16px;
  }

  .services-carousel-prev {
    left: -6px;
  }

  .services-carousel-next {
    right: -6px;
  }

  .hero-pillars {
    grid-template-columns: 1fr;
  }

  .brand-name {
    font-size: 1.1rem;
  }

  .brand-logo-img {
    height: 40px;
  }

  .cookie-banner {
    bottom: 10px;
    right: 10px;
    left: 10px;
    width: auto;
    padding: 1.25rem;
  }

  .cookie-actions {
    flex-direction: column;
  }

  .cookie-actions .btn {
    width: 100%;
  }
}
