/* ======================================================================
   CandleCraft - Responsive CSS
   Mobile-First Design with Bootstrap 5 Breakpoints
   ====================================================================== */

/* ======================================================================
   Mobile First Base Styles (up to 575px)
   ====================================================================== */

/* Typography Adjustments for Mobile */
@media (max-width: 575.98px) {
    h1 { font-size: 2.02rem; }
    h2 { font-size: 1.53rem; }
    h3 { font-size: 1.29rem; }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1rem;
    }
}

/* Hero Section Mobile */
@media (max-width: 575.98px) {
    #hero {
        min-height: 80vh;
        padding: 2rem 0;
    }
    
    #hero h1 {
        font-size: 1.85rem;
        margin-bottom: 1rem;
    }
    
    #hero h2 {
        font-size: 1.21rem;
        margin-bottom: 1rem;
    }
    
    #hero .btn-lg {
        padding: 0.5rem 1.5rem;
        font-size: 1rem;
    }
    
    /* SAL.js disabled - all animations removed */
    * {
        transform: none !important;
        opacity: 1 !important;
        animation: none !important;
        transition: none !important;
        visibility: visible !important;
    }
}

/* Navigation Mobile */
@media (max-width: 575.98px) {
    .navbar-brand {
        font-size: 1.36rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
}

/* Sections Mobile */
@media (max-width: 575.98px) {
    section {
        padding: 3rem 0;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Cards Mobile */
@media (max-width: 575.98px) {
    .card {
        margin-bottom: 1.72rem;
    }
    
    .card-body {
        padding: 1.25rem;
    overflow-x: hidden;
}
    
    .card-img-top {
        height: 180px;
    }
}

/* Team Section Mobile */
@media (max-width: 575.98px) {
    #team img {
        width: 120px;
        height: 120px;
        margin-bottom: 1rem;
    }
}

/* Gallery Mobile */
@media (max-width: 575.98px) {
    #gallery .col-md-4 {
        margin-bottom: 1rem;
    }
}

/* Contact Form Mobile */
@media (max-width: 575.98px) {
    #contacts .form-control {
        padding: 0.625rem;
        font-size: 1rem;
    }
    
    #contacts .btn-lg {
        padding: 0.625rem 1.5rem;
        font-size: 1rem;
        width: 100%;
    }
}

/* ======================================================================
   Small Devices (landscape phones, 576px and up)
   ====================================================================== */

@media (min-width: 576px) and (max-width: 767.98px) {
    #hero {
        min-height: 85vh;
    }
    
    #hero h1 {
        font-size: 2rem;
    }
    
    section {
        padding: 4rem 0;
    }
    
    .card-img-top {
        height: 190px;
    }
}

/* ======================================================================
   Medium Devices (tablets, 768px and up)
   ====================================================================== */

@media (min-width: 768px) and (max-width: 991.98px) {
    #hero {
        min-height: 90vh;
    }
    
    #hero h1 {
        font-size: 2.25rem;
    }
    
    section {
        padding: 4.5rem 0;
    }
    
    .card-img-top {
        height: 195px;
    }
    
    /* Services Grid Adjustment */
    #services .col-md-6:nth-child(odd) {
        padding-right: 0.75rem;
    }
    
    #services .col-md-6:nth-child(even) {
        padding-left: 0.75rem;
    }
}

/* ======================================================================
   Large Devices (desktops, 992px and up)
   ====================================================================== */

@media (min-width: 992px) and (max-width: 1199.98px) {
    #hero {
        min-height: 95vh;
    }
    
    section {
        padding: 5rem 0;
    }
    
    .card-img-top {
        height: 200px;
    }
    
    /* Optimize 3-column layouts */
    #services .col-lg-4,
    #team .col-lg-4,
    #priceplan .col-lg-4 {
        margin-bottom: 2rem;
    }
}

/* ======================================================================
   Extra Large Devices (large desktops, 1200px and up)
   ====================================================================== */

@media (min-width: 1200px) {
    #hero {
        min-height: 100vh;
    }
    
    section {
        padding: 6rem 0;
    }
    
    .container {
        max-width: 1140px;
    }
    
    .card-img-top {
        height: 220px;
    }
    
    /* Enhanced spacing for large screens */
    #hero .btn-lg {
        padding: 1rem 2.5rem;
        font-size: 1.19rem;
    }
    
    /* Team images larger on desktop */
    #team img {
        width: 180px;
        height: 180px;
    }
}

/* ======================================================================
   Print Styles
   ====================================================================== */

@media print {
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    a,
    a:visited {
        text-decoration: underline;
    }
    
    .container {
        width: auto;
        margin: 0;
        padding: 0;
    }
    
    .row {
        margin: 0;
    }
    
    .col-lg-12,
    .col-lg-11,
    .col-lg-10,
    .col-lg-9,
    .col-lg-8,
    .col-lg-7,
    .col-lg-6,
    .col-lg-5,
    .col-lg-4,
    .col-lg-3,
    .col-lg-2,
    .col-lg-1 {
        width: 100%;
        float: none;
    }
    
    .btn {
        border: 1px solid black;
        background: transparent;
        color: black;
    }
}

/* ======================================================================
   Accessibility Enhancements
   ====================================================================== */

/* Focus styles for keyboard navigation */
@media (min-width: 768px) {
    .btn:focus,
    .nav-link:focus,
    .form-control:focus {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #04007c;
        --text-dark: #000000;
        --text-light: #201f1f;
        --border-color: #000000;
    }
    
    .card {
        border: 2px solid #000000;
    }
}

/* ======================================================================
   Performance Optimizations
   ====================================================================== */

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    /* Disable all animations on mobile */
    @media (max-width: 767.98px) {
        *,
        *::before,
        *::after {
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01ms !important;
            scroll-behavior: auto !important;
        }
        
        * {
            transform: none !important;
            opacity: 1 !important;
            animation: none !important;
            transition: none !important;
            visibility: visible !important;
        }
    }
}

/* Optimize images for different screen densities */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .card-img-top,
    #hero img,
    #gallery img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: optimize-contrast;
    }
}

/* ======================================================================
   Layout Fixes for Edge Cases
   ====================================================================== */

/* Fix Bootstrap gaps on mobile */
@media (max-width: 575.98px) {
    .row {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }
    
    .col,
    .col-1, .col-2, .col-3, .col-4, .col-5, .col-6,
    .col-7, .col-8, .col-9, .col-10, .col-11, .col-12,
    .col-auto,
    .col-sm, .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6,
    .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12,
    .col-sm-auto {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

/* Ensure proper card heights across breakpoints */
@media (min-width: 768px) {
    .card-columns {
        column-count: 2;
    }
}

@media (min-width: 992px) {
    .card-columns {
        column-count: 3;
    }
}

/* Footer responsive adjustments */
@media (max-width: 767.98px) {
    #footer .col-lg-4 {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    #footer .col-md-6 {
        text-align: center;
    }
} 