/* BookSwap - Responsive CSS */

/* Mobile First Approach */

/* Large devices (desktops, 992px and up) */
@media (max-width: 1199.98px) {
    .hero-shapes .shape-1 {
        width: 80px;
        height: 80px;
    }
    
    .hero-shapes .shape-2 {
        width: 120px;
        height: 120px;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (max-width: 991.98px) {
    .navbar-brand {
        font-size: 1.3rem;
    }
    
    #hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-shapes .shape-1,
    .hero-shapes .shape-2 {
        display: none;
    }
    
    .team-photo {
        width: 80px;
        height: 80px;
    }
    
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .timeline-year {
        width: 70px;
        height: 70px;
        font-size: 1rem;
    }
    
    .contact-info {
        margin-top: 2rem;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (max-width: 767.98px) {
    /* Disable animations on mobile for better performance */
    @media (prefers-reduced-motion: no-preference) {
        .feature-card:hover,
        .service-card:hover,
        .review-card:hover,
        .case-study-card:hover,
        .career-item:hover,
        .blog-card:hover,
        .category-item:hover,
        .group-item:hover,
        .event-item:hover,
        .guideline-item:hover,
        .story-item:hover,
        .step-item:hover {
            transform: none;
            box-shadow: 0 5px 15px rgba(0,0,0,0.08);
        }
        
        .btn-primary:hover,
        .btn-outline-primary:hover {
            transform: none;
        }
        
        #gallery img:hover {
            transform: none;
        }
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    #hero {
        text-align: center;
    }
    
    #hero h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    /* Reduce padding on mobile */
    section {
        padding: 3rem 0;
    }
    
    section.py-5 {
        padding: 3rem 0;
    }
    
    .feature-card,
    .category-item,
    .group-item,
    .event-item,
    .guideline-item,
    .story-item,
    .step-item {
        padding: 1.5rem 1rem;
        margin-bottom: 1rem;
    }
    
    .team-photo {
        width: 70px;
        height: 70px;
    }
    
    .step-number {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .timeline-year {
        width: 60px;
        height: 60px;
        font-size: 0.9rem;
    }
    
    .service-image {
        width: 60px;
        height: 60px;
    }
    
    /* Stack team members in fewer columns */
    .team-member {
        margin-bottom: 2rem;
    }
    
    /* Improve button spacing */
    .btn {
        margin-bottom: 1rem;
    }
    
    /* Contact form improvements */
    .contact-form {
        margin-bottom: 2rem;
    }
    
    /* Footer adjustments */
    #footer .col-lg-4,
    #footer .col-lg-2 {
        margin-bottom: 2rem;
        text-align: center;
    }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    #hero h1 {
        font-size: 1.8rem;
    }
    
    .lead {
        font-size: 0.95rem;
    }
    
    /* Further reduce padding */
    section {
        padding: 2rem 0;
    }
    
    section.py-5 {
        padding: 2rem 0;
    }
    
    .feature-card,
    .category-item,
    .group-item,
    .event-item,
    .guideline-item,
    .story-item,
    .step-item {
        padding: 1rem;
    }
    
    .team-photo {
        width: 60px;
        height: 60px;
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .timeline-year {
        width: 50px;
        height: 50px;
        font-size: 0.8rem;
    }
    
    .service-image {
        width: 50px;
        height: 50px;
    }
    
    /* Improve text hierarchy */
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.3rem;
    }
    
    h4 {
        font-size: 1.2rem;
    }
    
    h5 {
        font-size: 1.1rem;
    }
    
    /* Gallery grid adjustments */
    #gallery .col-6 {
        margin-bottom: 1rem;
    }
    
    /* Contact info stacking */
    .contact-info {
        padding: 1.5rem;
    }
    
    .contact-item {
        margin-bottom: 2rem;
    }
    
    /* Breadcrumb adjustments */
    .breadcrumb-section {
        padding-top: 80px;
        padding-bottom: 1rem;
    }
}

/* Landscape phone adjustments */
@media (max-width: 767.98px) and (orientation: landscape) {
    #hero {
        min-height: 60vh;
    }
    
    section {
        padding: 2.5rem 0;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .service-image,
    .team-photo {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print styles */
@media print {
    .navbar,
    #footer,
    .breadcrumb-section {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    overflow-x: hidden;
}
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    .card,
    .feature-card,
    .service-card {
        border: 1px solid #ddd;
        box-shadow: none;
    }
}

/* Accessibility improvements */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0000FF;
        --text-dark: #000000;
        --text-light: #333333;
    }
    
    .btn-primary {
        background-color: #0000FF;
        border-color: #0000FF;
    }
    
    .btn-outline-primary {
        color: #0000FF;
        border-color: #0000FF;
    }
}

/* Focus improvements for keyboard navigation */
@media (prefers-reduced-motion: no-preference) {
    .btn:focus,
    .nav-link:focus,
    .form-control:focus {
        outline: 3px solid var(--primary-color);
        outline-offset: 2px;
    }
} 