/* ===================================
   SAÚDE4U - RESPONSIVE STYLES
   =================================== */

/* ===== TABLET & BELOW (max-width: 1024px) ===== */
@media (max-width: 1024px) {
  :root {
    --font-h1: 2.75rem;
    --font-h2: 2rem;
    --font-h3: 1.75rem;
    --font-h4: 1.35rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
  }

  .container,
  .container-wide {
    padding: 0 var(--spacing-sm);
  }

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

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

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

  .timeline::before {
    left: 30px;
  }

  .timeline-item::before {
    left: 30px;
  }
}

/* ===== MOBILE & BELOW (max-width: 768px) ===== */
@media (max-width: 768px) {
  :root {
    --font-h1: 2.25rem;
    --font-h2: 1.75rem;
    --font-h3: 1.5rem;
    --font-h4: 1.25rem;
    --font-body: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2.5rem;
    --spacing-xl: 3rem;
  }

  /* Hero Mobile */
  .hero {
    min-height: auto;
    padding: calc(var(--spacing-lg) + 70px) 0 var(--spacing-lg);
  }

  .hero .container {
    padding: 0 var(--spacing-xs);
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-image {
    order: -1;
  }

  .hero-image img {
    max-width: 80%;
  }

  /* Header Mobile */
  .header .container {
    position: relative;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: var(--color-primary-dark);
    flex-direction: column;
    align-items: flex-start;
    padding: var(--spacing-md);
    gap: 0;
    transition: left var(--transition-base);
    overflow-y: auto;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-menu a {
    width: 100%;
    padding: var(--spacing-sm);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-cta {
    width: 100%;
    text-align: center;
    margin-top: var(--spacing-sm);
  }

  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }

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

  /* Buttons */
  .btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
  }

  .btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
  }

  /* Cards */
  .card {
    padding: var(--spacing-sm);
  }

  .card-icon {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }

  /* Footer Mobile */
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

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

  .footer-bottom-links {
    flex-direction: column;
    gap: var(--spacing-xs);
  }

  /* Floating Buttons Mobile */
  .whatsapp-float {
    width: 55px;
    height: 55px;
    bottom: 20px;
    right: 20px;
    font-size: 1.75rem;
  }

  .back-to-top {
    width: 45px;
    height: 45px;
    bottom: 85px;
    right: 20px;
    font-size: 1.25rem;
  }

  /* Modal Mobile */
  .modal-content {
    width: 95%;
    padding: var(--spacing-md);
    max-height: 85vh;
  }

  /* Timeline Mobile */
  .timeline::before {
    left: 20px;
  }

  .timeline-item {
    padding-left: 50px;
  }

  .timeline-item::before {
    left: 20px;
    transform: translateX(0);
  }

  /* Section Spacing Mobile */
  .section {
    padding: var(--spacing-lg) 0;
  }

  /* Text Alignment Mobile */
  .mobile-center {
    text-align: center;
  }

  /* Breadcrumb Mobile */
  .breadcrumb {
    font-size: 0.75rem;
    flex-wrap: wrap;
  }
}

/* ===== SMALL MOBILE (max-width: 480px) ===== */
@media (max-width: 480px) {
  :root {
    --font-h1: 1.85rem;
    --font-h2: 1.5rem;
    --font-h3: 1.25rem;
    --font-h4: 1.125rem;
  }

  .logo {
    font-size: 1.35rem;
  }

  .logo img {
    height: 32px;
  }

  .section-title h2 {
    font-size: 1.75rem;
  }

  .section-title .subtitle {
    font-size: 1rem;
  }

  .card h3 {
    font-size: 1.25rem;
  }

  .whatsapp-float {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }

  .back-to-top {
    width: 40px;
    height: 40px;
    bottom: 75px;
    font-size: 1.125rem;
  }
}

/* ===== LARGE DESKTOP (min-width: 1400px) ===== */
@media (min-width: 1400px) {
  :root {
    --font-h1: 4rem;
    --font-h2: 3rem;
    --font-h3: 2.25rem;
  }

  .container {
    max-width: 1320px;
  }

  .container-wide {
    max-width: 1600px;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  .header,
  .footer,
  .whatsapp-float,
  .back-to-top,
  .btn,
  .nav-menu {
    display: none !important;
  }

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

  .section {
    page-break-inside: avoid;
  }

  a {
    text-decoration: underline;
  }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
  .card {
    border: 2px solid var(--color-gray-dark);
  }

  .btn {
    border: 2px solid currentColor;
  }

  .form-control {
    border-width: 3px;
  }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
  /* Optional: Add dark mode styles if desired */
  /* This can be expanded based on client preference */
}

/* ===== LANDSCAPE MOBILE ===== */
@media (max-width: 768px) and (orientation: landscape) {
  .nav-menu {
    height: calc(100vh - 60px);
  }

  .section {
    padding: var(--spacing-md) 0;
  }
}

/* ===== UTILITY RESPONSIVE CLASSES ===== */
@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }

  .show-mobile {
    display: block !important;
  }
}

@media (min-width: 769px) {
  .hide-desktop {
    display: none !important;
  }

  .show-desktop {
    display: block !important;
  }
}

/* Impact Interactive Section - Responsive */
@media (max-width: 1024px) {
  .impact-interactive {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
  
  .impact-topics {
    flex-direction: row;
    overflow-x: auto;
    gap: var(--spacing-xs);
    padding-bottom: var(--spacing-xs);
  }
  
  .impact-topic {
    min-width: 200px;
    flex-shrink: 0;
  }
  
  .impact-content {
    min-height: 350px;
  }
}

@media (max-width: 768px) {
  .impact-topics {
    flex-direction: column;
    overflow-x: visible;
  }
  
  .impact-topic {
    min-width: auto;
    width: 100%;
  }
  
  .impact-card h3 {
    font-size: 1.5rem;
  }
  
  .stat-number {
    font-size: 2.5rem;
  }
  
  .impact-stat {
    padding: var(--spacing-sm);
  }
}

/* Platform Features Accordion - Responsive */
@media (max-width: 1024px) {
  .platform-showcase {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .platform-visual {
    order: 2;
    max-width: 400px;
    margin: 0 auto;
  }
  
  .features-accordion {
    order: 1;
  }
}

@media (max-width: 768px) {
  .platform-visual {
    max-width: 100%;
    padding: var(--spacing-md);
  }
  
  .platform-device {
    max-width: 100%;
  }
  
  .accordion-header {
    padding: 1rem;
  }
  
  .accordion-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    font-size: 1rem;
  }
  
  .accordion-header h3 {
    font-size: 1rem;
  }
  
  .accordion-content p {
    font-size: 0.875rem;
    padding: 0 1rem 1rem 3.5rem;
  }
}

/* NR-1 Banner - Responsive */
@media (max-width: 768px) {
  .nr1-banner {
    padding: var(--spacing-lg) 0;
  }
  
  .nr1-banner-title {
    font-size: 1.875rem;
  }
  
  .nr1-banner-subtitle {
    font-size: 1.125rem;
  }
  
  .nr1-banner-text {
    font-size: 1rem;
  }
  
  .banner-logo {
    height: 36px;
  }
  
  .nr1-banner-shapes {
    opacity: 0.5;
  }
  
  .shape-1 {
    width: 250px;
    height: 250px;
  }
  
  .shape-2 {
    width: 200px;
    height: 200px;
  }
  
  .shape-3 {
    width: 150px;
    height: 150px;
  }
}
