/* ================================================= */
/* RESPONSIVE - Breakpoints y Ajustes Móviles */
/* Mobile-first responsive design */
/* ================================================= */

/* ========== BREAKPOINT REFERENCE ========== */
/*
  Mobile:     < 640px
  Tablet:     640px - 1024px
  Desktop:    1024px - 1280px
  Wide:       > 1280px
*/

/* ========== SMALL TABLETS (640px+) ========== */
@media screen and (min-width: 640px) {
  .container {
    padding: 0 var(--space-8);
  }
}

/* ========== TABLETS (768px+) ========== */
@media screen and (min-width: 768px) {
  /* Typography scaling */
  body {
    font-size: 100%;
  }
  
  .section-heading {
    font-size: var(--text-4xl);
  }
  
  .section-subtitle {
    font-size: var(--text-lg);
  }
}

/* ========== DESKTOP (1024px+) ========== */
@media screen and (min-width: 1024px) {
  /* Navbar desktop */
  .navbar-burger {
    display: none;
  }
  
  .navbar-menu {
    display: flex;
  }
  
  /* Typography */
  .section-heading {
    font-size: var(--text-5xl);
  }
}

/* ========== WIDE SCREENS (1280px+) ========== */
@media screen and (min-width: 1280px) {
  .container {
    max-width: 1200px;
  }
}

/* ========== MOBILE ADJUSTMENTS (< 768px) ========== */
@media screen and (max-width: 767px) {
  /* Base typography */
  body {
    font-size: 100%;
    line-height: 1.6;
  }
  
  h1 {
    font-size: var(--text-4xl);
  }
  
  h2 {
    font-size: var(--text-3xl);
  }
  
  h3 {
    font-size: var(--text-2xl);
  }
  
  /* Sections */
  section {
    padding: var(--space-12) 0;
  }
  
  .section-heading {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-3);
  }
  
  .section-subtitle {
    font-size: var(--text-base);
    margin-bottom: var(--space-10);
  }
  
  /* Container */
  .container {
    padding: 0 var(--space-4);
  }
  
  /* Buttons */
  .button {
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-sm);
  }
  
  /* Forms */
  .input,
  .textarea {
    font-size: 16px; /* Prevent zoom on iOS */
  }
  
  /* Footer adjustments */
  footer {
    padding: var(--space-10) 0 var(--space-6);
  }
  
  footer .columns {
    gap: var(--space-6);
  }
}

/* ========== SMALL MOBILE (< 480px) ========== */
@media screen and (max-width: 479px) {
  /* Typography */
  h1 {
    font-size: var(--text-3xl);
  }
  
  h2 {
    font-size: var(--text-2xl);
  }
  
  /* Container */
  .container {
    padding: 0 var(--space-4);
  }
  
  /* Hide non-essential elements */
  .hide-mobile {
    display: none;
  }
}

/* ========== LANDSCAPE MOBILE ========== */
@media screen and (max-width: 896px) and (orientation: landscape) {
  .hero-minimal {
    min-height: auto;
    padding: var(--space-24) var(--space-4) var(--space-12);
  }
  
  .hero-minimal-stats {
    margin-top: var(--space-12);
  }
}

/* ========== HIGH DPI DISPLAYS ========== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Sharper text */
  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* ========== PRINT STYLES ========== */
@media print {
  /* Hide interactive elements */
  .navbar,
  .whatsapp-button,
  .testim-arrow,
  .testim-dots,
  .portfolio-filters,
  .budget-header,
  footer {
    display: none !important;
  }
  
  /* Reset backgrounds */
  body,
  section {
    background: white !important;
    color: black !important;
  }
  
  /* Improve readability */
  body {
    font-size: 12pt;
    line-height: 1.5;
  }
  
  h1, h2, h3 {
    color: black !important;
    page-break-after: avoid;
  }
  
  /* Show URLs */
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 10pt;
    color: #666;
  }
}

/* ========== TOUCH DEVICE OPTIMIZATIONS ========== */
@media (hover: none) and (pointer: coarse) {
  /* Larger touch targets */
  .button,
  .navbar-item,
  .filter-btn {
    min-height: 44px;
    min-width: 44px;
  }

  /* Remove hover effects that don't make sense on touch */
  .hover-lift:hover,
  .hover-scale:hover {
    transform: none;
  }

  /* Show content that's usually hidden until hover */
  .portfolio-item .content {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== DARK MODE ADJUSTMENTS ========== */
/* DESACTIVADO - No usar modo oscuro para mantener consistencia visual */
/*
@media (prefers-color-scheme: dark) {
  body {
    background-color: var(--bg-dark);
  }

  .hero-minimal {
    background-color: var(--bg-dark);
  }

  .hero-minimal-title {
    color: var(--text-inverse);
  }

  .hero-minimal-subtitle {
    color: var(--gray-400);
  }

  .hero-minimal-mockup-screen {
    background: var(--bg-dark-elevated);
  }

  .hero-minimal-mockup-browser {
    background: var(--gray-900);
  }

  .hero-minimal-mockup-dots {
    background: var(--gray-800);
    border-color: var(--gray-700);
  }

  .mockup-line,
  .mockup-card {
    background: var(--gray-800);
  }

  .services {
    background-color: var(--bg-dark-elevated);
  }

  .services .card-service > div {
    background-color: var(--gray-900);
  }

  .services .card-service h3 {
    color: var(--text-inverse);
  }

  .services .card-service p {
    color: var(--gray-400);
  }

  #contact {
    background-color: var(--bg-dark-elevated);
  }

  #form-contact {
    background-color: var(--gray-900);
  }

  #contact .input,
  #contact .textarea {
    background-color: var(--gray-800);
    color: var(--text-inverse);
    border-color: var(--gray-700);
  }

  #contact .label {
    color: var(--text-inverse);
  }
}
*/

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}
