/* ==========================================================================
   Tiny House Community Development - Responsive Stylesheet
   Mobile-First Approach
   ========================================================================== */

/* Extra Small Devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    /* Typography */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }
    h5 { font-size: 1.125rem; }
    h6 { font-size: 1rem; }
    
    /* Hero Section */
    .hero-section {
        padding: var(--spacing-lg) 0;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
        margin-bottom: var(--spacing-md);
    }
    
    .hero-section p {
        font-size: var(--font-size-base);
    }
    
    /* Navigation */
    .navbar-brand {
        font-size: 1.125rem !important;
    }
    
    .navbar-nav .nav-link {
        padding: var(--spacing-sm) var(--spacing-sm) !important;
    }
    
    /* Cards */
    .card {
        margin-bottom: var(--spacing-md);
    }
    
    .card-body {
        padding: var(--spacing-md);
    }
    
    /* Service Cards */
    .service-card .card-img-top {
        height: 150px;
    }
    
    /* Team Cards */
    .team-card .card-img-top {
        width: 100px;
        height: 100px;
    }
    
    /* Process Steps */
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    /* Contact Form */
    .contact-form {
        padding: var(--spacing-lg);
    }
    
    /* Gallery */
    .gallery-img {
        height: 150px;
        margin-bottom: var(--spacing-md);
    }
    
    /* Spacing */
    .py-5 {
        padding-top: var(--spacing-lg) !important;
        padding-bottom: var(--spacing-lg) !important;
    }
    
    /* Buttons */
    .btn {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: var(--font-size-sm);
    }
    
    .btn-lg {
        padding: var(--spacing-md) var(--spacing-lg);
        font-size: var(--font-size-base);
    }
    
    /* Image Sizes */
    .hero-section img {
        height: 250px;
        margin-top: var(--spacing-lg);
    }
    
    /* Pricing Cards */
    .pricing-card.featured {
        transform: none;
        margin-bottom: var(--spacing-md);
    }
    
    /* Footer */
    footer {
        padding: var(--spacing-lg) 0;
    }
    
    footer .col-lg-4 {
        margin-bottom: var(--spacing-lg);
    }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* Hero Section */
    .hero-section h1 {
        font-size: 2.75rem;
    }
    
    /* Team Cards */
    .team-card .card-img-top {
        width: 120px;
        height: 120px;
    }
    
    /* Gallery */
    .gallery-img {
        height: 170px;
    }
    
    /* Service Cards */
    .service-card .card-img-top {
        height: 160px;
    }
    
    /* Image Sizes */
    .hero-section img {
        height: 300px;
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Hero Section */
    .hero-section h1 {
        font-size: 3rem;
    }
    
    /* Cards Layout */
    .card {
        margin-bottom: var(--spacing-lg);
    }
    
    /* Team Cards */
    .team-card .card-img-top {
        width: 130px;
        height: 130px;
    }
    
    /* Gallery */
    .gallery-img {
        height: 180px;
    }
    
    /* Service Cards */
    .service-card .card-img-top {
        height: 170px;
    }
    
    /* Contact Form */
    .contact-form {
        padding: var(--spacing-xl);
    }
    
    /* Process Steps */
    .process-step {
        padding: var(--spacing-lg);
    }
    
    /* Image Sizes */
    .hero-section img {
        height: 350px;
    }
    
    /* Pricing Cards */
    .pricing-card.featured {
        transform: scale(1.02);
    }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* Hero Section */
    .hero-section h1 {
        font-size: 3.25rem;
    }
    
    /* Team Cards */
    .team-card .card-img-top {
        width: 140px;
        height: 140px;
    }
    
    /* Gallery */
    .gallery-img {
        height: 190px;
    }
    
    /* Service Cards */
    .service-card .card-img-top {
        height: 180px;
    }
    
    /* Image Sizes */
    .hero-section img {
        height: 380px;
    }
    
    /* Pricing Cards */
    .pricing-card.featured {
        transform: scale(1.03);
    }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    /* Hero Section */
    .hero-section h1 {
        font-size: 3.5rem;
    }
    
    /* Team Cards */
    .team-card .card-img-top {
        width: 150px;
        height: 150px;
    }
    
    /* Gallery */
    .gallery-img {
        height: 200px;
    }
    
    /* Service Cards */
    .service-card .card-img-top {
        height: 180px;
    }
    
    /* Image Sizes */
    .hero-section img {
        height: 400px;
    }
    
    /* Pricing Cards */
    .pricing-card.featured {
        transform: scale(1.05);
    }
    
    /* Container Max Width */
    .container {
        max-width: 1200px;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize images for high DPI displays */
    .hero-section img,
    .service-card img,
    .team-card img,
    .case-study-card img,
    .blog-card img,
    .gallery-img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: optimize-contrast;
    }
}

/* Portrait Orientation */
@media (orientation: portrait) {
    .hero-section {
        padding: var(--spacing-lg) 0;
    }
    
    .hero-section .row {
        flex-direction: column-reverse;
    }
    
    .hero-section img {
        margin-bottom: var(--spacing-lg);
    }
}

/* Landscape Orientation */
@media (orientation: landscape) and (max-height: 600px) {
    .hero-section {
        padding: var(--spacing-md) 0;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section .min-vh-100 {
        min-height: 80vh;
    }
    
    #space {
        min-height: 80vh;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .nav-link {
        padding: var(--spacing-md) var(--spacing-lg) !important;
    }
    
    .btn {
        padding: var(--spacing-md) var(--spacing-lg);
        font-size: var(--font-size-base);
    }
    
    /* Remove hover effects on touch devices */
    .card:hover {
        transform: none;
        box-shadow: var(--shadow-md);
    }
    
    .gallery-img:hover {
        transform: none;
    }
    
    .btn-primary:hover {
        transform: none;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .card,
    .gallery-img,
    .btn-primary,
    .process-step,
    .pricing-card {
        transition: none !important;
    }
    
    .fade-in,
    .slide-up {
        transition: none !important;
    }
    
    .hero-section,
    #space {
        scroll-behavior: auto !important;
    }
}

/* Dark Mode Support */

/* Print Styles */
@media print {
    /* Hide navigation and interactive elements */
    .navbar,
    .breadcrumb-container,
    footer,
    .btn,
    .contact-form {
        display: none !important;
    }
    
    /* Optimize for print layout */
    .hero-section,
    .py-5 {
        padding: var(--spacing-md) 0 !important;
    }
    
    .card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid var(--neutral-light-gray) !important;
    }
    
    .hero-section {
        background: var(--neutral-white) !important;
        color: var(--neutral-black) !important;
    }
    
    .hero-section h1,
    .hero-section p {
        color: var(--neutral-black) !important;
    }
    
    /* Typography for print */
    h1 { font-size: 24pt; }
    h2 { font-size: 20pt; }
    h3 { font-size: 18pt; }
    h4 { font-size: 16pt; }
    h5 { font-size: 14pt; }
    h6 { font-size: 12pt; }
    
    p { font-size: 12pt; }
    
    /* Page breaks */
    .hero-section,
    section {
        page-break-inside: avoid;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
}

/* Container Fluid Adjustments */
@media (max-width: 575.98px) {
    .container-fluid {
        padding-left: var(--spacing-md);
        padding-right: var(--spacing-md);
    }
}

/* Flexbox Utilities for Responsive Design */
.d-flex-responsive {
    display: flex;
    flex-wrap: wrap;
}

@media (max-width: 767.98px) {
    .d-flex-responsive {
        flex-direction: column;
    }
}

/* Responsive Spacing */
.py-responsive {
    padding-top: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
}

@media (min-width: 768px) {
    .py-responsive {
        padding-top: var(--spacing-xl);
        padding-bottom: var(--spacing-xl);
    }
}

/* Responsive Text Alignment */
.text-center-mobile {
    text-align: left;
}

@media (max-width: 767.98px) {
    .text-center-mobile {
        text-align: center;
    }
}

/* Responsive Margins */
.mb-responsive {
    margin-bottom: var(--spacing-md);
}

@media (min-width: 768px) {
    .mb-responsive {
        margin-bottom: var(--spacing-lg);
    }
}

/* Form Responsive Adjustments */
@media (max-width: 575.98px) {
    .contact-form .row .col-md-6 {
        margin-bottom: var(--spacing-sm);
    }
    
    .contact-form .form-control {
        padding: var(--spacing-sm);
    }
}

/* Accordion Responsive */
@media (max-width: 575.98px) {
    .accordion-button {
        padding: var(--spacing-md);
        font-size: var(--font-size-sm);
    }
    
    .accordion-body {
        padding: var(--spacing-md);
    }
}

/* Team Grid Responsive */
@media (max-width: 575.98px) {
    .team-card {
        margin-bottom: var(--spacing-md);
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .team-card .col-lg-2 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Services Grid Responsive */
@media (max-width: 575.98px) {
    .service-card {
        margin-bottom: var(--spacing-lg);
    }
}

/* Process Steps Responsive */
@media (max-width: 767.98px) {
    .process-step {
        margin-bottom: var(--spacing-lg);
    }
}

/* Timeline Responsive */
@media (max-width: 767.98px) {
    .timeline-item {
        margin-bottom: var(--spacing-lg);
    }
}

/* Gallery Responsive */
@media (max-width: 575.98px) {
    .gallery-img {
        margin-bottom: var(--spacing-md);
    }
}

/* FAQ Responsive */
@media (max-width: 575.98px) {
    .accordion {
        margin-bottom: var(--spacing-md);
    }
}

/* Blog Grid Responsive */
@media (max-width: 575.98px) {
    .blog-card {
        margin-bottom: var(--spacing-lg);
    }
} 