/* =========================================
   Ian Albores — Portfolio
   css/mobile.css

   Breakpoints:
   - Tablet grande : max-width 1024px
   - Tablet         : max-width 900px
   - Móvil grande  : max-width 600px
   - Móvil pequeño : max-width 400px
   ========================================= */


/* ══════════════════════════════════════════
   TABLET GRANDE (≤ 1024px)
   Ajustes sutiles de espaciado y tipografía
══════════════════════════════════════════ */
@media (max-width: 1024px) {

  .container { padding: 0 2rem; }

  /* Hero */
  .hero-inner { gap: 3rem; }
  .hero-name  { font-size: 4.5rem; }

  /* Servicios */
  .services-grid { gap: 1rem; }

  /* Sobre mí */
  .about-inner { gap: 3.5rem; }

  /* Proyectos */
  .project-item { padding: 1.6rem 1.8rem; }

  /* Secciones */
  #servicios,
  #sobre,
  #proyectos,
  #contacto { padding: 6rem 0; }
}


/* ══════════════════════════════════════════
   TABLET (≤ 900px)
   Pasa a una sola columna en layouts 2-col
══════════════════════════════════════════ */
@media (max-width: 900px) {

  /* ── Nav ── */
  nav {
    padding: 1rem 1.5rem;
    flex-wrap: wrap;
    gap: 0.8rem;
  }

  .nav-links {
    gap: 1.2rem;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    padding-bottom: 0.2rem;
  }

  .nav-links a { font-size: 0.72rem; }

  /* ── Hero ── */
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }

  .hero-tag  { justify-content: center; }
  .hero-desc { margin: 0 auto 2.8rem; }
  .hero-ctas { justify-content: center; }
  .hero-code-block { display: none; }

  /* ── Servicios ── */
  .services-grid { grid-template-columns: 1fr; gap: 1rem; }

  /* ── Sobre mí ── */
  .about-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: start;
  }

  .about-rain-wrap {
    width: 100%;
    min-height: 260px;
    aspect-ratio: 16/9;
  }

  /* Ocultar hint en tablet (no hace falta) */
  .rain-click-hint { display: none; }

  /* ── Proyectos ── */
  .project-item {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .project-tech { justify-content: flex-start; }

  /* ── Contacto ── */
  .contact-simple { padding: 0 1rem; }

  /* ── Footer ── */
  footer {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
    padding: 1.8rem 2rem;
  }

  /* ── WhatsApp float ── */
  .whatsapp-float {
    bottom: 1.2rem;
    right: 1.2rem;
    width: 50px;
    height: 50px;
  }

  .whatsapp-float svg { width: 26px; height: 26px; }
}


/* ══════════════════════════════════════════
   MÓVIL GRANDE (≤ 600px)
   Diseño compacto y táctil
══════════════════════════════════════════ */
@media (max-width: 600px) {

  .container { padding: 0 1.2rem; }

  /* ── Nav ── */
  nav {
    padding: 0.9rem 1.2rem;
    position: relative; /* deja de ser fixed en pantallas muy chicas */
  }

  /* Hamburger menu — nav scrollable horizontal */
  .nav-links {
    gap: 0.9rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.3rem;
    justify-content: flex-start;
  }

  .nav-links::-webkit-scrollbar { display: none; }

  /* ── Hero ── */
  #hero {
    min-height: auto;
    padding: 4rem 0 3rem;
  }

  .hero-name  { font-size: 2.8rem; }
  .hero-title { font-size: 0.9rem; }
  .hero-desc  { font-size: 0.88rem; }

  .hero-ctas { flex-direction: column; align-items: stretch; gap: 0.8rem; }

  .btn-primary,
  .btn-ghost {
    text-align: center;
    justify-content: center;
    padding: 0.95rem 1.5rem;
    font-size: 0.82rem;
  }

  /* ── Secciones — reducir padding vertical ── */
  #servicios,
  #sobre,
  #proyectos,
  #contacto { padding: 4rem 0; }

  .section-title { font-size: 1.8rem; }

  /* ── Servicios ── */
  .service-card { padding: 1.6rem; }
  .service-name { font-size: 0.95rem; }
  .service-desc { font-size: 0.82rem; }

  /* ── Sobre mí ── */
  .about-rain-wrap {
    min-height: 220px;
    aspect-ratio: 4/3;
  }

  .about-stat { gap: 1.2rem; padding: 1rem 1.2rem; }
  .stat-num   { font-size: 1.4rem; }
  .stat-label { font-size: 0.58rem; }

  .about-text p          { font-size: 0.88rem; }
  .about-text p:first-of-type { font-size: 0.94rem; }

  .about-extra          { padding: 1.2rem; }
  .about-extra-title    { font-size: 0.95rem; }
  .about-extra p        { font-size: 0.84rem; }

  .about-tags { gap: 0.4rem; margin-top: 1.5rem; }
  .tag        { font-size: 0.6rem; padding: 0.35rem 0.7rem; }

  /* ── Proyectos ── */
  .project-item { padding: 1.4rem 1.2rem; }
  .project-name { font-size: 0.95rem; }
  .project-desc { font-size: 0.78rem; }

  .tech-pill { font-size: 0.58rem; padding: 0.25rem 0.6rem; }

  /* ── Contacto ── */
  .contact-tagline { font-size: 0.88rem; margin-bottom: 2rem; }

  .contact-btns {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .contact-btn {
    justify-content: center;
    padding: 1rem 1.5rem;
    font-size: 0.88rem;
    border-radius: 10px;
  }

  /* ── Footer ── */
  footer { padding: 1.5rem 1.2rem; gap: 0.8rem; }
  .footer-copy { font-size: 0.68rem; }
  .footer-social a { font-size: 0.68rem; }

  /* ── WhatsApp float ── */
  .whatsapp-float {
    bottom: 1rem;
    right: 1rem;
    width: 46px;
    height: 46px;
  }

  .whatsapp-float svg { width: 24px; height: 24px; }
}


/* ══════════════════════════════════════════
   MÓVIL PEQUEÑO (≤ 400px)
   Pantallas muy compactas (iPhone SE, etc.)
══════════════════════════════════════════ */
@media (max-width: 400px) {

  .container { padding: 0 1rem; }

  .hero-name  { font-size: 2.4rem; }
  .section-title { font-size: 1.6rem; }

  .hero-tag   { font-size: 0.62rem; }
  .hero-title { font-size: 0.85rem; }

  .service-card  { padding: 1.3rem; }
  .project-item  { padding: 1.2rem 1rem; }

  .about-rain-wrap { min-height: 180px; }

  .contact-btn {
    font-size: 0.82rem;
    padding: 0.9rem 1.2rem;
  }

  .about-stat { gap: 0.8rem; }
  .stat-num   { font-size: 1.2rem; }
}


/* ══════════════════════════════════════════
   TOUCH — mejoras táctiles generales
══════════════════════════════════════════ */
@media (hover: none) and (pointer: coarse) {

  /* Quitar efectos hover que no aplican en touch */
  .service-card:hover,
  .project-item:hover,
  .tag:hover,
  .contact-link:hover { transform: none; }

  /* Hacer botones y links más fáciles de tocar */
  .btn-primary,
  .btn-ghost,
  .contact-btn,
  .nav-links a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Feedback táctil con :active en lugar de :hover */
  .service-card:active  { transform: scale(0.98); transition: transform 0.15s; }
  .project-item:active  { transform: scale(0.99); transition: transform 0.15s; }
  .btn-primary:active   { transform: scale(0.97); }
  .btn-ghost:active     { transform: scale(0.97); }
  .contact-btn:active   { transform: scale(0.97); }
}


/* ══════════════════════════════════════════
   LANDSCAPE MÓVIL (orientación horizontal)
══════════════════════════════════════════ */
@media (max-width: 900px) and (orientation: landscape) {

  #hero {
    min-height: auto;
    padding: 5rem 0 3rem;
  }

  .hero-inner {
    grid-template-columns: 1fr 1fr;
    text-align: left;
    gap: 2rem;
  }

  .hero-tag  { justify-content: flex-start; }
  .hero-ctas { justify-content: flex-start; }
  .hero-desc { margin: 0 0 2.8rem; }

  .about-rain-wrap { aspect-ratio: 16/9; min-height: 200px; }
}
