/* ===== RESPONSIVE DESIGN - MOBILE FIRST APPROACH ===== */

/* Extra Small devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    /* Typography adjustments for mobile */
    h1 { font-size: 1.84rem; }
    h2 { font-size: 1.54rem; }
    h3 { font-size: 1.28rem; }
    h4 { font-size: 1.21rem; }
    
    .display-4 { font-size: 2rem; }
    .lead { font-size: 1rem; }
    
    /* Navbar brand size for mobile */
    .navbar-brand {
        font-size: 1.27rem !important;
    }
    
    /* Hero section mobile */
    .hero-section h1 {
    padding-top: 150px !important;
}

.hero-section {
        padding-top: 100px;
        text-align: center;
    }
    
    .hero-section h1 {
        margin-bottom: 1rem;
    }
    
    .hero-section .col-lg-6:last-child {
        margin-top: 2rem;
    }
    
    /* Container padding for mobile */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Card adjustments */
    .card-body {
        padding: 1rem;
    }
    
    /* Feature cards mobile spacing */
    .feature-card, .feature-item {
        padding: 1.5rem 1rem;
        margin-bottom: 1rem;
    }
    
    /* Team member images */
    .team-member img {
        width: 150px;
        height: 150px;
    }
    
    /* Contact form mobile */
    .contact-form {
        padding: 1.5rem;
        margin: 0 0.5rem;
    }
    
    /* Process steps mobile */
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.28rem;
    }
    
    /* Timeline mobile */
    .timeline {
        padding-left: 1.5rem;
    }
    
    .timeline-item {
        padding-left: 1.5rem;
    }
    
    /* Gallery mobile - single column */
    #gallery .col-md-4 {
        margin-bottom: 1rem;
    }
    
    /* Footer mobile */
    footer .col-lg-4 {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    /* FAQ accordion mobile */
    .accordion-button {
        font-size: 0.95rem;
        padding: 0.75rem;
    }
    
    /* Space page mobile */
    #space {
        padding: 1rem;
        min-height: calc(100vh - 160px);
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* Hero section adjustments */
    .hero-section h1 {
    padding-top: 150px !important;
}

.hero-section {
        padding-top: 120px;
    }
    
    /* Team member grid - 2 columns */
    .team-member {
        margin-bottom: 2rem;
    }
    
    /* Services grid - 1 column */
    .service-card {
        margin-bottom: 1.55rem;
    }
    
    /* Features grid - 2 columns */
    .feature-card, .feature-item {
        margin-bottom: 1.73rem;
    }
    
    /* Contact form improvements */
    .contact-form {
        padding: 2rem;
    }
    
    /* Gallery - 2 columns */
    #gallery .col-md-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Hero section tablet */
    .hero-section h1 {
    padding-top: 150px !important;
}

.hero-section {
        padding-top: 100px;
    }
    
    .hero-section .col-lg-6 {
        margin-bottom: 2rem;
    }
    
    /* Services grid - 2 columns */
    .service-card {
        margin-bottom: 2rem;
    }
    
    /* Team grid - 3 columns adjustments */
    .team-member {
        margin-bottom: 2rem;
    }
    
    /* Price plan cards */
    .price-card {
        margin-bottom: 2rem;
    }
    
    /* Process steps - 2 columns */
    .process-step {
        margin-bottom: 2rem;
    }
    
    /* Timeline adjustments */
    .timeline {
        padding-left: 2rem;
    }
    
    /* Contact info positioning */
    .contact-info {
        margin-top: 2rem;
    }
    
    /* Blog grid - 2 columns */
    .blog-card {
        margin-bottom: 2rem;
    }
    
    /* Reviews grid adjustments */
    .review-card {
        margin-bottom: 1.67rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* Hero section desktop */
    .hero-section h1 {
    padding-top: 150px !important;
}

.hero-section {
        padding-top: 80px;
    }
    
    /* Container max-width adjustments */
    .container {
        max-width: 960px;
    }
    
    /* Services grid - 3 columns optimal */
    .service-card {
        margin-bottom: 2rem;
    }
    
    /* Team grid - 3 columns with 2 on bottom row */
    .team-member:nth-child(4),
    .team-member:nth-child(5) {
        margin-top: 1rem;
    }
    
    /* Features grid - 4 columns */
    .feature-card, .feature-item {
        margin-bottom: 1.71rem;
    }
    
    /* Gallery - 3 columns optimal */
    #gallery img {
        height: 180px;
    }
    
    /* Contact form and info side by side */
    .contact-info {
        padding-left: 2rem;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    /* Container max-width */
    .container {
        max-width: 1140px;
    }
    
    /* Hero section full desktop */
    .hero-section h1 {
    padding-top: 150px !important;
}

.hero-section {
        padding-top: 80px;
    }
    
    /* Enhanced hover effects on larger screens */
    .card:hover {
        transform: translateY(-8px);
    }
    
    .feature-card:hover, .feature-item:hover {
        transform: translateY(-8px);
    }
    
    /* Gallery full size */
    #gallery img {
        height: 200px;
    }
    
    /* Team member larger images */
    .team-member img {
        width: 200px;
        height: 200px;
    }
    
    /* Enhanced spacing */
    .py-5 {
        padding-top: 4rem !important;
        padding-bottom: 4rem !important;
    }
}

/* ===== SPECIFIC COMPONENT RESPONSIVE BEHAVIOR ===== */

/* Navbar responsive behavior */
@media (max-width: 991.98px) {
    .navbar-nav {
        text-align: center;
        margin-top: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 0;
        border-bottom: 1px solid rgba(0,0,0,0.1);
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
    
    .navbar-collapse {
        background: rgba(255,255,255,0.98);
        margin-top: 1rem;
        border-radius: 0.5rem;
        padding: 1rem;
        box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    }
}

/* Hero section responsive text */
@media (max-width: 768px) {
    .hero-section h1 {
    padding-top: 150px !important;
}

.hero-section {
        text-align: center;
    }
    
    .hero-section .col-lg-6:last-child {
        margin-top: 3rem;
    }
    
    .hero-section img {
        max-width: 100%;
        height: auto;
    }
}

/* Services responsive grid */
@media (max-width: 576px) {
    .service-card .card-img-top {
        height: 150px;
    }
    
    .service-card .card-body {
        padding: 1rem;
    }
    
    .service-card ul {
        font-size: 0.99rem;
    }
}

/* Team section responsive */
@media (max-width: 768px) {
    .team-member {
        text-align: center;
        margin-bottom: 3rem;
    }
    
    .team-member img {
        width: 120px;
        height: 120px;
    }
}

/* Timeline responsive */
@media (max-width: 768px) {
    .timeline::before {
        left: 10px;
    }
    
    .timeline-item::before {
        left: 3px;
    }
    
    .timeline-item {
        padding-left: 1.5rem;
    }
    
    .timeline {
        padding-left: 1rem;
    }
}

/* Contact form responsive */
@media (max-width: 768px) {
    .contact-form .row .col-md-6 {
        margin-bottom: 1rem;
    }
    
    .contact-info {
        margin-top: 3rem;
        padding-left: 0;
    }
}

/* FAQ responsive */
@media (max-width: 576px) {
    .accordion-button {
        font-size: 0.94rem;
        text-align: left;
    }
    
    .accordion-body {
        font-size: 0.99rem;
    }
}

/* Gallery responsive behavior */
@media (max-width: 576px) {
    #gallery .col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 1rem;
    }
    
    #gallery img {
        height: 200px;
    }
}

@media (min-width: 577px) and (max-width: 768px) {
    #gallery .col-md-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Footer responsive */
@media (max-width: 768px) {
    footer .col-lg-4 {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    footer ul {
        padding-left: 0;
        list-style: none;
    }
    
    footer .list-unstyled li {
        margin-bottom: 0.72rem;
    }
}

/* Breadcrumb responsive */
@media (max-width: 576px) {
    .breadcrumb {
        justify-content: center;
    }
    
    .breadcrumb-item img {
        width: 16px;
        height: 16px;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    /* Hide interactive elements */
    .navbar,
    .btn,
    footer,
    #gallery,
    .contact-form,
    .breadcrumb {
        display: none !important;
    }
    
    /* Optimize for printing */
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: #000;
        page-break-after: avoid;
    }
    
    .card {
        border: 1px solid #c3bfbf;
        page-break-inside: avoid;
        box-shadow: none;
    }
    
    /* Remove background colors for printing */
    * {
        background: white !important;
        color: black !important;
    }
    
    /* Ensure images print properly */
    img {
        max-width: 100% !important;
        height: auto !important;
    }
}

/* ===== ACCESSIBILITY RESPONSIVE FEATURES ===== */

/* High contrast mode responsive adjustments */
@media (prefers-contrast: high) {
    @media (max-width: 768px) {
        .card {
            border: 2px solid #000;
        }
        
        .btn {
            border: 2px solid currentColor;
        }
    }
}

/* Reduced motion responsive */
@media (prefers-reduced-motion: reduce) {
    @media (max-width: 768px) {
        .card:hover,
        .feature-card:hover,
        .feature-item:hover {
            transform: none;
        }
    }
}

