/* ===== RESPONSIVE DESIGN - MOBILE FIRST ===== */

/* Extra Small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    /* Typography adjustments */
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.375rem; }
    h3 { font-size: 1.25rem; }
    
    /* Navbar brand size reduction */
    .navbar-brand {
        font-size: 1rem;
    }
    
    /* Hero section adjustments */
    .hero-section {
        text-align: center;
        padding-top: 60px;
    }
    
    .hero-decorative-shape {
        display: none; /* Hide decorative elements on small screens */
    }
    
    /* Card spacing adjustments */
    .card {
        margin-bottom: 1rem;
    }
    
    /* Process step numbers */
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    /* Team member images */
    .team-member img {
        width: 80px;
        height: 80px;
    }
    
    /* Form adjustments */
    .form-control {
        padding: 10px 12px;
    }
    
    /* Contact info padding */
    .contact-info {
        padding: 1rem;
        margin-top: 2rem;
    }
    
    /* Disable animations on mobile for better performance */
    @media (prefers-reduced-motion: no-preference) {
        .card:hover,
        .feature-card:hover,
        .feature-item:hover,
        .process-step:hover,
        .timeline-item:hover,
        .info-item:hover {
            transform: none;
        }
        
        #gallery img:hover {
            transform: none;
        }
    }
    
    /* Gallery adjustments */
    #gallery .col-6 {
        margin-bottom: 0.5rem;
    }
    
    /* Utility classes for mobile */
    .text-center-mobile {
        text-align: center !important;
    }
    
    .mb-mobile-3 {
        margin-bottom: 1rem !important;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* Hero section */
    .hero-section {
        padding-top: 70px;
    }
    
    /* Team member adjustments */
    .team-member img {
        width: 90px;
        height: 90px;
    }
    
    /* Process steps */
    .step-number {
        width: 55px;
        height: 55px;
        font-size: 1.1rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Hero section */
    .hero-section {
        padding-top: 80px;
    }
    
    /* Typography */
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    
    /* Cards in grid */
    .card {
        height: 100%;
    }
    
    /* Gallery spacing */
    #gallery .col-md-4 {
        margin-bottom: 1rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* Standard desktop styles - mostly inherit from main.css */
    .hero-section {
        padding-top: 80px;
    }
    
    /* Ensure proper card heights */
    .services .card,
    .reviews .card {
        height: 100%;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    /* Enhanced spacing for large screens */
    .container {
        max-width: 1140px;
    }
    
    /* Typography enhancements */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    
    /* Hero section enhancements */
    .hero-decorative-shape {
        width: 250px;
        height: 250px;
    }
    
    /* Card enhancements */
    .card {
        border-radius: 16px;
    }
    
    /* Process step enhancements */
    .step-number {
        width: 70px;
        height: 70px;
        font-size: 1.5rem;
    }
    
    /* Team member image size */
    .team-member img {
        width: 120px;
        height: 120px;
    }
}

/* ===== CONTAINER ADJUSTMENTS ===== */
@media (max-width: 575.98px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* ===== NAVIGATION RESPONSIVENESS ===== */
@media (max-width: 991.98px) {
    .navbar-collapse {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid #E5E7EB;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 0;
    }
}

/* ===== GRID SYSTEM ADJUSTMENTS ===== */
@media (max-width: 767.98px) {
    /* Stack columns on small screens */
    .row > [class*="col-"] {
        margin-bottom: 1rem;
    }
    
    /* Services grid adjustments */
    #services .row > .col-lg-4 {
        margin-bottom: 1.5rem;
    }
    
    /* Features grid adjustments */
    #features .row > .col-lg-3 {
        margin-bottom: 1.5rem;
    }
    
    /* Team grid adjustments */
    #team .row > .col-lg-2 {
        margin-bottom: 1rem;
    }
}

/* ===== FORM RESPONSIVENESS ===== */
@media (max-width: 767.98px) {
    .contact-form .col-md-6 {
        margin-bottom: 1rem;
    }
    
    .btn {
        width: 100%;
        padding: 12px 16px;
    }
}

/* ===== FOOTER RESPONSIVENESS ===== */
@media (max-width: 767.98px) {
    footer .col-lg-4 {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    footer ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    footer li {
        list-style: none;
    }
    
    /* Улучшенная контрастность на мобильных устройствах */
    footer a {
        font-size: 16px; /* Больший размер шрифта для лучшей читаемости на мобильных */
        padding: 8px 4px; /* Увеличенные отступы для лучшего нажатия */
        min-height: 44px; /* Минимальная высота для touch targets */
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* ===== SECTION SPACING ADJUSTMENTS ===== */
@media (max-width: 767.98px) {
    section {
        padding: 3rem 0 !important;
    }
    
    .py-5 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    .mb-5 {
        margin-bottom: 2rem !important;
    }
}

/* ===== BREADCRUMB RESPONSIVENESS ===== */
@media (max-width: 767.98px) {
    .breadcrumb-section {
        padding-top: 80px;
        padding-bottom: 1rem;
    }
}

/* ===== ADDITIONAL PAGE RESPONSIVENESS ===== */
@media (max-width: 767.98px) {
    .insight-item,
    .practice-item,
    .case-item,
    .opinion-item,
    .resource-item,
    .specialization-item,
    .delivery-item,
    .industry-item,
    .tech-item,
    .quality-item {
        margin-bottom: 1rem;
        padding: 1rem;
    }
}

/* ===== ACCESSIBILITY RESPONSIVE FEATURES ===== */
@media (max-width: 767.98px) {
    /* Larger touch targets on mobile */
    .btn,
    .nav-link,
    a {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .nav-link {
        justify-content: flex-start;
    }
}

/* ===== PERFORMANCE OPTIMIZATIONS FOR MOBILE ===== */
@media (max-width: 767.98px) {
    /* Reduce image quality/size hints for mobile */
    img {
        image-rendering: optimizeSpeed;
    }
    
    /* Disable complex animations on mobile */
    @media (prefers-reduced-motion: no-preference) {
        * {
            animation-duration: 0.2s !important;
            transition-duration: 0.2s !important;
        }
    }
}

/* ===== LANDSCAPE ORIENTATION ADJUSTMENTS ===== */
@media (orientation: landscape) and (max-height: 500px) {
    .hero-section {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .navbar {
        padding: 0.25rem 0;
    }
    
    .breadcrumb-section {
        padding-top: 60px;
    }
}

/* ===== HIGH DPI DISPLAYS ===== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize for retina/high-DPI displays */
    .card {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
    }
    
    .btn {
        border-width: 1px;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .navbar,
    .breadcrumb-section,
    footer,
    .btn,
    .hero-decorative-shape {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
    overflow-x: hidden;
}
    
    .container {
        max-width: none !important;
        padding: 0;
    }
    
    section {
        page-break-inside: avoid;
        padding: 1rem 0 !important;
    }
} 

.hero-section h1 {
    padding-top: 125px;
}