/* ==========================================================================
   RESPONSIVE DESIGN & MEDIA QUERIES
   ========================================================================== */

/* Mobile First Approach */

/* ==========================================================================
   EXTRA SMALL DEVICES (Portrait phones, less than 576px)
   ========================================================================== */

@media (max-width: 575.98px) {
  
  /* Typography */
  :root {
    --font-size-base: 0.9rem;
    --font-size-sm: 0.8rem;
    --font-size-lg: 1rem;
    --font-size-xl: 1.125rem;
    --font-size-2xl: 1.25rem;
    --font-size-3xl: 1.5rem;
    --font-size-4xl: 1.875rem;
    --section-padding: 2rem 0;
  }
  
  /* Header */
  body {
    padding-top: 60px; /* Smaller padding for mobile */
  }
  
  .navbar {
    padding: 0.5rem 0;
  }
  
  .navbar-brand {
    font-size: var(--font-size-lg);
  }
  
  .navbar-nav .nav-link {
    font-size: var(--font-size-sm);
    margin: 0 0.25rem;
  }
  
  /* Hero Section */
  .hero-section {
    min-height: 80vh;
    text-align: center;
  }
  
  .hero-title {
    font-size: var(--font-size-3xl);
    margin-bottom: 1rem;
  }
  
  .hero-subtitle {
    font-size: var(--font-size-lg);
    margin-bottom: 1rem;
  }
  
  .hero-desc {
    font-size: var(--font-size-base);
    margin-bottom: 1.68rem;
  }
  
  .hero-image {
    margin-top: 2rem;
  }
  
  /* Sections */
  .section-title {
    font-size: var(--font-size-2xl);
  }
  
  .section-subtitle {
    font-size: var(--font-size-lg);
  }
  
  .section-desc {
    font-size: var(--font-size-base);
  }
  
  /* Cards */
  .feature-item,
  .service-card,
  .priceplan-card,
  .team-card,
  .review-card {
    padding: 1.5rem;
    margin-bottom: 1.67rem;
  }
  
  .service-image {
    height: 150px;
  }
  
  .team-photo {
    width: 120px;
    height: 120px;
  }
  
  /* Gallery */
  .gallery-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .gallery-image {
    height: 200px;
  }
  
  /* Contact Form */
  .contact-form {
    padding: 1.5rem;
  }
  
  /* Footer */
  .footer {
    padding: 2rem 0 1rem;
  }
  
  .footer-content {
    text-align: center;
    margin-bottom: 1.71rem;
  }
  
}

/* ==========================================================================
   SMALL DEVICES (Landscape phones, 576px and up)
   ========================================================================== */

@media (min-width: 576px) and (max-width: 767.98px) {
  
  /* Typography */
  :root {
    --font-size-base: 0.95rem;
    --font-size-sm: 0.85rem;
    --font-size-lg: 1.05rem;
    --font-size-xl: 1.2rem;
    --font-size-2xl: 1.35rem;
    --font-size-3xl: 1.65rem;
    --font-size-4xl: 2rem;
    --section-padding: 2.5rem 0;
  }
  
  /* Hero Section */
  .hero-section {
    min-height: 85vh;
  }
  
  .hero-title {
    font-size: var(--font-size-4xl);
  }
  
  .hero-subtitle {
    font-size: var(--font-size-xl);
  }
  
  /* Gallery */
  .gallery-layout {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .gallery-image {
    height: 220px;
  }
  
  /* Contact Form */
  .contact-form {
    padding: 2rem;
  }
  
}

/* ==========================================================================
   MEDIUM DEVICES (Tablets, 768px and up)
   ========================================================================== */

@media (min-width: 768px) and (max-width: 991.98px) {
  
  /* Typography */
  :root {
    --section-padding: 3rem 0;
  }
  
  /* Hero Section */
  .hero-section {
    min-height: 90vh;
  }
  
  /* Gallery */
  .gallery-layout {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .gallery-image {
    height: 230px;
  }
  
  /* Services Grid */
  .services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
  
  /* Price Plans */
  .priceplan-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
  
  /* Team Grid */
  .team-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
  
}

/* ==========================================================================
   LARGE DEVICES (Desktops, 992px and up)
   ========================================================================== */

@media (min-width: 992px) and (max-width: 1199.98px) {
  
  /* Typography */
  :root {
    --section-padding: 3.5rem 0;
  }
  
  /* Hero Section */
  .hero-section {
    min-height: 95vh;
  }
  
  /* Gallery */
  .gallery-layout {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .gallery-image {
    height: 240px;
  }
  
  /* Services Grid */
  .services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
  
  /* Team Grid */
  .team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
  
}

/* ==========================================================================
   EXTRA LARGE DEVICES (Large desktops, 1200px and up)
   ========================================================================== */

@media (min-width: 1200px) {
  
  /* Typography */
  :root {
    --section-padding: 4rem 0;
  }
  
  /* Hero Section */
  .hero-section {
    min-height: 100vh;
  }
  
  /* Gallery */
  .gallery-layout {
    grid-template-columns: repeat(5, 1fr);
  }
  
  .gallery-image {
    height: 250px;
  }
  
  /* Services Grid */
  .services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
  
  /* Team Grid */
  .team-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2rem;
  }
  
}

/* ==========================================================================
   ACCESSIBILITY & MOTION PREFERENCES
   ========================================================================== */

/* Reduced Motion */
@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;
  }
  
  .hero-section::before {
    opacity: 0.05;
  }
  
  .feature-item:hover,
  .service-card:hover,
  .priceplan-card:hover,
  .team-card:hover,
  .review-card:hover,
  .gallery-item:hover {
    transform: none;
  }
  
  .gallery-item:hover .gallery-image {
    transform: none;
  }
  
  .contact-form .btn:hover {
    transform: none;
  }
  
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  
  :root {
    --primary-green: #035245;
    --primary-coral: #da0020;
    --primary-yellow: #b17c00;
    --primary-purple: #4f036f;
    --primary-blue: #071fe1;
    --neutral-dark: #000000;
    --neutral-medium: #423c3c;
  }
  
  .hero-section {
    background: var(--neutral-dark);
  }
  
  .hero-title,
  .hero-subtitle,
  .hero-desc {
    text-shadow: none;
  }
  
  .navbar {
    border-bottom: 2px solid var(--neutral-dark);
  }
  
  .service-card,
  .priceplan-card,
  .team-card,
  .review-card,
  .feature-item {
    border: 2px solid var(--neutral-dark);
  }
  
}

/* Dark Mode Preference */

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
  
  * {
    background: transparent !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  
  .navbar,
  .hero-section,
  .gallery-section,
  .contact-section {
    display: none !important;
  }
  
  .section {
    padding: 1rem 0;
  }
  
  .section-title {
    font-size: 1.56rem;
  }
  
  .section-subtitle {
    font-size: 1.23rem;
  }
  
  .service-card,
  .priceplan-card,
  .team-card,
  .review-card,
  .feature-item {
    border: 1px solid #d9d9d9;
    margin-bottom: 1rem;
    padding: 1rem;
  }
  
  .team-photo,
  .service-image,
  .gallery-image,
  .hero-image {
    max-width: 100px;
    height: auto;
  }
  
}

/* ==========================================================================
   CUSTOM BREAKPOINTS
   ========================================================================== */

/* Extra Small Mobile (320px and below) */
@media (max-width: 320px) {
  
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .hero-title {
    font-size: 1.62rem;
  }
  
  .section-title {
    font-size: 1.35rem;
  }
  
  .feature-item,
  .service-card,
  .priceplan-card,
  .team-card,
  .review-card {
    padding: 1rem;
  }
  
  .contact-form {
    padding: 1rem;
  }
  
}

/* Landscape Mobile (480px - 767px) */
@media (min-width: 480px) and (max-width: 767px) and (orientation: landscape) {
  
  .hero-section {
    min-height: 70vh;
  }
  
  .navbar {
    padding: 0.5rem 0;
  }
  
  .section {
    padding: 2rem 0;
  }
  
}

/* ==========================================================================
   TOUCH DEVICE OPTIMIZATIONS
   ========================================================================== */

@media (hover: none) and (pointer: coarse) {
  
  .nav-link,
  .footer-links a {
    padding: 0.75rem 0.5rem;
  }
  
  .contact-form .btn {
    padding: 1rem 2rem;
    font-size: 1.11rem;
  }
  
  .faq-question {
    padding: 1.5rem;
  }
  
  .feature-item:hover,
  .service-card:hover,
  .priceplan-card:hover,
  .team-card:hover,
  .review-card:hover,
  .gallery-item:hover {
    transform: none;
  }
  
  .gallery-item:hover .gallery-image {
    transform: none;
  }
  
  .contact-form .btn:hover {
    transform: none;
  }
  
}

/* ==========================================================================
   VIEWPORT OPTIMIZATIONS
   ========================================================================== */

/* Prevent horizontal scrolling on mobile */
@media (max-width: 767px) {
  
  body {
    overflow-x: hidden;
  }
  
  .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .row {
    margin-left: -0.75rem;
    margin-right: -0.75rem;
  }
  
  .row > * {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  
}

/* ==========================================================================
   FOCUS STATES FOR ACCESSIBILITY
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
  
  .nav-link:focus,
  .contact-form .form-control:focus,
  .contact-form .btn:focus,
  .faq-question:focus {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
  }
  
}

/* ==========================================================================
   HIGH DPI DISPLAYS
   ========================================================================== */

@media only screen and (-webkit-min-device-pixel-ratio: 2),
       only screen and (min--moz-device-pixel-ratio: 2),
       only screen and (-o-min-device-pixel-ratio: 2/1),
       only screen and (min-device-pixel-ratio: 2),
       only screen and (min-resolution: 192dpi),
       only screen and (min-resolution: 2dppx) {
  
  .hero-image,
  .service-image,
  .gallery-image,
  .team-photo {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
  
} 

.hero-content {
    padding-top: 200px;
}