/* Responsive Styles for UrbanGreen Rooftop Template */

/* Mobile First Approach */

/* Enhanced Universal Image Responsive Rules */

/* Large Desktop - Fine-tuning */
@media (max-width: 1399.98px) {
    .hero-image img {
        min-height: 280px !important;
        max-height: 450px !important;
    }
    
    .gallery-item {
        height: 230px !important;
    }
}

/* Desktop - Standard adjustments */
@media (max-width: 1199.98px) {
    .hero-image img {
        min-height: 250px !important;
        max-height: 400px !important;
    }
    
    .service-card .card-img-top,
    .service-card img,
    .case-study-card .card-img-top,
    .case-study-card img {
        height: 190px !important;
    }
    
    .gallery-item {
        height: 220px !important;
    }
    
    .member-photo {
        width: 140px !important;
        height: 140px !important;
    }
}

/* Tablet - Responsive adjustments */
@media (max-width: 991.98px) {
    .hero-image img {
        min-height: 220px !important;
        max-height: 350px !important;
    }
    
    .service-card .card-img-top,
    .service-card img,
    .case-study-card .card-img-top,
    .case-study-card img {
        height: 180px !important;
    }
    
    .gallery-item {
        height: 210px !important;
    }
    
    .member-photo {
        width: 130px !important;
        height: 130px !important;
    }
}

/* Mobile Landscape */
@media (max-width: 767.98px) {
    .hero-image img {
        min-height: 200px !important;
        max-height: 300px !important;
    }
    
    .service-card .card-img-top,
    .service-card img,
    .case-study-card .card-img-top,
    .case-study-card img {
        height: 180px !important;
    }
    
    .gallery-item {
        height: 200px !important;
    }
    
    .gallery-item img {
        height: 100% !important;
        width: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
    }
    
    .member-photo {
        width: 120px !important;
        height: 120px !important;
    }
    
    /* Mobile specific container protection */
    .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    .row {
        margin-left: -15px !important;
        margin-right: -15px !important;
    }
    
    [class*="col-"] {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

/* Mobile Portrait */
@media (max-width: 575.98px) {
    .hero-image img {
        min-height: 180px !important;
        max-height: 250px !important;
    }
    
    .service-card .card-img-top,
    .service-card img,
    .case-study-card .card-img-top,
    .case-study-card img {
        height: 160px !important;
    }
    
    .gallery-item {
        height: 180px !important;
    }
    
    .gallery-item img {
        height: 100% !important;
        width: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
    }
    
    .member-photo {
        width: 100px !important;
        height: 100px !important;
    }
    
    /* Ensure all images are properly contained on small screens */
    .card-img-top {
        min-height: 140px !important;
        max-height: 180px !important;
        object-fit: cover !important;
        object-position: center !important;
    }
    
    /* Extra small mobile specific adjustments */
    .container {
        padding-left: 10px !important;
        padding-right: 10px !important;
        max-width: 100% !important;
    }
    
    .row {
        margin-left: -10px !important;
        margin-right: -10px !important;
    }
    
    [class*="col-"] {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

/* Super Small Mobile devices (phones, 400px and down) */
@media (max-width: 400px) {
    .hero-image img {
        min-height: 150px !important;
        max-height: 200px !important;
    }
    
    .service-card .card-img-top,
    .service-card img,
    .case-study-card .card-img-top,
    .case-study-card img {
        height: 140px !important;
    }
    
    .gallery-item {
        height: 160px !important;
    }
    
    .member-photo {
        width: 80px !important;
        height: 80px !important;
    }
    
    .card-img-top {
        min-height: 120px !important;
        max-height: 150px !important;
    }
}

/* High DPI (Retina) Display Adjustments */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    img {
        image-rendering: -webkit-optimize-contrast !important;
        image-rendering: crisp-edges !important;
    }
    
    .img-fluid {
        image-rendering: -webkit-optimize-contrast !important;
        image-rendering: crisp-edges !important;
    }
}

/* Extra Small devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    body {
        padding-top: 70px;
    overflow-x: hidden;
}
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    .hero-section {
        min-height: 70vh;
        text-align: center;
    }
    
    .hero-section .display-4 {
        font-size: 1.8rem;
    }
    
    .hero-buttons {
        text-align: center;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    /* Disable animations on mobile per requirements */
    .feature-card:hover,
    .service-card:hover,
    .team-member:hover,
    .review-card:hover,
    .process-step:hover,
    .faq-card:hover,
    .expertise-card:hover,
    .capability-card:hover,
    .plant-category:hover,
    .maintenance-plan:hover,
    .benefit-card:hover {
        transform: none;
    }
    
    .gallery-item:hover {
        transform: none;
    }
    
    .btn-success:hover,
    .btn-outline-success:hover {
        transform: none;
    }
    
    .contact-info .contact-item:hover {
        transform: none;
    }
    
    /* Stack service features properly */
    .service-features {
        margin-bottom: 1rem;
    }
    
    /* Team member adjustments - handled by universal rules above */
    
    /* Process steps in mobile */
    .process-step {
        margin-bottom: 2rem;
    }
    
    .step-number .badge {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    /* Timeline adjustments */
    .timeline {
        padding-left: 25px;
    }
    
    .timeline-marker {
        left: -32px;
        width: 12px;
        height: 12px;
    }
    
    /* Contact form improvements */
    .contact-form .btn {
        width: 100%;
    }
    
    /* Gallery grid - handled by universal rules above */
    
    /* Price card adjustments */
    .price-card .card-body {
        padding: 1.5rem 1rem;
    }
    
    /* Footer adjustments */
    .footer-section .row > div {
        margin-bottom: 2rem;
        text-align: center;
    }
    
    /* Hero decorative shapes - hide on mobile */
    .hero-decoration {
        display: none;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .hero-buttons .btn {
        display: inline-block;
        width: auto;
        margin: 0.25rem;
    }
    
    .member-photo {
        width: 130px;
        height: 130px;
    }
    
    /* Disable scroll animations on mobile */
    .feature-card:hover,
    .service-card:hover,
    .team-member:hover,
    .review-card:hover,
    .process-step:hover {
        transform: none;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-section .display-4 {
        font-size: 2.2rem;
    }
    
    .member-photo {
        width: 140px;
        height: 140px;
    }
    
    /* Tablet-specific adjustments */
    .service-card .card-img-top {
        height: 180px;
    }
    
    .gallery-item,
    .gallery-item img {
        height: 220px;
    }
    
    /* Process steps layout */
    .process-step {
        margin-bottom: 2rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .hero-section .display-4 {
        font-size: 2.5rem;
    }
    
    .member-photo {
        width: 150px;
        height: 150px;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .hero-section .display-4 {
        font-size: 2.8rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
}

/* Print styles */
@media print {
    .navbar,
    .hero-buttons,
    .btn,
    .contact-form,
    .footer-section {
        display: none;
    }
    
    body {
        padding-top: 0;
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .section-title,
    .section-subtitle {
        page-break-after: avoid;
    }
    
    .service-card,
    .review-card,
    .faq-card {
        page-break-inside: avoid;
        margin-bottom: 1rem;
    }
}

/* High DPI / Retina 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) {
    
    .navbar-brand,
    .section-title,
    .btn {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Landscape orientation adjustments */
@media screen and (orientation: landscape) and (max-height: 500px) {
    .hero-section {
        min-height: 90vh;
    }
    
    .navbar {
        padding: 0.5rem 0;
    }
}

/* Accessibility: High contrast mode */
@media (prefers-contrast: high) {
    .feature-card,
    .service-card,
    .price-card,
    .review-card,
    .faq-card {
        border: 2px solid;
    }
    
    .btn-outline-success {
        border-width: 2px;
    }
}

/* Accessibility: Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .hero-section,
    .feature-card,
    .service-card,
    .team-member,
    .review-card,
    .gallery-item,
    .btn,
    .contact-info .contact-item {
        transition: none;
    }
    
    .gallery-item:hover,
    .feature-card:hover,
    .service-card:hover,
    .team-member:hover,
    .review-card:hover,
    .btn:hover {
        transform: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Dark mode support */

/* Container breakpoint adjustments */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* Special mobile menu handling */
@media (max-width: 991.98px) {
    .navbar-collapse {
        margin-top: 1rem;
        padding: 1rem;
        background-color: rgba(255, 255, 255, 0.95);
        border-radius: 8px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
}

/* Form responsiveness */
@media (max-width: 767.98px) {
    .contact-form .row .col-md-6 {
        margin-bottom: 1rem;
    }
}

/* Gallery responsive grid */
@media (max-width: 575.98px) {
    .gallery-section .col-lg-4 {
        margin-bottom: 1rem;
    }
}

/* Service cards responsive layout */
@media (max-width: 767.98px) {
    .service-card .card-body {
        padding: 1rem;
    }
    
    .service-features {
        font-size: 0.9rem;
    }
}

/* Timeline responsive adjustments */
@media (max-width: 575.98px) {
    .timeline-content {
        font-size: 0.9rem;
    }
    
    .timeline-title {
        font-size: 1.1rem;
    }
}

/* Additional page responsive styles */
@media (max-width: 767.98px) {
    .expertise-card,
    .plant-category,
    .maintenance-plan,
    .benefit-card {
        margin-bottom: 1rem;
    }
    
    .philosophy-item,
    .component-item {
        flex-direction: column;
        text-align: center;
    }
    
    .philosophy-icon,
    .component-icon {
        margin-bottom: 1rem;
        margin-right: 0;
    }
    
    .metric-card {
        margin-bottom: 2rem;
    }
    
    .approach-step,
    .quality-item {
        margin-bottom: 2rem;
    }
} 

.hero-section h1 {
    padding-top: 225px;
}