/* ========================================
   Responsive CSS - Artisan Bread Bakers Hub
   Mobile-First Responsive Design
======================================== */

/* ========================================
   Base Mobile Styles (320px+)
======================================== */
@media (max-width: 575.98px) {
    /* Typography adjustments */
    .hero-title {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .section-subtitle {
        font-size: 1.125rem;
    }
    
    /* Hero section mobile */
    .hero-section {
        min-height: 80vh;
        text-align: center;
    }
    
    .hero-content {
        padding: 1rem 0;
    padding-top: 200px;
}
    
    .hero-cta .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
        margin-right: 0;
    }
    
    /* Navigation */
    .navbar-brand {
        font-size: 1.125rem !important;
    }
    
    /* Cards */
    .feature-card, .service-card, .team-card, .review-card,
    .case-card, .blog-card, .faq-card, .info-card {
        margin-bottom: 1rem;
        padding: 1rem;
    }
    
    /* Feature items */
    .feature-item {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    
    .feature-item .feature-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    /* Timeline mobile */
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        margin-left: 50px;
        margin-right: 0;
        padding-left: 1rem;
        padding-right: 1rem;
        text-align: left;
    }
    
    .timeline-item:nth-child(odd) .timeline-content::before,
    .timeline-item:nth-child(even) .timeline-content::before {
        left: -7.5px;
        right: auto;
    }
    
    /* Contact */
    .contact-item {
        flex-direction: column;
        text-align: center;
        margin-bottom: 1.5rem;
    }
    
    .contact-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    /* Process steps */
    .process-step {
        margin-bottom: 2rem;
    }
    
    /* Gallery */
    .gallery-image {
        height: 150px;
        margin-bottom: 0.5rem;
    }
    
    /* Sections */
    section {
        padding: 2rem 0;
    }
    
    /* Pricing cards */
    .pricing-card.featured {
        transform: none;
        margin-bottom: 2rem;
    }
    
    .pricing-card:hover,
    .pricing-card.featured:hover {
        transform: none;
    }
    
    /* Hide decorative shapes on mobile */
    .hero-shapes {
        display: none;
    }
    
    /* Footer */
    .footer-section {
        text-align: center;
    }
    
    .footer-section .col-lg-4 {
        margin-bottom: 2rem;
    }
}

/* ========================================
   Small Devices (576px - 767.98px)
======================================== */
@media (min-width: 576px) and (max-width: 767.98px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-cta .btn {
        display: inline-block;
        width: auto;
        margin-right: 1rem;
    }
    
    .feature-item {
        flex-direction: row;
        text-align: left;
    }
    
    .feature-item .feature-icon {
        margin-right: 1.5rem;
        margin-bottom: 0;
    }
    
    .gallery-image {
        height: 180px;
    }
    
    .contact-item {
        flex-direction: row;
        text-align: left;
    }
    
    .contact-icon {
        margin-right: 1.5rem;
        margin-bottom: 0;
    }
}

/* ========================================
   Medium Devices (768px - 991.98px)
======================================== */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-section {
        min-height: 90vh;
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    /* Timeline adjustments */
    .timeline-item:nth-child(odd) .timeline-content {
        margin-right: 52%;
    }
    
    .timeline-item:nth-child(even) .timeline-content {
        margin-left: 52%;
    }
    
    /* Gallery */
    .gallery-image {
        height: 200px;
    }
    
    /* Cards spacing */
    .feature-card, .service-card, .team-card {
        margin-bottom: 2rem;
    }
    
    /* Process steps */
    .process-step {
        margin-bottom: 1rem;
    }
}

/* ========================================
   Large Devices (992px - 1199.98px)
======================================== */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2.25rem;
    }
    
    /* Timeline full layout */
    .timeline-item:nth-child(odd) .timeline-content {
        margin-right: 50%;
        padding-right: 2rem;
    }
    
    .timeline-item:nth-child(even) .timeline-content {
        margin-left: 50%;
        padding-left: 2rem;
    }
    
    /* Gallery */
    .gallery-image {
        height: 220px;
    }
    
    /* Pricing cards */
    .pricing-card.featured {
        transform: scale(1.02);
    }
    
    .pricing-card.featured:hover {
        transform: scale(1.02) translateY(-10px);
    }
}

/* ========================================
   Extra Large Devices (1200px+)
======================================== */
@media (min-width: 1200px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .section-subtitle {
        font-size: 1.25rem;
    }
    
    /* Container max-width adjustments */
    .container {
        max-width: 1140px;
    }
    
    /* Hero section full height */
    .hero-section {
        min-height: 100vh;
    }
    
    /* Gallery larger images */
    .gallery-image {
        height: 250px;
    }
    
    /* Enhanced spacing */
    section {
        padding: 5rem 0;
    }
    
    /* Pricing cards enhanced */
    .pricing-card.featured {
        transform: scale(1.05);
    }
    
    .pricing-card.featured:hover {
        transform: scale(1.05) translateY(-10px);
    }
    
    /* Timeline enhanced spacing */
    .timeline-item {
        margin-bottom: 4rem;
    }
}

/* ========================================
   Landscape Phone Orientation
======================================== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: 100vh;
        padding: 2rem 0;
    }
    
    .hero-content {
        padding: 1rem 0;
    padding-top: 200px;
}
    
    .hero-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .hero-description {
        font-size: 0.875rem;
        margin-bottom: 1rem;
    }
    
    .hero-cta .btn {
        padding: 0.5rem 1.5rem;
        font-size: 0.875rem;
    }
}

/* ========================================
   Print Styles
======================================== */
@media print {
    .navbar,
    .hero-shapes,
    .btn,
    #footer {
        display: none !important;
    }
    
    .hero-section {
        min-height: auto;
        background: none !important;
        color: #000 !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000 !important;
        background: #fff !important;
    overflow-x: hidden;
}
    
    h1, h2, h3, h4, h5, h6 {
        color: #000 !important;
        page-break-after: avoid;
    }
    
    .card, .feature-card, .service-card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
        margin-bottom: 1rem;
        page-break-inside: avoid;
    }
    
    section {
        padding: 1rem 0;
    }
    
    .container {
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* ========================================
   High Contrast Mode Support
======================================== */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000;
        --secondary-color: #333;
        --accent-color: #666;
        --primary-dark: #000;
        --secondary-dark: #333;
        --box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    }
    
    .btn-primary {
        background-color: #000;
        border-color: #000;
        color: #fff;
    }
    
    .btn-outline-primary {
        color: #000;
        border-color: #000;
    }
    
    .feature-icon, .info-icon, .contact-icon, .process-number {
        background: #000;
        color: #fff;
    }
}

/* ========================================
   Reduced Motion Support
======================================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .hero-shapes,
    [data-sal] {
        animation: none !important;
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
    
    .feature-card:hover,
    .service-card:hover,
    .team-card:hover,
    .pricing-card:hover,
    .btn:hover {
        transform: none !important;
    }
}

/* ========================================
   Focus Accessibility
======================================== */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip to content for screen readers */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 9999;
}

.skip-to-content:focus {
    top: 6px;
}

/* ========================================
   Browser-Specific Fixes
======================================== */

/* Safari specific */
@supports (-webkit-appearance: none) {
    .hero-section {
        min-height: -webkit-fill-available;
    }
}

/* Firefox specific */
@-moz-document url-prefix() {
    .hero-shapes {
        will-change: auto;
    }
}

/* IE11 fallbacks */
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
    .feature-item {
        display: block;
    }
    
    .feature-icon {
        float: left;
        margin-right: 1rem;
    }
    
    .feature-content {
        overflow: hidden;
    }
}

/* ========================================
   Utility Classes for Responsive Design
======================================== */
.d-mobile-none {
    display: none;
}

@media (min-width: 768px) {
    .d-mobile-none {
        display: block;
    }
    
    .d-desktop-none {
        display: none;
    }
}

.text-mobile-center {
    text-align: center;
}

@media (min-width: 768px) {
    .text-mobile-center {
        text-align: left;
    }
}

/* ========================================
   Performance Optimizations
======================================== */
.hero-section,
.feature-card,
.service-card,
.team-card {
    contain: layout style paint;
}

/* Reduce GPU usage on mobile */
@media (max-width: 768px) {
    .hero-section {
        transform: translateZ(0);
        backface-visibility: hidden;
        perspective: 1000px;
    }
    
    .feature-card:hover,
    .service-card:hover,
    .team-card:hover {
        transform: none;
    }
} 