/* ===== RESPONSIVE DESIGN ===== */

/* Extra Small devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    /* Typography */
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.77rem;
    }
    
    h3 {
        font-size: 1.40rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    /* Hero Section */
    #hero {
        padding: 2rem 0;
        min-height: 80vh;
    }
    
    #hero h1 {
        font-size: 2.33rem;
        margin-bottom: 1rem;
    }
    
    #hero h2 {
        font-size: 1.63rem;
        margin-bottom: 1rem;
    }
    
    /* Navigation */
    .navbar-brand {
        font-size: 1.39rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 0;
        margin: 0;
        text-align: center;
    }
    
    /* Buttons */
    .btn-lg {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
    
    /* Cards */
    .card-body {
        padding: 1.5rem;
    overflow-x: hidden;
}
    
    .card-img-top {
        height: 180px;
    }
    
    /* Sections */
    section {
        padding: 3rem 0;
    }
    
    /* Forms */
    .form-control {
        padding: 0.625rem 0.875rem;
    }
    
    /* Disable animations on mobile for better performance */
    .card:hover {
        transform: none;
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    }
    
    .card:hover .card-img-top {
        transform: none;
    }
    
    #gallery img:hover {
        transform: none;
        filter: none;
    }
    
    /* Mobile-specific animations disable */
    [data-sal] {
        animation: none !important;
        transition: none !important;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* Hero adjustments */
    #hero h1 {
        font-size: 2.55rem;
    }
    
    #hero h2 {
        font-size: 1.79rem;
    }
    
    /* Card improvements */
    .card-img-top {
        height: 200px;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Hero section */
    #hero h1 {
        font-size: 2.82rem;
    }
    
    /* Navigation spacing */
    .navbar-nav .nav-link {
        margin: 0 0.25rem;
    }
    
    /* Cards in grid */
    .card-img-top {
        height: 220px;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    /* Hero section full experience */
    #hero h1 {
        font-size: 3rem;
    }
    
    #hero h2 {
        font-size: 2rem;
    }
    
    /* Enhanced hover effects for desktop */
    .btn-primary:hover {
        transform: translateY(-2px);
    }
    
    /* Navigation full spacing */
    .navbar-nav .nav-link {
        margin: 0 0.5rem;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    /* Enhanced typography for large screens */
    h1 {
        font-size: 2.80rem;
    }
    
    h2 {
        font-size: 2.36rem;
    }
    
    .lead {
        font-size: 1.24rem;
    }
    
    /* Hero enhancements */
    #hero h1 {
        font-size: 3.53rem;
    }
    
    #hero h2 {
        font-size: 2.38rem;
    }
    
    /* Larger containers for more content */
    .card-body {
        padding: 2.5rem;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    /* Hide navigation and interactive elements */
    .navbar,
    .btn,
    #footer {
        display: none !important;
    }
    
    /* Optimize text for print */
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: #000;
        page-break-after: avoid;
    }
    
    /* Remove background colors and shadows */
    * {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    /* Optimize images */
    img {
        max-width: 100% !important;
    }
    
    /* Page breaks */
    section {
        page-break-inside: avoid;
    }
}

/* ===== LANDSCAPE ORIENTATION ===== */
@media (orientation: landscape) and (max-height: 600px) {
    /* Reduce hero height in landscape on mobile */
    #hero {
        min-height: 70vh;
    }
    
    #hero h1 {
        font-size: 2rem;
        margin-bottom: 0.92rem;
    }
    
    #hero h2 {
        font-size: 1.62rem;
        margin-bottom: 0.85rem;
    }
    
    section {
        padding: 2rem 0;
    }
}

/* ===== HIGH DPI DISPLAYS ===== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize for retina displays */
    .card {
        box-shadow: 0 2.7px 7.5px rgba(0, 0, 0, 0.08);
    }
    
    .card:hover {
        box-shadow: 0 5px 12.5px rgba(0, 0, 0, 0.15);
    }
    
    .navbar {
        box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
    }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
@media (prefers-reduced-motion: reduce) {
    /* Disable all animations for users who prefer reduced motion */
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    /* Remove hover transforms */
    .card:hover,
    .btn-primary:hover,
    .card:hover .card-img-top,
    #gallery img:hover {
        transform: none !important;
    }
}

/* ===== DARK MODE SUPPORT ===== */

/* ===== CONTAINER ADJUSTMENTS ===== */
@media (max-width: 575.98px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* ===== GRID SYSTEM RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 767.98px) {
    /* Stack cards vertically on mobile */
    .row > [class*="col-md-6"] {
        margin-bottom: 2rem;
    }
    
    .row > [class*="col-lg-4"] {
        margin-bottom: 2rem;
    }
    
    .row > [class*="col-lg-3"] {
        margin-bottom: 1.63rem;
    }
}

/* ===== FORM RESPONSIVENESS ===== */
@media (max-width: 575.98px) {
    .form-control,
    .btn {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .btn-lg {
        width: 100%;
        margin-top: 1rem;
    }
}

/* ===== FOOTER RESPONSIVE ===== */
@media (max-width: 767.98px) {
    #footer .col-md-4 {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    #footer h5 {
        margin-bottom: 1rem;
    }
} 