/* Mobile First Responsive Design */

/* Extra Small devices (phones, 576px and down) */
@media (max-width: 575.98px) {
  :root {
    --font-size-h1: 1.5rem;
    --font-size-h2: 1.375rem;
    --font-size-h3: 1.25rem;
    --font-size-h4: 1.125rem;
    --font-size-h5: 1rem;
    --font-size-h6: 0.875rem;
    --section-padding: 2rem 0;
    --container-padding: 1rem;
  }
  
  .navbar-brand {
    font-size: 1rem !important;
  }
  
  .navbar-nav .nav-link {
    padding: 0.5rem 0;
    margin: 0;
  }
  
  .hero-section h1 {
    padding-top: 150px;
}

.hero-section {
    min-height: 70vh;
    text-align: center;
  }
  
  .hero-title {
    font-size: 1.62rem;
    margin-bottom: 0.89rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 1rem;
  }
  
  .hero-desc {
    font-size: 0.93rem;
    margin-bottom: 1.65rem;
  }
  
  .section-title {
    font-size: 1.44rem;
  }
  
  .section-subtitle {
    font-size: 0.82rem;
  }
  
  .section-desc {
    font-size: 0.92rem;
    margin-bottom: 2rem;
  }
  
  .feature-item {
    padding: 1.5rem 1rem;
    margin-bottom: 1.69rem;
  }
  
  .feature-item i {
    font-size: 2rem;
  }
  
  .service-card {
    padding: 1.5rem;
    margin-bottom: 1.64rem;
  }
  
  .service-card img {
    height: 150px;
  }
  
  .price-card {
    padding: 2rem 1.5rem;
    margin-bottom: 1.65rem;
  }
  
  .team-member img {
    width: 150px;
    height: 150px;
  }
  
  .review-card {
    padding: 1.5rem;
    margin-bottom: 2rem;
  }
  
  /* Fix overlapping reviews in mobile */
  .reviews-section .col-12 {
    margin-bottom: 2rem;
  }
  
  .reviews-section .col-lg-6 {
    margin-bottom: 2rem;
  }
  
  .reviews-section .row {
    margin-left: -0.75rem;
    margin-right: -0.75rem;
  }
  
  .reviews-section .col-lg-6,
  .reviews-section .col-12 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    clear: both;
  }
  
  .process-item {
    padding: 1.5rem 1rem;
    margin-bottom: 1.69rem;
  }
  
  .contact-form {
    padding: 2rem 1.5rem;
  }
  
  .contact-info {
    padding: 1.5rem;
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .gallery-item img {
    height: 200px;
  }
  
  .footer {
    padding: 2rem 0 1rem;
  }
  
  .breadcrumb-image {
    max-width: 60px;
  }
  
  .btn-gradient {
    padding: 0.6rem 1.25rem;
    font-size: 0.99rem;
  }
  
  /* Prevent content overflow */
  .container {
    overflow-x: hidden;
  }
  
  /* Better navbar toggler positioning */
  .navbar-toggler {
    margin-right: 0 !important;
    border: 2px solid rgba(255,255,255,0.3) !important;
    border-radius: 6px !important;
  }
  
  .navbar-toggler:focus {
    border-color: rgba(255,255,255,0.5) !important;
  }
  
  /* Additional mobile fixes for review section */
  .reviews-section .review-card {
    clear: both !important;
    float: none !important;
    display: block !important;
    width: 100% !important;
    margin-bottom: 2.5rem !important;
  }
  
  .reviews-section .col-12 .review-card {
    margin-bottom: 3rem !important;
  }
  
  /* Ensure proper spacing between review cards */
  .reviews-section .row > div {
    margin-bottom: 2rem;
  }
  
  /* Fix navbar brand text overflow */
  .navbar-brand {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  /* Better hero section spacing */
  .hero-content {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* Ensure images don't overflow */
  img {
    max-width: 100%;
    height: auto;
  }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
  :root {
    --font-size-h1: 1.625rem;
    --font-size-h2: 1.5rem;
    --font-size-h3: 1.375rem;
    --section-padding: 3rem 0;
  }
  
  .hero-section h1 {
    padding-top: 150px;
}

.hero-section {
    min-height: 80vh;
  }
  
  .hero-title {
    font-size: 1.71rem;
  }
  
  .hero-subtitle {
    font-size: 1.18rem;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .gallery-item img {
    height: 220px;
  }
  
  .team-member img {
    width: 175px;
    height: 175px;
  }
  
  .breadcrumb-image {
    max-width: 80px;
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .navbar-toggler {
    display: none;
  }
  
  .hero-section h1 {
    padding-top: 150px;
}

.hero-section {
    min-height: 90vh;
  }
  
  .hero-title {
    font-size: 1.85rem;
  }
  
  .hero-subtitle {
    font-size: 1.30rem;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .gallery-item img {
    height: 230px;
  }
  
  .service-card {
    margin-bottom: 2rem;
  }
  
  .team-member img {
    width: 180px;
    height: 180px;
  }
  
  .contact-form {
    margin-bottom: 2rem;
  }
  
  .breadcrumb-image {
    max-width: 90px;
  }
  
  /* Fix for testimonial slider positioning */
  .review-card.active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .review-card:not(.active) {
    display: none !important;
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .hero-section h1 {
    padding-top: 150px;
}

.hero-section {
    min-height: 100vh;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .gallery-item img {
    height: 240px;
  }
  
  .team-member img {
    width: 190px;
    height: 190px;
  }
  
  .feature-item:hover {
    transform: translateY(-8px);
  }
  
  .service-card:hover {
    transform: translateY(-10px);
  }
  
  .breadcrumb-image {
    max-width: 95px;
  }
}

/* Extra Large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  .gallery-grid {
    grid-template-columns: repeat(5, 1fr);
  }
  
  .gallery-item img {
    height: 250px;
  }
  
  .team-member img {
    width: 200px;
    height: 200px;
  }
  
  .hero-title {
    font-size: 1.93rem;
  }
  
  .hero-subtitle {
    font-size: 1.48rem;
  }
  
  .section-title {
    font-size: 1.71rem;
  }
  
  .breadcrumb-image {
    max-width: 100px;
  }
}

/* Ultra Wide screens (1400px and up) */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1.60rem;
  }
  
  .section-title {
    font-size: 1.86rem;
  }
}

/* Portrait orientation specific styles */
@media (orientation: portrait) {
  .hero-section h1 {
    padding-top: 150px;
}

.hero-section {
    min-height: 60vh;
  }
  
  .gallery-item img {
    height: 180px;
  }
}

/* Landscape orientation specific styles */
@media (orientation: landscape) and (max-height: 500px) {
  .hero-section h1 {
    padding-top: 150px;
}

.hero-section {
    min-height: 100vh;
    padding: 2rem 0;
  }
  
  .hero-title {
    font-size: 1.55rem;
    margin-bottom: 0.70rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 1rem;
  }
  
  .hero-desc {
    font-size: 1.01rem;
    margin-bottom: 1rem;
  }
}

/* High DPI / Retina displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .hero-section::before {
    background-image: url('../SIB_images/hero-bg@2x.webp');
  }
}

/* Print styles */
@media print {
  .navbar,
  .footer,
  .contact-form,
  .breadcrumb-section {
    display: none;
  }
  
  .section {
    page-break-inside: avoid;
    padding: 1rem 0;
  }
  
  .hero-section h1 {
    padding-top: 150px;
}

.hero-section {
    min-height: auto;
    background: none;
    color: black;
  }
  
  .hero-section::before {
    display: none;
  }
  
  * {
    box-shadow: none !important;
    background: white !important;
    color: black !important;
  }
}

/* Dark mode support (for future use) */
@media (prefers-color-scheme: dark) {
  /* Dark mode styles can be added here if needed */
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .hero-section::before {
    animation: none;
  }
  
  .feature-item:hover,
  .service-card:hover,
  .price-card:hover,
  .team-member:hover img,
  .gallery-item:hover {
    transform: none;
  }
  
  .btn-gradient:hover,
  .btn-submit:hover {
    transform: none;
  }
  
  .fade-in,
  .slide-up {
    opacity: 1;
    transform: none;
  }
}

/* Focus styles for accessibility */
@media (prefers-reduced-motion: no-preference) {
  .nav-link:focus,
  .btn-gradient:focus,
  .btn-submit:focus,
  .form-control:focus {
    outline: 2px solid var(--color-tertiary);
    outline-offset: 2px;
  }
}

/* Container adjustments for different screen sizes */
@media (max-width: 575.98px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

@media (min-width: 576px) and (max-width: 767.98px) {
  .container {
    max-width: 540px;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .container {
    max-width: 720px;
  }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  .container {
    max-width: 960px;
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
}

/* Flexbox adjustments for different screen sizes */
@media (max-width: 767.98px) {
  .row {
    margin-left: -0.75rem;
    margin-right: -0.75rem;
  }
  
  .col,
  [class*="col-"] {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

/* Navigation adjustments */
@media (max-width: 991.98px) {
  .navbar-toggler {
    margin-right: 0;
    padding: 0.25rem 0.5rem;
    position: relative;
    z-index: 1001;
  }
  
  .navbar-collapse {
    background: rgba(0,0,0,0.1);
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
  }
  
  .navbar-nav {
    text-align: center;
  }
  
  .navbar-nav .nav-link {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  
  .navbar-nav .nav-link:last-child {
    border-bottom: none;
  }
} 