/* Responsive Design - Mobile First Approach */

/* Extra Small Devices (phones, less than 576px) */
@media (max-width: 575.98px) {
  :root {
    --fs-h1: 2rem;
    --fs-h2: 1.75rem;
    --fs-h3: 1.375rem;
    --fs-h4: 1.125rem;
    --fs-navbar-brand: 1.125rem;
    --section-padding: 40px 0;
    --card-padding: 1.5rem;
  }
  
  .hero {
    min-height: 80vh;
    text-align: center;
  }
  
  .hero-title {
    font-size: 1.875rem;
    line-height: 1.2;
  }
  
  .hero-subtitle {
    font-size: 1.125rem;
  }
  
  .hero-desc {
    font-size: 0.9rem;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .service-card {
    padding: 1.5rem;
  }
  
  .service-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
  
  .service-price {
    font-size: 1.5rem;
  }
  
  .team-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .team-photo {
    width: 120px;
    height: 120px;
  }
  
  .contact-form {
    padding: 2rem 1.5rem;
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  
  .navbar-collapse {
    background: var(--primary-green);
    padding: 1rem;
    border-radius: 10px;
    margin-top: 1rem;
  }
  
  .navbar-nav .nav-link {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--primary-sage);
  }
  
  .navbar-nav .nav-link:last-child {
    border-bottom: none;
  }
  
  .section-desc {
    font-size: 0.95rem;
  }
  
  .card-body {
    padding: 1.5rem;
  }
  
  .review-card {
    padding: 1.5rem;
    margin: 0 0.5rem;
  }
  
  .faq-question,
  .faq-answer {
    padding: 1rem;
  }
  
  .btn-primary {
    padding: 0.875rem 1.5rem;
    font-size: 0.9rem;
  }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
  :root {
    --fs-h1: 2.25rem;
    --fs-h2: 1.875rem;
    --section-padding: 60px 0;
  }
  
  .hero {
    min-height: 85vh;
  }
  
  .hero-title {
    font-size: 2.125rem;
  }
  
  .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  
  .team-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
  
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  
  .footer-content {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .hero {
    min-height: 90vh;
  }
  
  .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  
  .team-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
  
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  
  .footer-content {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  
  .contact-form {
    padding: 2.5rem;
  }
  
  .review-card {
    padding: 2rem;
  }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  
  .team-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
  
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  .container {
    max-width: 1200px;
  }
  
  .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
  
  .team-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }
}

/* XXL Devices (extra extra large desktops, 1400px and up) */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
  
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .team-grid {
    grid-template-columns: repeat(5, 1fr);
  }
  
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  }
}

/* Landscape Orientation */
@media (orientation: landscape) and (max-height: 600px) {
  .hero {
    min-height: 100vh;
    padding: 2rem 0;
  }
  
  .hero-title {
    font-size: 2rem;
    margin-bottom: 1rem;
  }
  
  .hero-subtitle {
    font-size: 1.125rem;
    margin-bottom: 1rem;
  }
  
  .hero-desc {
    font-size: 0.95rem;
    margin-bottom: 1rem;
  }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .hero::before {
    background-image: url('../TOH_images/hero-bg@2x.webp');
  }
  
  .gallery-item img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: optimize-contrast;
  }
}

/* Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
  .hero {
    animation: none;
  }
  
  .card:hover {
    transform: none;
  }
  
  .service-card:hover {
    transform: none;
  }
  
  .team-member:hover {
    transform: none;
  }
  
  .gallery-item:hover img {
    transform: none;
  }
  
  .btn-primary:hover {
    transform: none;
  }
  
  .fade-in,
  .slide-in-left,
  .slide-in-right {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Dark Mode Support (if needed) */
@media (prefers-color-scheme: dark) {
  /* Currently disabled for accessibility as specified */
}

/* Print Styles */
@media print {
  * {
    background: transparent !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  
  .navbar,
  .footer,
  .btn-primary,
  .hero::before {
    display: none !important;
  }
  
  .hero {
    min-height: auto;
    padding: 2rem 0;
  }
  
  .section {
    padding: 2rem 0;
  }
  
  .card {
    border: 1px solid #ddd;
    break-inside: avoid;
  }
  
  .page-break {
    page-break-before: always;
  }
}

/* Container Adjustments */
.container {
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

/* Flexbox Utilities for Responsive Design */
.d-flex { display: flex; }
.d-block { display: block; }
.d-none { display: none; }
.flex-column { flex-direction: column; }
.flex-row { flex-direction: row; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }
.align-items-start { align-items: flex-start; }
.flex-wrap { flex-wrap: wrap; }

/* Responsive Display Utilities */
@media (max-width: 575.98px) {
  .d-sm-none { display: none !important; }
  .d-sm-block { display: block !important; }
  .d-sm-flex { display: flex !important; }
}

@media (min-width: 576px) and (max-width: 767.98px) {
  .d-md-none { display: none !important; }
  .d-md-block { display: block !important; }
  .d-md-flex { display: flex !important; }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .d-lg-none { display: none !important; }
  .d-lg-block { display: block !important; }
  .d-lg-flex { display: flex !important; }
}

@media (min-width: 992px) {
  .d-xl-none { display: none !important; }
  .d-xl-block { display: block !important; }
  .d-xl-flex { display: flex !important; }
}

/* Responsive Text Alignment */
@media (max-width: 767.98px) {
  .text-sm-center { text-align: center !important; }
  .text-sm-left { text-align: left !important; }
  .text-sm-right { text-align: right !important; }
}

@media (min-width: 768px) {
  .text-md-center { text-align: center !important; }
  .text-md-left { text-align: left !important; }
  .text-md-right { text-align: right !important; }
}

/* Responsive Spacing */
@media (max-width: 575.98px) {
  .p-sm-1 { padding: 0.25rem !important; }
  .p-sm-2 { padding: 0.5rem !important; }
  .p-sm-3 { padding: 1rem !important; }
  .m-sm-1 { margin: 0.25rem !important; }
  .m-sm-2 { margin: 0.5rem !important; }
  .m-sm-3 { margin: 1rem !important; }
} 