/* Responsive Design - Mobile First Approach */

/* Extra Small Devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    :root {
        --font-size-h1: 1.75rem;
        --font-size-h2: 1.5rem;
        --font-size-h3: 1.25rem;
        --spacing-xl: 2rem;
        --spacing-xxl: 3rem;
    }
    
    .hero-section h1 {
        font-size: 2.61rem;
    }
    
    .hero-section p {
        font-size: 1.34rem;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .section {
        padding: 2rem 0;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .navbar-brand {
        font-size: 1.34rem !important;
    }
    
    .service-price {
        font-size: 1.52rem;
    }
    
    .team-photo {
        width: 120px;
        height: 120px;
    }
    
    .hero-shape-1,
    .hero-shape-2 {
        display: none;
    }
    
    .testimonial-card {
        padding: 1.5rem;
    }
    
    .process-step {
        padding-left: 2.5rem;
    }
    
    .process-step::before {
        width: 30px;
        height: 30px;
        font-size: 0.92rem;
    }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .hero-section h1 {
        font-size: 3.06rem;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .team-photo {
        width: 130px;
        height: 130px;
    }
    
    .hero-shape-1 {
        width: 120px;
        height: 120px;
    }
    
    .hero-shape-2 {
        width: 100px;
        height: 100px;
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-section h1 {
        font-size: 3.38rem;
    }
    
    .gallery-item img {
        height: 200px;
    }
    
    .team-photo {
        width: 140px;
        height: 140px;
    }
    
    .hero-shape-1 {
        width: 150px;
        height: 150px;
    }
    
    .hero-shape-2 {
        width: 120px;
        height: 120px;
    }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .hero-section h1 {
        font-size: 3.60rem;
    }
    
    .gallery-item img {
        height: 220px;
    }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .hero-section h1 {
        font-size: 4.07rem;
    }
    
    .container {
        max-width: 1140px;
    }
    
    .gallery-item img {
        height: 250px;
    }
}

/* Mobile-specific adjustments for Swiper */
@media (max-width: 767.98px) {
    .swiper {
        /* Disable autoplay and effects on mobile */
        --swiper-autoplay: 0;
    }
    
    .swiper-slide {
        /* Ensure proper touch handling */
        touch-action: pan-y;
    }
    
    .swiper-pagination {
        bottom: 10px !important;
    }
    
    .swiper-button-next,
    .swiper-button-prev {
        display: none;
    }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 1024px) {
    .navbar-collapse {
        background-color: rgba(38, 66, 44, 0.95);
        margin-top: 1.12rem;
        padding: 1rem;
        border-radius: var(--border-radius);
    }
    
    .hero-section {
  padding-top: 50px;
        min-height: 80vh;
    }
    
    .section-header {
        margin-bottom: 2.57rem;
    }
}

/* Navigation responsive behavior */
@media (max-width: 991.98px) {
    .navbar-expand-lg .navbar-nav {
        margin-top: 1.12rem;
    }
    
    .navbar-expand-lg .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .navbar-expand-lg .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
}

/* Print styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .hero-shape-1,
    .hero-shape-2 {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: #fff;
    }
    
    .hero-section {
  padding-top: 50px;
        min-height: auto;
        padding: 2rem 0;
        background: #fff !important;
        color: #000 !important;
    }
    
    .section {
        padding: 1rem 0;
        page-break-inside: avoid;
    }
    
    .card {
        border: 1px solid #b4aaa9;
        box-shadow: none;
        page-break-inside: avoid;
    }
    
    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 10pt;
        color: #5c5c5c;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-forest: #000;
        --primary-sage: #272524;
        --primary-warm: #757575;
        --white: #fff;
        --gray: #000;
        --dark-gray: #000;
    }
    
    .card {
        border: 2px solid #000;
    }
    
    .btn {
        border: 2px solid #000;
    }
    
    .form-control {
        border: 2px solid #000;
    }
}

/* Focus management for keyboard navigation */
@media (max-width: 767.98px) {
    .navbar-toggler:focus {
        outline: 2px solid var(--primary-warm);
        outline-offset: 2px;
    }
    
    .nav-link:focus {
        background-color: rgba(255, 255, 255, 0.2);
        outline: 2px solid var(--primary-warm);
        outline-offset: 2px;
    }
}

/* Landscape phone orientation */
@media (max-width: 767.98px) and (orientation: landscape) {
    .hero-section {
  padding-top: 50px;
        min-height: 100vh;
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 2.05rem;
    }
    
    .hero-section p {
        font-size: 1.06rem;
        margin-bottom: 1.66rem;
    }
}

/* Grid adjustments for different screen sizes */
@media (max-width: 575.98px) {
    .row > * {
        margin-bottom: 1.20rem;
    }
    
    .col-md-6,
    .col-lg-4,
    .col-lg-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .col-lg-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .col-lg-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Card adjustments */
@media (max-width: 767.98px) {
    .card-img-top {
        height: 150px;
    }
    
    .service-card {
        margin-bottom: 1.66rem;
    }
    
    .team-card {
        margin-bottom: 2.16rem;
    }
}

/* Form adjustments */
@media (max-width: 575.98px) {
    .form-control {
        padding: 0.75rem;
        font-size: 18.00px; /* Prevents zoom on iOS */
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        width: 100%;
    }
}

/* Gallery responsive behavior */
@media (max-width: 767.98px) {
    .gallery-item {
        margin-bottom: 1.20rem;
    }
    
    .gallery-item img {
        height: 200px;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .gallery-item img {
        height: 180px;
    }
}

/* FAQ responsive adjustments */
@media (max-width: 575.98px) {
    .faq-question {
        padding: 1rem;
        font-size: 1.03rem;
    }
    
    .faq-answer {
        padding: 1rem;
        font-size: 1.03rem;
    }
    
    .faq-question::after {
        right: 1rem;
        font-size: 1.34rem;
    }
}

/* Swiper specific responsive styles */
@media (min-width: 768px) {
    .swiper-button-next,
    .swiper-button-prev {
        color: var(--primary-warm);
    }
    
    .swiper-pagination-bullet-active {
        background-color: var(--primary-warm);
    }
}

/* Container max-widths for different breakpoints */
@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* Ensure proper spacing on all devices */
.section:first-of-type {
    padding-top: 0;
}

.section:last-of-type {
    padding-bottom: 0;
}

/* Accessibility improvements for mobile */
@media (max-width: 767.98px) {
    .btn,
    .nav-link,
    .card {
        min-height: 44px; /* iOS recommended touch target size */
    }
    
    .faq-question {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
} 