/* Responsive Design for HabitSync Template */

/* Mobile First Approach - Base styles for mobile */
@media (max-width: 575.98px) {
    /* Typography adjustments */
    .display-5 {
        font-size: 1.96rem;
        line-height: 1.2;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    h2 {
        font-size: 1.57rem;
    }
    
    h5 {
        font-size: 1.18rem;
    }
    
    /* Navigation */
    .navbar-brand {
        font-size: 1.46rem;
    }
    
    /* Hero Section */
    #hero {
        padding-top: 70px;
        min-height: auto;
        padding-bottom: 3rem;
    }
    
    .hero-buttons {
        margin-top: 2rem;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 1.06rem;
        padding: 14px 20px;
    }
    
    .hero-buttons .btn:last-child {
        margin-bottom: 0;
    }
    
    /* Cards */
    .card-img-top {
        height: 180px;
    }
    
    .card-body {
        padding: 1rem;
    overflow-x: hidden;
}
    
    /* Icons */
    .fa-3x {
        font-size: 2rem;
    }
    
    .fa-2x {
        font-size: 1.77rem;
    }
    
    /* Team member images */
    .team-member img,
    .card-img-top.rounded-circle {
        width: 120px;
        height: 120px;
    }
    
    /* Process numbers */
    .process-number {
        width: 50px;
        height: 50px;
        font-size: 1.38rem;
    }
    
    /* Forms */
    .form-control {
        padding: 10px 14px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Gallery */
    #gallery .col-lg-4,
    #gallery .col-md-6 {
        margin-bottom: 1rem;
    }
    
    /* Spacing adjustments */
    .py-5 {
        padding-top: 2.69rem;
        padding-bottom: 2.92rem;
    }
    
    .mb-5 {
        margin-bottom: 2rem;
    }
    
    /* No animations on mobile for better performance */
    .card:hover {
        transform: none;
    }
    
    #gallery img:hover {
        transform: none;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .display-5 {
        font-size: 2rem;
    }
    
    .hero-buttons .btn {
        display: inline-block;
        width: auto;
        min-width: 150px;
    }
    
    .card-img-top {
        height: 200px;
    }
    
    .team-member img,
    .card-img-top.rounded-circle {
        width: 130px;
        height: 130px;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .display-5 {
        font-size: 2.48rem;
    }
    
    /* Navigation adjustments for tablets */
    .navbar-nav {
        text-align: center;
    }
    
    .navbar-nav .nav-item {
        margin: 0.25rem 0;
    }
    
    /* Hero section for tablets */
    #hero {
        padding-top: 80px;
    }
    
    .hero-buttons .btn {
        margin-right: 1rem;
        margin-bottom: 0.74rem;
    }
    
    /* Card adjustments */
    .card-img-top {
        height: 220px;
    }
    
    /* Team images */
    .team-member img,
    .card-img-top.rounded-circle {
        width: 140px;
        height: 140px;
    }
    
    /* Process section */
    .process-number {
        width: 70px;
        height: 70px;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    /* Restore full animations for desktop */
    .card:hover {
        transform: translateY(-5px);
    }
    
    #gallery img:hover {
        transform: scale(1.05);
    }
    
    /* Full hero height on desktop */
    #hero {
        min-height: 100vh;
    }
    
    /* Optimal spacing for desktop */
    .py-5 {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .display-5 {
        font-size: 3rem;
    }
    
    /* Enhanced card heights for larger screens */
    .card-img-top {
        height: 250px;
    }
    
    /* Larger team images */
    .team-member img,
    .card-img-top.rounded-circle {
        width: 160px;
        height: 160px;
    }
}

/* Extra extra large devices (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .display-5 {
        font-size: 3.43rem;
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 500px) {
    #hero {
        min-height: auto;
        padding-top: 70px;
        padding-bottom: 2rem;
    }
    
    .py-5 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Ensure crisp rendering on retina displays */
    .card-img-top,
    .team-member img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print styles */
@media print {
    /* Hide non-essential elements */
    .navbar,
    .btn,
    .hero-buttons,
    footer,
    #gallery {
        display: none !important;
    }
    
    /* Optimize spacing for print */
    .py-5 {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    
    /* Ensure proper page breaks */
    .card,
    section {
        page-break-inside: avoid;
        break-inside: avoid;
    }
    
    /* Black and white optimizations */
    .text-primary,
    .text-success,
    .text-warning {
        color: #000 !important;
    }
    
    .bg-light,
    .bg-primary,
    .bg-success,
    .bg-info,
    .bg-warning {
        background-color: #fff !important;
        border: 1px solid #000;
    }
}

/* Accessibility: Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .card,
    .btn,
    #gallery img,
    .hero-buttons .btn {
        transition: none !important;
        transform: none !important;
    }
    
    .card:hover,
    .btn:hover,
    #gallery img:hover {
        transform: none !important;
    }
}

/* Dark mode support (if browser/OS supports it) */

/* Focus styles for better accessibility */
@media (any-hover: hover) {
    .btn:focus-visible,
    .form-control:focus-visible,
    .nav-link:focus-visible {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
} 