/* Responsive CSS for HabitQuest - Mobile-First Approach */

/* Extra Small devices (phones, 576px and up) */
@media (max-width: 575.98px) {
    /* Typography adjustments for mobile */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.88rem; }
    h3 { font-size: 1.62rem; }
    h4 { font-size: 1.27rem; }
    
    .display-4 {
        font-size: 2.38rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    /* Navigation */
    .navbar-brand {
        font-size: 1.30rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        text-align: center;
    }
    
    /* Hero section */
    .hero-section {
        padding: 2rem 0;
        min-height: 70vh;
    }
    
    .hero-section .display-4 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero-section .lead {
        font-size: 1.22rem;
        margin-bottom: 1.62rem;
    }
    
    /* Cards */
    .card {
        margin-bottom: 1.65rem;
    }
    
    .service-card .card-img-top {
        height: 150px;
    }
    
    /* Process steps */
    .process-step {
        width: 50px;
        height: 50px;
        font-size: 1.37rem;
    }
    
    /* Contact form */
    .contact-info {
        padding: 1.5rem;
        margin-top: 2rem;
    }
    
    /* Team section */
    .team-member img {
        width: 120px;
        height: 120px;
    }
    
    /* Footer */
    footer .container {
        text-align: center;
    }
    
    footer .col-lg-4 {
        margin-bottom: 2rem;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* Hero section */
    .hero-section .display-4 {
        font-size: 2.59rem;
    }
    
    /* Cards in rows */
    .card-deck .card {
        margin-bottom: 1.64rem;
    }
    
    /* Process steps */
    .process-step {
        width: 55px;
        height: 55px;
        font-size: 1.52rem;
    }
    
    /* Gallery */
    .gallery .col-lg-4 {
        margin-bottom: 1rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Typography */
    h1 { font-size: 2.34rem; }
    h2 { font-size: 1.94rem; }
    
    .display-4 {
        font-size: 2.79rem;
    }
    
    /* Navigation */
    .navbar-brand {
        font-size: 1.41rem;
    }
    
    /* Hero section */
    .hero-section .display-4 {
        font-size: 2.80rem;
    }
    
    /* Cards */
    .service-card .card-img-top {
        height: 160px;
    }
    
    /* Team section - 2 columns on tablet */
    .team-section .col-lg-2 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    /* Contact form */
    .contact-info {
        margin-top: 0;
    }
    
    /* Footer */
    footer .col-lg-4 {
        margin-bottom: 1.61rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* Hero section */
    .hero-section .display-4 {
        font-size: 3rem;
    }
    
    /* Cards */
    .service-card .card-img-top {
        height: 180px;
    }
    
    /* Process steps */
    .process-step {
        width: 60px;
        height: 60px;
    }
    
    /* Team section adjustments */
    .team-section .col-lg-2 {
        margin-bottom: 1.58rem;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    /* Container max-width adjustments */
    .container {
        max-width: 1140px;
    }
    
    /* Hero section */
    .hero-section .display-4 {
        font-size: 3.59rem;
    }
    
    .hero-section .lead {
        font-size: 1.47rem;
    }
    
    /* Cards */
    .service-card .card-img-top {
        height: 200px;
    }
    
    /* Spacing adjustments */
    .py-5 {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
}

/* Ultra wide screens (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    /* Hero section */
    .hero-section .display-4 {
        font-size: 4rem;
    }
    
    /* Larger spacing for ultra-wide */
    .py-5 {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 600px) {
    .hero-section {
        min-height: 80vh;
    }
    
    .hero-section .display-4 {
        font-size: 2.60rem;
    }
    
    .hero-section .lead {
        font-size: 1.23rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn {
        padding: 1rem 2rem;
        font-size: 1.22rem;
    }
    
    .nav-link {
        padding: 1rem;
    }
    
    .form-control {
        padding: 1rem;
        font-size: 1.25rem;
    }
    
    /* Remove hover effects on touch devices */
    .card:hover {
        transform: none;
        box-shadow: 0 8px 6px rgba(0, 0, 0, 0.1);
    }
    
    .service-card:hover {
        transform: none;
        box-shadow: 0 7px 6px rgba(0, 0, 0, 0.1);
    }
    
    .timeline-item:hover {
        transform: none;
    }
}

/* High-DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
    /* Crisp images on retina displays */
    .card-img-top,
    .gallery img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .card,
    .service-card,
    .timeline-item,
    .btn {
        transition: none;
    }
    
    .card:hover,
    .service-card:hover,
    .timeline-item:hover {
        transform: none;
    }
    
    .fade-in-up {
        animation: none;
    }
}

/* Dark mode support */

/* Print optimizations */
@media print {
    /* Hide interactive elements */
    .navbar,
    .breadcrumb,
    footer,
    .btn,
    .form-control {
        display: none;
    }
    
    /* Adjust layout for print */
    .container {
        max-width: none;
        margin: 0;
        padding: 0;
    }
    
    .col-lg-4,
    .col-lg-6,
    .col-lg-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    /* Ensure cards don't break across pages */
    .card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    /* Adjust colors for print */
    .hero-section {
        background: white;
        color: black;
    }
    
    .text-primary,
    .text-secondary {
        color: black;
    }
    
    /* Remove shadows and gradients */
    .card,
    .service-card,
    .timeline-item,
    .contact-info {
        box-shadow: none;
        background: white;
        border: 1px solid #dedede;
    }
}

/* Accessibility enhancements */
@media (prefers-contrast: high) {
    /* High contrast mode adjustments */
    .card {
        border: 2px solid var(--neutral-dark);
        background: white;
    }
    
    .btn-primary {
        background: var(--primary-dark);
        border: 2px solid var(--primary-dark);
    }
    
    .btn-outline-primary {
        border-width: 3px;
    }
    
    .form-control {
        border-width: 2px;
    }
    
    .nav-link {
        border-bottom: 2px solid transparent;
    }
    
    .nav-link:hover,
    .nav-link:focus {
        border-bottom-color: var(--primary-color);
    }
}

/* Focus improvements for keyboard navigation */
@media (prefers-reduced-motion: no-preference) {
    .btn:focus,
    .form-control:focus,
    .nav-link:focus,
    .card:focus {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
        transition: outline-offset 0.2s ease;
    }
}

/* Responsive utilities */
.d-block-mobile {
    display: none;
}

.d-none-mobile {
    display: block;
}

@media (max-width: 767.98px) {
    .d-block-mobile {
        display: block;
    }
    
    .d-none-mobile {
        display: none;
    }
}

/* Custom responsive breakpoints */
@media (max-width: 480px) {
    /* Extra small mobile adjustments */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .hero-section .display-4 {
        font-size: 1.82rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .py-5 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
}

@media (min-width: 1600px) {
    /* Large desktop adjustments */
    .container {
        max-width: 1400px;
    }
    
    .hero-section .display-4 {
        font-size: 4.61rem;
    }
    
    .py-5 {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }
} 

.hero-section h1 {
    padding-top: 275px;
}