/* Mobile First Responsive Design */

/* Extra Small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    /* Typography adjustments for mobile */
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.3rem; }
    h4 { font-size: 1.2rem; }
    h5 { font-size: 1.1rem; }
    h6 { font-size: 1rem; }
    
    .display-4 { font-size: 2rem; }
    .lead { font-size: 1rem; }
    
    /* Navbar adjustments */
    .navbar-brand { font-size: 1.3rem; }
    
    /* Hero section mobile */
    .hero-section {
        min-height: 80vh;
        padding-top: 60px;
    }
    
    .hero-content {
        padding: 2rem 1rem !important;
        text-align: center;
    padding-top: 275px;
}
    
    .hero-image {
        padding: 1rem !important;
        margin-top: 2rem;
    }
    
    /* Button adjustments */
    .btn-lg {
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    /* Card adjustments */
    .card-img-top {
        height: 180px;
    }
    
    /* Gallery adjustments */
    #gallery .col-sm-6 {
        margin-bottom: 1rem;
    }
    
    /* Contact form */
    .form-control {
        padding: 10px 12px;
    }
    
    /* Team section */
    .team img {
        width: 100px;
        height: 100px;
    }
    
    /* Spacing adjustments */
    .py-5 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    .mb-5 {
        margin-bottom: 2rem !important;
    }
    
    /* Disable animations on mobile for performance */
    .card:hover {
        transform: none;
    }
    
    #gallery img:hover {
        transform: none;
    }
    
    .team img:hover {
        transform: none;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* Typography */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.7rem; }
    .display-4 { font-size: 2.2rem; }
    
    /* Hero section */
    .hero-section {
        min-height: 85vh;
    }
    
    .hero-content {
        padding: 3rem 2rem !important;
    padding-top: 275px;
}
    
    .hero-image {
        padding: 2rem !important;
    }
    
    /* Card adjustments */
    .card-img-top {
        height: 190px;
    }
    
    /* Team section */
    .team img {
        width: 110px;
        height: 110px;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Typography */
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    .display-4 { font-size: 2.5rem; }
    
    /* Hero section */
    .hero-section {
        min-height: 90vh;
    }
    
    .hero-content {
        padding: 3rem !important;
    padding-top: 275px;
}
    
    .hero-image {
        padding: 3rem !important;
    }
    
    /* Navigation */
    .navbar-nav .nav-link {
        padding: 0.5rem 1rem;
    }
    
    /* Cards */
    .card-img-top {
        height: 200px;
    }
    
    /* Team section */
    .team img {
        width: 115px;
        height: 115px;
    }
    
    /* Gallery grid adjustments */
    #gallery .col-md-4 {
        margin-bottom: 1rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* Hero section */
    .hero-section {
        min-height: 95vh;
    }
    
    /* Typography is optimal at this size */
    .display-4 { font-size: 2.8rem; }
    
    /* Team section */
    .team img {
        width: 120px;
        height: 120px;
    }
    
    /* Enhanced hover effects for larger screens */
    .card:hover {
        transform: translateY(-8px);
    }
    
    #gallery img:hover {
        transform: scale(1.03);
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    /* Hero section */
    .hero-section {
        min-height: 100vh;
    }
    
    /* Full typography scale */
    .display-4 { font-size: 3rem; }
    
    /* Enhanced spacing */
    .hero-content {
        padding: 4rem !important;
    padding-top: 275px;
}
    
    .hero-image {
        padding: 4rem !important;
    }
    
    /* Team section */
    .team img {
        width: 120px;
        height: 120px;
    }
    
    /* Enhanced effects */
    .card:hover {
        transform: translateY(-10px);
        box-shadow: 0 20px 40px rgba(139, 69, 19, 0.2);
    }
}

/* Landscape orientation adjustments */
@media screen and (orientation: landscape) and (max-height: 600px) {
    .hero-section {
        min-height: 100vh;
        padding-top: 60px;
    }
    
    .hero-content {
        padding: 2rem !important;
    padding-top: 275px;
}
    
    .hero-image {
        padding: 2rem !important;
    }
    
    /* Reduce vertical padding in landscape */
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
}

/* High DPI / Retina displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Ensure images remain crisp */
    .hero-image img,
    .card-img-top,
    #gallery img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link {
        padding: 1rem;
    }
    
    /* Remove hover effects on touch devices */
    .card:hover,
    #gallery img:hover,
    .team img:hover {
        transform: none;
        box-shadow: none;
    }
    
    /* Ensure form elements are touch-friendly */
    .form-control {
        min-height: 44px;
    }
}

/* Dark mode support */

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    /* Disable all animations and transitions */
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    /* Remove transforms */
    .card:hover,
    #gallery img:hover,
    .team img:hover {
        transform: none;
    }
}

/* Print media optimizations */
@media print {
    /* Hide interactive elements */
    .navbar,
    .btn,
    #footer,
    .breadcrumb {
        display: none !important;
    }
    
    /* Optimize for print */
    body {
        font-size: 12pt;
        line-height: 1.4;
    overflow-x: hidden;
}
    
    h1 { font-size: 18pt; }
    h2 { font-size: 16pt; }
    h3 { font-size: 14pt; }
    
    .hero-section {
        min-height: auto;
        page-break-after: always;
    }
    
    .card {
        border: 1pt solid #000;
        break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    /* Ensure good contrast for print */
    .text-primary {
        color: #000 !important;
    }
}

/* Container max-width adjustments for better content flow */
@media (min-width: 1400px) {
    .container {
        max-width: 1200px;
    }
}

/* Accessibility: Focus indicators */
@media (prefers-reduced-motion: no-preference) {
    .btn:focus,
    .nav-link:focus,
    .form-control:focus {
        transition: outline 0.2s ease;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid;
    }
    
    .btn {
        border-width: 2px;
    }
    
    .form-control {
        border-width: 2px;
    }
} 