/* Responsive Design - Mobile First Approach */

/* Extra Small Devices (phones, 576px and down) */
@media (max-width: 575.98px) {
  .hero-section h1 {
    font-size: var(--font-3xl);
    padding-top: 200px;
}
  
  .hero-section h2 {
    font-size: var(--font-xl);
  }
  
  .hero-section p {
    font-size: var(--font-base);
  }
  
  .feature-card,
  .service-card,
  .contact-form,
  .contact-info {
    margin-bottom: 1.73rem;
  }
  
  .service-card img {
    height: 150px;
  }
  
  .navbar-brand {
    font-size: var(--font-lg);
  }
  
  .py-5 {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
  
  .hero-section .container {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
  
  .breadcrumb-nav {
    margin-top: 56px;
  }
  
  #space {
    margin-top: 56px;
  }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
  .hero-section h1 {
    font-size: var(--font-4xl);
    padding-top: 200px;
}
  
  .hero-section h2 {
    font-size: var(--font-2xl);
  }
  
  .service-card img {
    height: 180px;
  }
  
  .feature-card {
    margin-bottom: 1.65rem;
  }
  
  .contact-form {
    margin-bottom: 2rem;
  }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .hero-section .col-lg-6 {
    margin-bottom: 2rem;
  }
  
  .service-card img {
    height: 200px;
  }
  
  .feature-card,
  .method-card,
  .equipment-card,
  .safety-card,
  .schedule-card,
  .success-card,
  .technique-card,
  .assessment-card,
  .nutrition-card,
  .competition-card,
  .research-card {
    margin-bottom: 1.63rem;
  }
  
  .navbar-collapse {
    background-color: rgba(81, 165, 234, 0.95);
    border-radius: 8px;
    margin-top: 1rem;
    padding: 1rem;
  }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .container {
    max-width: 960px;
  }
  
  .service-card img {
    height: 220px;
  }
  
  .hero-section .col-lg-6:last-child {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
  
  .hero-section {
    min-height: 100vh;
  }
  
  .service-card img {
    height: 240px;
  }
  
  .feature-card,
  .service-card {
    transition: all 0.4s ease;
  }
  
  .feature-card:hover,
  .service-card:hover {
    transform: translateY(-8px) scale(1.02);
  }
}

/* Ultra Wide Screens (1400px and up) */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
  
  .hero-section h1 {
    font-size: 3rem;
    padding-top: 200px;
}
  
  .hero-section h2 {
    font-size: 2rem;
  }
}

/* Landscape Orientation Adjustments */
@media screen and (orientation: landscape) and (max-height: 568px) {
  .hero-section {
    min-height: auto;
    padding: 2rem 0;
  }
  
  .hero-section .min-vh-100 {
    min-height: auto;
  }
  
  .navbar {
    padding: 0.5rem 0;
  }
}

/* Print Styles */
@media print {
  .navbar,
  .btn,
  .contact-form,
  footer {
    display: none;
  }
  
  .hero-section {
    background: none;
    color: black;
  }
  
  .hero-section::before {
    display: none;
  }
  
  .feature-card,
  .service-card {
    box-shadow: none;
    border: 1px solid #e9e9e9;
    page-break-inside: avoid;
  }
  
  h1, h2, h3, h4, h5, h6 {
    color: black;
  }
  
  p {
    color: black;
  }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .hero-section::before {
    background-image: url('../GAT_images/hero-bg@2x.webp');
  }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  .feature-card:hover,
  .service-card:hover,
  .feature-item:hover,
  .method-card:hover,
  .equipment-card:hover,
  .safety-card:hover,
  .schedule-card:hover,
  .success-card:hover,
  .technique-card:hover,
  .assessment-card:hover,
  .nutrition-card:hover,
  .competition-card:hover,
  .research-card:hover {
    transform: none;
  }
  
  .btn-primary:hover {
    transform: none;
  }
  
  /* Increase touch targets */
  .navbar-nav .nav-link {
    padding: 1rem;
    margin: 0.25rem 0;
  }
  
  .btn {
    min-height: 44px;
    min-width: 44px;
  }
  
  .form-control {
    min-height: 44px;
  }
}

/* Dark Mode Support */

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .hero-section,
  .feature-card,
  .service-card,
  .btn,
  .navbar {
    transition: none;
  }
  
  .fade-in {
    opacity: 1;
    transform: none;
  }
}

/* Container Responsive Adjustments */
@media (max-width: 575.98px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Grid System Enhancements */
@media (max-width: 767.98px) {
  .row > [class*="col-"] {
    margin-bottom: 1rem;
  }
  
  .row > [class*="col-"]:last-child {
    margin-bottom: 0;
  }
}

/* Navigation Responsive Behavior */
@media (max-width: 991.98px) {
  .navbar-toggler {
    padding: 0.5rem;
    border: 2px solid var(--white);
    border-radius: 4px;
  }
  
  .navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
  }
  
  .navbar-collapse {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(59, 161, 222, 0.95);
    border-radius: 8px;
  }
  
  .navbar-nav .nav-link {
    padding: 0.75rem 1rem;
    margin: 0.25rem 0;
    border-radius: 4px;
    transition: background-color 0.3s ease;
  }
  
  .navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }
}

/* Form Responsive Behavior */
@media (max-width: 767.98px) {
  .contact-form .row .col-md-6 {
    margin-bottom: 1rem;
  }
  
  .form-control {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

/* Image Responsive Behavior */
@media (max-width: 991.98px) {
  .hero-section img {
    max-width: 100%;
    height: auto;
    margin-top: 2rem;
  }
}

/* Footer Responsive Behavior */
@media (max-width: 767.98px) {
  footer .col-lg-3,
  footer .col-lg-6 {
    margin-bottom: 2rem;
    text-align: center;
  }
  
  footer .col-lg-3:last-child,
  footer .col-lg-6:last-child {
    margin-bottom: 0;
  }
}

/* Service Cards Grid Responsive */
@media (max-width: 1199.98px) {
  .services .col-lg-4:nth-child(4),
  .services .col-lg-4:nth-child(5),
  .services .col-lg-4:nth-child(6) {
    margin-top: 1.70rem;
  }
}

@media (max-width: 767.98px) {
  .services .col-lg-4 {
    margin-bottom: 1.65rem;
  }
  
  .services .col-lg-4:last-child {
    margin-bottom: 0;
  }
}

/* Spacing Adjustments for Mobile */
@media (max-width: 575.98px) {
  .mb-5 {
    margin-bottom: 2rem;
  }
  
  .mb-4 {
    margin-bottom: 1rem;
  }
  
  section {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Performance Optimizations for Mobile */
@media (max-width: 767.98px) {
  .hero-section::before {
    background-attachment: scroll; /* Better performance on mobile */
  }
  
  .gradient-bg {
    background: var(--primary-blue); /* Fallback for low-end devices */
  }
} 