/* Responsive CSS for Sustainable Building Materials Template */

/* Extra Large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  .container { max-width: 1140px; }
  .hero-title { font-size: 3.58rem; }
  .section-title { font-size: 3rem; }
}

/* Large devices (desktops, 992px and up) */
@media (max-width: 1199.98px) {
  .hero-title { font-size: 3rem; }
  .section-title { font-size: 2.63rem; }
  .service-card { padding: 1.5rem; }
}

/* Medium devices (tablets, 768px and up) */
@media (max-width: 991.98px) {
  .hero-title { font-size: 2.64rem; }
  .hero-subtitle { font-size: 1.11rem; }
  .section { padding: 3rem 0; }
  .section-title { font-size: 2rem; }
  .navbar-nav { text-align: center; }
  .navbar-collapse { padding-top: 1rem; }
  
  .team-photo { width: 150px; height: 150px; }
  .contact-form { padding: 2rem; }
  .gallery-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
  
  .hero-section::before {
    background-attachment: scroll;
  }
}

/* Small devices (landscape phones, 576px and up) */
@media (max-width: 767.98px) {
  .hero-title { font-size: 2rem; }
  .hero-subtitle { font-size: 1rem; }
  .hero-desc { font-size: 0.98rem; }
  .section { padding: 2rem 0; }
  .section-title { font-size: 1.80rem; }
  .section-subtitle { font-size: 1.18rem; }
  .section-desc { font-size: 1rem; }
  
  .navbar-brand { font-size: 1.44rem; }
  .service-card { padding: 1rem; }
  .service-card .service-icon { font-size: 2.59rem; }
  .service-price { font-size: 1.62rem; }
  
  .team-photo { width: 120px; height: 120px; }
  .team-name { font-size: 1.24rem; }
  
  .review-card { padding: 1.5rem; }
  .review-card::before { font-size: 3rem; top: -5px; left: 15px; }
  .review-text { padding-left: 1.5rem; }
  
  .contact-form { padding: 1.5rem; }
  .faq-question { padding: 1rem; }
  .faq-answer { padding: 1rem; }
  
  .gallery-grid { 
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .gallery-item img { height: 200px; }
  
  .custom-card .card-body { padding: 1.5rem; }
  .footer { padding: 2rem 0 1rem; }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
  .hero-title { font-size: 1.77rem; }
  .hero-subtitle { font-size: 1.04rem; }
  .hero-desc { font-size: 1.04rem; }
  .section-title { font-size: 1.60rem; }
  .section-subtitle { font-size: 1rem; }
  
  .navbar-brand { font-size: 1.31rem; }
  .service-card .service-icon { font-size: 2rem; }
  .service-price { font-size: 1.42rem; }
  
  .team-photo { width: 100px; height: 100px; }
  
  .review-card { padding: 1rem; }
  .review-card::before { font-size: 2.63rem; }
  .review-text { padding-left: 1rem; }
  
  .contact-form { padding: 1rem; }
  .btn-primary { padding: 0.75rem 1.5rem; }
  
  .gallery-item img { height: 180px; }
  .custom-card .card-body { padding: 1rem; }
}

/* Landscape orientation optimizations */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-section h1 {
    padding-top: 150px;
}

.hero-section { min-height: 70vh; }
  .hero-title { font-size: 2rem; }
  .hero-subtitle { font-size: 1rem; }
  .section { padding: 2rem 0; }
}

/* Print styles */
@media print {
  .navbar, .footer, .breadcrumb-nav { display: none; }
  .hero-section h1 {
    padding-top: 150px;
}

.hero-section { min-height: auto; page-break-after: always; }
  .section { padding: 2rem 0; page-break-inside: avoid; }
  * { box-shadow: none !important; }
  body { font-size: 12pt; line-height: 1.4; }
}

/* Timeline responsive styles */
@media (max-width: 767.98px) {
  .timeline::before {
    left: 20px;
    transform: none;
  }
  
  .timeline-item {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) {
    flex-direction: column;
  }
  
  .timeline-item:nth-child(odd) .timeline-content,
  .timeline-item:nth-child(even) .timeline-content {
    text-align: left;
    margin-left: 3rem;
    margin-right: 0;
    max-width: calc(100% - 3rem);
  }
  
  .timeline-content::before {
    display: none;
  }
  
  .timeline-item::after {
    left: 20px;
    transform: translate(-50%, -50%);
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --primary-green: #000000;
    --text-primary: #000000;
    --text-secondary: #000000;
    --bg-white: #FFFFFF;
  }
  
  .custom-card, .faq-item, .review-card, .contact-form {
    border: 2px solid #000000;
  }
}
