/* ================================================
   PULPRO v2 - Responsive Styles
   Concepto: "Océano Digital"
   ================================================ */

/* ================================================
   TABLET (max-width: 1024px)
   ================================================ */

@media (max-width: 1024px) {
  /* Typography */
  html {
    font-size: 15px;
  }

  /* Container */
  .container {
    padding: 0 var(--space-4);
  }

  /* Grid adjustments */
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .stat-item {
    padding: var(--space-6);
  }

  /* Services */
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .footer-brand {
    grid-column: span 2;
  }

  /* Sections */
  section {
    padding: var(--space-16) 0;
  }

  .section-header {
    margin-bottom: var(--space-12);
  }
}

/* ================================================
   TABLET SMALL (max-width: 768px)
   ================================================ */

@media (max-width: 768px) {
  /* Typography */
  html {
    font-size: 14px;
  }

  /* Navigation */
  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-8);
    z-index: var(--z-modal);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    font-size: var(--text-2xl);
  }

  .menu-toggle {
    display: flex;
  }

  .nav .btn {
    display: none;
  }

  /* Hero */
  .hero {
    min-height: 100vh;
    padding: var(--space-24) 0;
  }

  .hero-content {
    padding: 0 var(--space-4);
  }

  .hero-logo img {
    width: 80px;
  }

  .hero-subtitle {
    font-size: var(--text-lg);
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  /* Video de fondo en móvil */
  .hero-video-container {
    /* El video sigue cubriendo todo */
  }

  .hero-overlay {
    background:
      rgba(0, 0, 0, 0.6),
      linear-gradient(to bottom, transparent 0%, var(--color-deep-ocean) 100%);
  }

  .hero-cta .btn {
    width: 100%;
    max-width: 280px;
  }

  .hero-scroll {
    display: none;
  }

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

  .stat-item {
    padding: var(--space-4);
  }

  /* Services */
  .services-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .service-card {
    padding: var(--space-6);
  }

  /* Products Carousel */
  .product-card {
    flex: 0 0 300px;
  }

  /* Projects */
  .projects-grid {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
    text-align: center;
  }

  .footer-brand {
    grid-column: 1;
  }

  .footer-brand p {
    max-width: 100%;
    margin: var(--space-4) auto 0;
  }

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

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }

  /* Page Header */
  .page-header {
    padding: var(--space-32) 0 var(--space-12);
  }

  /* Sections */
  section {
    padding: var(--space-12) 0;
  }

  .section-header {
    margin-bottom: var(--space-8);
  }

  /* Grid */
  .grid-2,
  .grid-3,
  .grid-4,
  .grid-6 {
    grid-template-columns: 1fr;
  }

  /* Cards */
  .card-glass {
    padding: var(--space-6);
  }

  /* Two columns layout on mobile */
  .two-cols-mobile {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ================================================
   MOBILE (max-width: 480px)
   ================================================ */

@media (max-width: 480px) {
  /* Typography */
  html {
    font-size: 13px;
  }

  h1 {
    font-size: var(--text-4xl);
  }

  h2 {
    font-size: var(--text-3xl);
  }

  h3 {
    font-size: var(--text-2xl);
  }

  /* Container */
  .container {
    padding: 0 var(--space-3);
  }

  /* Header */
  .header {
    padding: var(--space-3) 0;
  }

  .logo img {
    height: 35px;
  }

  .logo-text {
    font-size: var(--text-xl);
  }

  /* Hero */
  .hero-logo img {
    width: 60px;
  }

  .hero-title {
    margin-bottom: var(--space-4);
  }

  .hero-subtitle {
    font-size: var(--text-base);
    margin-bottom: var(--space-6);
  }

  /* Stats */
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
  }

  .stat-item {
    padding: var(--space-3);
  }

  .stat-number {
    font-size: var(--text-3xl);
  }

  .stat-label {
    font-size: var(--text-xs);
  }

  /* Buttons */
  .btn {
    padding: var(--space-3) var(--space-5);
    font-size: var(--text-xs);
  }

  .btn-lg {
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-sm);
  }

  /* Cards */
  .card {
    padding: var(--space-4);
  }

  .card-glass {
    padding: var(--space-4);
  }

  .card-icon {
    width: 50px;
    height: 50px;
    font-size: var(--text-xl);
    margin-bottom: var(--space-4);
  }

  .card-title {
    font-size: var(--text-lg);
  }

  /* Products */
  .product-card {
    flex: 0 0 260px;
  }

  .product-content {
    padding: var(--space-4);
  }

  /* Clients */
  .client-logo {
    height: 40px;
  }

  .clients-track {
    gap: var(--space-8);
  }

  /* Section spacing */
  section {
    padding: var(--space-10) 0;
  }

  .section-header {
    margin-bottom: var(--space-6);
  }

  .section-label {
    font-size: 10px;
    padding: var(--space-1) var(--space-3);
  }

  /* Footer */
  .footer {
    padding: var(--space-10) 0 var(--space-6);
  }

  .footer-grid {
    gap: var(--space-6);
  }

  .footer-title {
    margin-bottom: var(--space-4);
  }

  /* Forms */
  .form-input,
  .form-textarea {
    padding: var(--space-3);
    font-size: var(--text-sm);
  }

  /* Page Header */
  .page-header {
    padding: var(--space-24) 0 var(--space-10);
  }

  .breadcrumb {
    font-size: var(--text-xs);
  }
}

/* ================================================
   EXTRA SMALL (max-width: 360px)
   ================================================ */

@media (max-width: 360px) {
  html {
    font-size: 12px;
  }

  .container {
    padding: 0 var(--space-2);
  }

  .hero-cta .btn {
    max-width: 100%;
  }

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

  .stat-item {
    padding: var(--space-4);
  }
}

/* ================================================
   LANDSCAPE MOBILE
   ================================================ */

@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: var(--space-16) 0;
  }

  .hero-logo {
    margin-bottom: var(--space-4);
  }

  .hero-logo img {
    width: 50px;
  }

  .hero-title {
    margin-bottom: var(--space-3);
  }

  .hero-subtitle {
    margin-bottom: var(--space-4);
  }

  .hero-scroll {
    display: none;
  }
}

/* ================================================
   LARGE SCREENS (min-width: 1400px)
   ================================================ */

@media (min-width: 1400px) {
  html {
    font-size: 17px;
  }

  .container {
    max-width: 1400px;
  }

  .services-grid {
    gap: var(--space-8);
  }

  .stats-grid {
    gap: var(--space-12);
  }
}

/* ================================================
   EXTRA LARGE SCREENS (min-width: 1800px)
   ================================================ */

@media (min-width: 1800px) {
  html {
    font-size: 18px;
  }

  .container {
    max-width: 1600px;
  }

  .hero-content {
    max-width: 1100px;
  }
}

/* ================================================
   TOUCH DEVICE ADJUSTMENTS
   ================================================ */

@media (hover: none) and (pointer: coarse) {
  /* Disable hover effects on touch devices */
  .hover-lift:hover {
    transform: none;
  }

  .hover-glow:hover {
    box-shadow: none;
  }

  .hover-scale:hover {
    transform: none;
  }

  .card:hover {
    transform: none;
  }

  .card-glass:hover {
    transform: none;
  }

  .card-glass::before {
    display: none;
  }

  /* Ensure buttons are easy to tap */
  .btn {
    min-height: 44px;
    min-width: 44px;
  }

  /* Larger tap targets for nav links */
  .nav-links a {
    padding: var(--space-3) var(--space-2);
  }

  /* Disable custom cursor */
  .custom-cursor {
    display: none;
  }
}

/* ================================================
   PRINT STYLES
   ================================================ */

@media print {
  * {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  .header,
  .footer,
  .hero-canvas,
  .hero-overlay,
  .btn,
  .menu-toggle {
    display: none !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
  }

  h1, h2, h3, h4 {
    page-break-after: avoid;
  }

  img {
    max-width: 100% !important;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 10pt;
  }
}

/* ================================================
   HIGH CONTRAST MODE
   ================================================ */

@media (prefers-contrast: high) {
  :root {
    --color-pearl: #ffffff;
    --color-slate: #cccccc;
    --color-electric-cyan: #00ffff;
    --color-white-05: rgba(255, 255, 255, 0.2);
    --color-white-10: rgba(255, 255, 255, 0.3);
  }

  .card,
  .card-glass {
    border-width: 2px;
  }

  .btn {
    border-width: 2px;
  }
}

/* ================================================
   DARK MODE (already dark, but ensures consistency)
   ================================================ */

@media (prefers-color-scheme: dark) {
  /* Site is already dark themed, no changes needed */
}
