/* Responsive Design - Mobile First Approach */

/* Large Tablets and Small Desktops */
@media (max-width: 1024px) {
  .container {
    padding: 0 var(--space-4);
  }
  
  .hero-title {
    font-size: var(--text-4xl);
  }
  
  .section-title {
    font-size: var(--text-3xl);
  }
  
  .about-grid {
    gap: var(--space-8);
  }
  
  .calculator-content {
    gap: var(--space-8);
  }
  
  .contact-content {
    gap: var(--space-8);
  }
  
  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
  }
}

/* Tablets */
@media (max-width: 768px) {
  .logo-image {
    height: 35px;
    max-width: 180px;
  }

  #header-placeholder {
    height: 88px;
  }

  .footer-logo-image {
    height: 40px;
    max-width: 200px;
  }
  
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background: var(--white);
    box-shadow: var(--shadow-xl);
    transition: right var(--transition-normal);
    z-index: 999;
  }
  
  .nav-menu.active {
    right: 0;
  }
  
  .nav-list {
    flex-direction: column;
    padding: var(--space-8);
    gap: var(--space-4);
  }
  
  .nav-link {
    font-size: var(--text-lg);
    padding: var(--space-3) 0;
  }
  
  .nav-toggle {
    display: flex;
  }

  .nav-actions {
    gap: var(--space-2);
  }

  .nav-actions .btn {
    font-size: var(--text-xs);
    padding: var(--space-2) var(--space-3);
    min-width: auto;
    border-radius: var(--radius-sm);
  }

  .nav-toggle.active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
  }
  
  .nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }
  
  .nav-toggle.active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
  }
  
  .hero {
    min-height: 500px;
    padding-top: var(--space-12);
  }

  .hero-title {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-4);
  }

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

  .hero-stats {
    gap: var(--space-4);
    flex-wrap: wrap;
  }

  .stat-item {
    min-width: 100px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 300px;
  }
  
  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  
  .about-visual {
    order: -1;
  }
  
  .timeline {
    max-width: 100%;
  }
  
  .timeline::before {
    left: 20px;
  }
  
  .timeline-item {
    flex-direction: column !important;
    align-items: flex-start;
    padding-left: var(--space-12);
  }
  
  .timeline-marker {
    left: 20px;
  }
  
  .timeline-content {
    width: 100%;
  }
  
  .product-filters {
    gap: var(--space-2);
  }
  
  .filter-btn {
    font-size: var(--text-sm);
    padding: var(--space-2) var(--space-4);
  }
  
  .products-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  
  .calculator-content {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  
  .calculator-text {
    text-align: center;
    margin-bottom: var(--space-6);
  }
  
  
  .innovation-showcase {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  
  .assistance-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
  
  .assistance-features {
    grid-template-columns: 1fr;
  }
  
  .contact-content {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  
  .contact-form {
    order: -1;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--space-6);
    text-align: center;
  }
  
  .footer-social {
    justify-content: center;
  }
  
  .footer-bottom-content {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }
  
  .modal-content {
    width: 95%;
    margin: var(--space-4);
  }
  
  .whatsapp-float {
    bottom: var(--space-4);
    right: var(--space-4);
  }
  
  .whatsapp-float a {
    width: 50px;
    height: 50px;
    font-size: var(--text-xl);
  }
  
  /* Carousel Responsive */
  .carousel-nav {
    padding: 0 var(--space-2);
  }
  
  .carousel-btn {
    width: 40px;
    height: 40px;
    font-size: var(--text-base);
  }
  
  .carousel-prev {
    margin-left: var(--space-2);
  }
  
  .carousel-next {
    margin-right: var(--space-2);
  }
  
  .carousel-indicators {
    bottom: var(--space-6);
    gap: var(--space-2);
  }
  
  .indicator {
    width: 10px;
    height: 10px;
  }
}

/* Mobile Phones */
@media (max-width: 480px) {
  .logo-image {
    height: 30px;
    max-width: 150px;
  }

  #header-placeholder {
    height: 80px;
  }

  .footer-logo-image {
    height: 35px;
    max-width: 180px;
  }
  
  :root {
    --container-padding: 1rem;
    --space-20: 3rem;
    --space-16: 2.5rem;
    --space-12: 2rem;
    --space-8: 1.5rem;
  }
  
  .hero {
    min-height: auto;
    padding-top: var(--space-16);
    padding-bottom: var(--space-12);
  }

  .hero-title {
    font-size: var(--text-2xl);
    line-height: 1.2;
  }
  
  .hero-subtitle {
    font-size: var(--text-base);
    margin-bottom: var(--space-5);
  }

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

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

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

  .carousel-nav {
    top: unset;
    bottom: var(--space-10);
  }

  .carousel-btn {
    width: 36px;
    height: 36px;
    font-size: var(--text-sm);
  }
  
  .section-subtitle {
    font-size: var(--text-base);
  }
  
  .about-text h3 {
    font-size: var(--text-xl);
  }
  
  .product-card {
    margin-bottom: var(--space-4);
  }
  
  .product-content {
    padding: var(--space-4);
  }
  
  .product-name {
    font-size: var(--text-lg);
  }
  
  .calculator-form {
    padding: var(--space-6);
  }
  
  .shipping-calculator {
    padding: var(--space-4);
  }
  
  .showcase-item {
    padding: var(--space-4);
  }
  
  .showcase-icon {
    width: 60px;
    height: 60px;
  }
  
  .showcase-icon i {
    font-size: var(--text-xl);
  }
  
  .assistance-item {
    padding: var(--space-4);
  }
  
  .assistance-icon {
    width: 50px;
    height: 50px;
  }
  
  .contact-form {
    padding: var(--space-6);
  }
  
  .btn {
    padding: var(--space-3) var(--space-5);
    font-size: var(--text-sm);
  }
  
  .btn-large {
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-sm);
  }
}

/* Extra Small Mobile */
@media (max-width: 320px) {
  .hero-title {
    font-size: var(--text-xl);
  }
  
  .hero-subtitle {
    font-size: var(--text-sm);
  }
  
  .stat-number {
    font-size: var(--text-xl);
  }
  
  .section-title {
    font-size: var(--text-xl);
  }
  
  .product-actions {
    flex-direction: column;
  }
  
  .product-actions .btn {
    width: 100%;
  }
}

/* Landscape Orientation */
@media (max-height: 600px) and (orientation: landscape) {
  .hero {
    min-height: 100vh;
  }
  
  .hero-title {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-4);
  }
  
  .hero-subtitle {
    font-size: var(--text-lg);
    margin-bottom: var(--space-4);
  }
  
  .hero-stats {
    margin-bottom: var(--space-4);
  }
  
  .hero-scroll-indicator {
    display: none;
  }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .logo-text {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  
  .hero-title {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* Print Styles */
@media print {
  .header,
  .nav-toggle,
  .hero-scroll-indicator,
  .whatsapp-float,
  .modal {
    display: none !important;
  }
  
  .hero {
    height: auto;
    min-height: auto;
    background: var(--white);
    color: var(--gray-900);
    padding: var(--space-4) 0;
  }
  
  .hero-background {
    display: none;
  }
  
  .hero-content {
    color: var(--gray-900);
  }
  
  .hero-title {
    color: var(--gray-900);
  }
  
  .hero-subtitle {
    color: var(--gray-700);
  }
  
  .section {
    page-break-inside: avoid;
  }
  
  .product-card,
  .feature-item,
  .showcase-item,
  .assistance-item {
    page-break-inside: avoid;
    break-inside: avoid;
  }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .hero-scroll-indicator {
    animation: none;
  }
  
  .coverage-dot.active {
    animation: none;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .modal-content {
    background: var(--gray-800);
    color: var(--white);
  }
  
  .modal-header {
    border-bottom-color: var(--gray-700);
  }
  
  .modal-close {
    color: var(--gray-400);
  }
  
  .modal-close:hover {
    color: var(--white);
  }
}

/* Focus Visible for Better Accessibility */
@media (hover: hover) {
  .btn:focus-visible,
  .nav-link:focus-visible,
  .filter-btn:focus-visible,
  .form-group input:focus-visible,
  .form-group select:focus-visible,
  .form-group textarea:focus-visible,
  .social-link:focus-visible {
    outline: 2px solid var(--gipser-secondary);
    outline-offset: 2px;
  }
}

/* Touch Devices */
@media (pointer: coarse) {
  .btn,
  .nav-link,
  .filter-btn,
  .product-card,
  .feature-item,
  .showcase-item,
  .assistance-item,
  .social-link {
    min-height: 44px;
    min-width: 44px;
  }
  
  .product-card:hover,
  .feature-item:hover,
  .showcase-item:hover,
  .assistance-item:hover {
    transform: none;
  }
  
  .btn:hover {
    transform: none;
  }
  
  .social-link:hover {
    transform: none;
  }
}

/* Large Desktops */
@media (min-width: 1400px) {
  .container {
    max-width: 1600px;
  }
  
  .hero-title {
    font-size: var(--text-6xl);
  }
  
  .section-title {
    font-size: var(--text-5xl);
  }
  
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .innovation-showcase {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .assistance-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Ultra Wide Screens */
@media (min-width: 1920px) {
  :root {
    --container-max-width: 1800px;
  }
  
  .hero-title {
    font-size: 4rem;
  }
  
  .section-title {
    font-size: 3.5rem;
  }
}

/* Performance Optimizations */
@media (min-resolution: 120dpi) {
  .hero-video {
    display: none;
  }
  
  .hero-background {
    background: linear-gradient(135deg, var(--gipser-primary), var(--gipser-primary-light));
  }
}

/* Network Conditions - Reduced Data Usage */
@media (prefers-reduced-data: reduce) {
  .hero-video {
    display: none;
  }
  
  .hero-background {
    background: linear-gradient(135deg, var(--gipser-primary), var(--gipser-primary-light));
  }
  
  .product-image img,
  .about-image img {
    image-rendering: -webkit-optimize-contrast;
  }
}
