/* ============================================
   RESPONSIVE STYLES
   GS PROCUREMENT & SERVICES INDUSTRY
   ============================================ */

/* Large Desktop (>1200px) */
@media (min-width: 1201px) {
  .container {
    padding: 0 var(--spacing-md);
  }
}

/* Desktop (992px - 1200px) */
@media (max-width: 1200px) {
  :root {
    --header-height: 75px;
  }
  
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
  }
}

/* Tablet (768px - 991px) */
@media (max-width: 991px) {
  :root {
    --header-height: 70px;
  }
  
  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-color);
    flex-direction: column;
    padding: var(--spacing-md);
    transform: translateX(100%);
    transition: transform var(--transition-normal);
    overflow-y: auto;
  }
  
  .nav-menu.active {
    transform: translateX(0);
  }
  
  .nav-list {
    flex-direction: column;
    width: 100%;
    gap: 0;
  }
  
  .nav-link {
    padding: var(--spacing-sm) 0;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--border-color);
  }
  
  .nav-link::after {
    display: none;
  }
  
  .header-controls {
    width: 100%;
    justify-content: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-color);
    margin-top: var(--spacing-md);
  }
  
  .mobile-toggle {
    display: flex;
  }
  
  .mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .mobile-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
  
  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
  
  .about-image {
    order: -1;
    max-height: 400px;
  }
  
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .contact-wrapper {
    grid-template-columns: 1fr;
  }
  
  .contact-info {
    order: 2;
  }
  
  .hero-stats {
    gap: var(--spacing-md);
  }
  
  .stat-number {
    font-size: 2rem;
  }
}

/* Mobile Large (576px - 767px) */
@media (max-width: 767px) {
  :root {
    --spacing-xl: 3.5rem;
    --spacing-lg: 2rem;
  }
  
  .hero {
    min-height: 100vh;
    padding-top: calc(var(--header-height) + 20px);
  }
  
  .hero-content {
    text-align: center;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .hero-stats {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .stat-item {
    min-width: 100px;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .service-image {
    height: 200px;
  }
  
  .mv-cards {
    grid-template-columns: 1fr;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-brand .logo {
    justify-content: center;
  }
  
  .footer-contact p {
    justify-content: center;
  }
  
  .contact-form-wrapper {
    padding: var(--spacing-md);
  }
  
  .contact-info {
    padding: var(--spacing-md);
  }
  
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
}

/* Mobile Small (<576px) */
@media (max-width: 575px) {
  :root {
    --header-height: 65px;
    --spacing-xl: 3rem;
    --spacing-lg: 1.5rem;
  }
  
  html {
    font-size: 14px;
  }
  
  .container {
    padding: 0 var(--spacing-sm);
  }
  
  .logo img {
    height: 45px;
  }
  
  .hero-badge {
    font-size: 0.8rem;
    padding: 0.4rem 1rem;
  }
  
  .hero h1 {
    font-size: 1.8rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .hero-buttons .btn {
    width: 100%;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: var(--spacing-sm);
  }
  
  .stat-number {
    font-size: 1.75rem;
  }
  
  .section-header {
    margin-bottom: var(--spacing-md);
  }
  
  .values-grid {
    grid-template-columns: 1fr;
  }
  
  .value-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  
  .gallery-item {
    aspect-ratio: 16/10;
  }
  
  .contact-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .lang-selector {
    order: -1;
  }
  
  .map-container {
    height: 250px;
  }
}

/* Print Styles */
@media print {
  .header,
  .footer,
  .back-to-top,
  .mobile-toggle,
  .preloader {
    display: none !important;
  }
  
  .hero {
    min-height: auto;
    padding: var(--spacing-md) 0;
  }
  
  .section {
    padding: var(--spacing-md) 0;
    break-inside: avoid;
  }
  
  .service-card,
  .gallery-item,
  .value-card {
    break-inside: avoid;
  }
  
  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }
  
  a {
    text-decoration: underline;
    color: #000;
  }
}

/* Landscape Orientation Adjustments */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: calc(var(--header-height) + 30px) 0 30px;
  }
  
  .hero-stats {
    display: none;
  }
}

/* High DPI / Retina Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .logo img {
    image-rendering: -webkit-optimize-contrast;
  }
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .fade-in,
  .fade-in-left,
  .fade-in-right {
    opacity: 1;
    transform: none;
  }
}

/* Hover Capability Detection */
@media (hover: none) {
  .service-card:hover,
  .value-card:hover,
  .mv-card:hover {
    transform: none;
  }
  
  .gallery-overlay {
    opacity: 1;
    background: linear-gradient(to top, rgba(13, 124, 102, 0.8) 0%, transparent 70%);
  }
  
  .btn-primary:hover,
  .btn-secondary:hover {
    transform: none;
  }
}
