/* ================================
   Responsive Design
   Mobile-first approach
   ================================ */

/* Tablet (768px and up) */
@media (max-width: 1024px) {
  :root {
    --spacing-xl: 4rem;
    --spacing-lg: 3rem;
  }
  
  .about-content {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr 1fr;
  }
  
  .footer-column:first-child {
    grid-column: 1 / -1;
  }
}

/* Tablet and Mobile (1023px and below) */
@media (max-width: 1023px) {
  .service-area-content {
    grid-template-columns: 1fr;
  }
  
  .service-area-map {
    order: 2;
  }
  
  .service-area-text {
    order: 1;
  }
  
  .map-container {
    height: 400px;
  }
  
  .contact-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .differentiators-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

/* Mobile (767px and below) */
@media (max-width: 767px) {
  :root {
    --spacing-xl: 3rem;
    --spacing-lg: 2rem;
    --spacing-md: 1.5rem;
    --container-padding: 1rem;
  }
  
  /* Navigation */
  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: clamp(1.5rem, 4vh, 3rem);
    padding: 2rem;
    transform: translateX(100%);
    transition: transform var(--transition-normal);
    z-index: 999;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
  }
  
  .nav-links.active {
    transform: translateX(0);
  }
  
  .nav-link {
    color: var(--primary-dark);
    font-size: clamp(1.25rem, 5vw, 1.75rem);
    padding: 0.75rem 1rem;
    font-weight: 600;
    width: 100%;
    max-width: 300px;
    text-align: center;
  }
  
  .nav-link:hover {
    color: var(--primary-medium);
  }
  
  .nav-link::after {
    background: var(--accent-bright);
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .btn-cta {
    display: none;
  }
  
  .nav-links .btn-cta {
    display: inline-block;
    margin-top: 1rem;
    width: 100%;
    max-width: 300px;
    text-align: center;
    font-size: 1.125rem;
    padding: 1rem 2rem;
  }
  
  /* Hero */
  .hero-section {
    min-height: 90vh;
  }
  
  .hero-cta {
    flex-direction: column;
    gap: var(--spacing-sm);
    width: 100%;
    align-items: center;
  }
  
  .hero-cta .btn {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }
  
  .scroll-indicator {
    bottom: 1rem;
  }
  
  /* Services */
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .fountain-types-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 100%;
    justify-items: center;
  }
  
  .fountain-type-card {
    width: 100%;
    max-width: 180px;
  }
  
  /* Service Area */
  .service-area-list {
    grid-template-columns: 1fr;
  }
  
  .map-container {
    height: 300px;
  }
  
  /* About */
  .about-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .company-stats {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  }
  
  .stat-number {
    font-size: 2.5rem;
  }
  
  /* Why Choose Us */
  .differentiators-grid {
    grid-template-columns: 1fr;
  }
  
  /* Forms */
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .quote-form,
  .contact-form {
    padding: var(--spacing-md);
  }
  
  /* Contact */
  .contact-content {
    grid-template-columns: 1fr;
  }
  
  .social-links {
    justify-content: center;
  }
  
  /* Footer */
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
  
  .footer-column:first-child {
    grid-column: 1;
  }
  
  .footer-social {
    justify-content: center;
  }
  
  /* Back to Top */
  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 45px;
    height: 45px;
  }
  
  /* Modals */
  .modal-content {
    padding: var(--spacing-md);
  }
  
  .modal-icon {
    width: 60px;
    height: 60px;
    font-size: 2rem;
  }
}

/* Small Mobile (480px and below) */
@media (max-width: 480px) {
  :root {
    --font-size-h1: 2rem;
    --font-size-h2: 1.75rem;
    --font-size-h3: 1.5rem;
    --font-size-h4: 1.25rem;
  }
  
  .nav-container {
    padding: 0.75rem var(--container-padding);
  }
  
  .logo-image {
    height: 70px;
  }
  
  .navbar.scrolled .logo-image {
    height: 60px;
  }
  
  /* Mobile menu adjustments for small screens */
  .nav-links {
    gap: clamp(1rem, 3vh, 2rem);
    padding: 1.5rem;
  }
  
  .nav-link {
    font-size: clamp(1.125rem, 4.5vw, 1.5rem);
    padding: 0.625rem 0.75rem;
  }
  
  .nav-links .btn-cta {
    font-size: 1rem;
    padding: 0.875rem 1.5rem;
  }
  
  .nav-logo a {
    font-size: 1rem;
  }
  
  .logo-placeholder i {
    font-size: 1.5rem;
  }
  
  .logo-placeholder span {
    font-size: 0.9rem;
  }
  
  .hero-logo-image {
    max-width: 150px;
  }
  
  .hero-icon {
    font-size: 3rem;
  }
  
  .hero-subtitle-company {
    font-size: 1.5rem;
  }
  
  .hero-tagline {
    font-size: 1.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .btn-large {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }
  
  .service-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
  
  .fountain-types-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 100%;
    gap: var(--spacing-sm);
  }
  
  .fountain-type-card {
    width: 100%;
  }
  
  .service-area-list {
    padding-left: 0;
  }
  
  .company-stats {
    grid-template-columns: 1fr;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .team-photo-placeholder {
    width: 100px;
    height: 100px;
    font-size: 2.5rem;
  }
  
  .diff-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
  
  .radio-options {
    flex-direction: column;
    gap: var(--spacing-sm);
  }
  
  .radio-option {
    width: 100%;
  }
  
  .contact-item {
    flex-direction: column;
    text-align: center;
  }
  
  .social-media {
    text-align: center;
  }
  
  .modal-content {
    padding: var(--spacing-sm);
  }
}

/* Landscape Mobile (max-height: 500px) */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-section {
    min-height: auto;
    padding: 8rem 0 4rem;
  }
  
  .scroll-indicator {
    display: none;
  }
  
  .hero-icon {
    font-size: 2rem;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-tagline {
    font-size: 1.25rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: var(--spacing-md);
  }
  
  .hero-cta {
    margin-bottom: var(--spacing-md);
  }
}

/* Print Styles */
@media print {
  .navbar,
  .hero-section,
  .scroll-indicator,
  .back-to-top,
  .mobile-menu-toggle,
  .modal,
  form {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
  }
  
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
    color: #000;
  }
  
  a {
    text-decoration: underline;
    color: #000;
  }
  
  a[href^="http"]:after {
    content: " (" attr(href) ")";
  }
  
  section {
    page-break-inside: avoid;
  }
  
  .container {
    width: 100%;
    max-width: none;
    padding: 0;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  :root {
    --primary-dark: #000;
    --primary-medium: #000;
    --dark-gray: #000;
    --medium-gray: #666;
  }
  
  .btn {
    border-width: 3px;
  }
  
  .service-card,
  .fountain-type-card,
  .differentiator-card,
  .contact-item {
    border: 2px solid #000;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .scroll-indicator,
  .water-animation {
    display: none;
  }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
  /* Uncomment to enable dark mode */
  /*
  :root {
    --white: #1a1a1a;
    --off-white: #2a2a2a;
    --light-gray: #3a3a3a;
    --medium-gray: #9a9a9a;
    --dark-gray: #e0e0e0;
    --charcoal: #f0f0f0;
  }
  
  body {
    background-color: #1a1a1a;
    color: #e0e0e0;
  }
  */
}

/* Large Desktop (1440px and up) */
@media (min-width: 1440px) {
  :root {
    --container-max: 1400px;
    --spacing-xl: 8rem;
  }
  
  .hero-section {
    min-height: 100vh;
  }
  
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .fountain-types-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .differentiators-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
