/* ========================================
   BOSCH CAR SERVICE - RESPONSIVE DESIGN
   ======================================== 
   
   Адаптивная версия для мобильных устройств
   Desktop версия (≥1024px) следует Bosch Brand Guidelines
   Tablet версия (768-1023px) - адаптированная
   Mobile версия (<768px) - полностью респонсивная
*/

/* ========================================
   DESKTOP VERSION (≥1024px) - BOSCH GUIDELINES
   ======================================== */

/* Desktop остается по гайду - ничего не меняем для больших экранов */
@media (min-width: 1024px) {
    /* Desktop версия использует стандартные стили из bosch-new.css */
    /* 1002px контейнер, 982px полезная ширина, 16-колоночная сетка */
}

/* ========================================
   TABLET VERSION (768px - 1023px)
   ======================================== */

@media (max-width: 1023px) and (min-width: 768px) {
    
    /* Main wrapper - flexible width for tablets */
    .page-wrapper {
        width: 100%;
        max-width: 100%;
        padding: 0 20px;
    }
    
    /* Content container - full width with padding */
    .content-container {
        width: 100%;
        padding: 0 15px;
    }
    
    /* Header adjustments */
    .header-wrapper {
        height: auto;
        min-height: 80px;
        display: flex;
        flex-direction: column;
    }

    .header-content {
        width: 100%;
        order: 2;
    }
    
    .header-logo-container {
        position: relative;
        top: 0;
        left: 0;
        padding: 10px 0;
        text-align: center;
        width: 100%;
        order: 1;
    }
    
    .header-brand img {
        width: 80px;
        height: 81px;
    }
    
    /* Slogan bar - full width */
    .bosch-slogan-bar {
        position: relative;
        left: 0;
        width: 100%;
        padding: 0 20px;
        height: 30px;
    }
    
    .bosch-slogan-bar .container {
        padding-left: 0;
        max-width: 100%;
    }
    
    .brand-claim {
        font-size: 18px;
        line-height: 30px;
    }
    
    /* Navigation - stacked or scrollable */
    .navbar-light {
        height: auto;
        padding-top: 10px;
    }
    
    .navbar-light .container {
        padding-left: 0;
        max-width: 100%;
    }
    
    .navbar-nav {
        flex-wrap: wrap;
    }
    
    .navbar-light .nav-link {
        font-size: 16px;
        padding: 10px 15px;
    }
    
    /* Hero section - responsive */
    .hero-section {
        width: 100%;
        height: auto;
        min-height: 300px;
        display: flex;
        flex-direction: row;
    }
    
    .hero-image-wrapper {
        width: 50%;
        height: 300px;
        position: relative;
    }
    
    .hero-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center center;
    }
    
    .hero-content {
        width: 50%;
        padding: 30px;
        background: rgba(241, 241, 241, 0.95);
        position: relative;
    }
    
    .hero-title {
        font-size: 28px;
        line-height: 30px;
    }
    
    .hero-subtitle {
        font-size: 14px;
    }
    
    .hero-buttons {
        flex-wrap: wrap;
    }
    
    /* Service cards - 2 columns */
    .service-card {
        margin-bottom: 20px;
    }
    
    /* Typography adjustments */
    h1, .h1 {
        font-size: 28px;
        line-height: 30px;
    }
    
    h2, .h2 {
        font-size: 22px;
        line-height: 24px;
    }
    
    h3, .h3 {
        font-size: 16px;
        line-height: 18px;
    }
}

/* ========================================
   MOBILE VERSION (<768px)
   ======================================== */

@media (max-width: 767px) {
    
    /* Body and base */
    body {
        font-size: 14px;
        line-height: 1.6;
        background-color: white; /* White background on mobile */
    }
    
    /* Main wrapper - full width on mobile */
    .page-wrapper {
        width: 100%;
        max-width: 100%;
        padding: 0;
        box-shadow: none;
        margin: 0;
    }
    
    /* Content container - full width with minimal padding */
    .content-container {
        width: 100%;
        padding: 0 15px;
    }
    
    /* ========================================
       HEADER - MOBILE OPTIMIZED
       ======================================== */
    
    /* Top bar - mobile friendly */
    .top-bar {
        padding: 5px 0;
        font-size: 11px;
    }
    
    .top-bar .container {
        padding: 0 15px;
    }
    
    .top-bar a {
        font-size: 11px;
    }
    
    /* Header wrapper - vertical layout */
    .header-wrapper {
        height: auto;
        padding: 0;
        display: flex;
        flex-direction: column;
    }

    .header-content {
        width: 100%;
        order: 2;
    }
    
    /* Logo - centered and smaller */
    .header-logo-container {
        position: relative;
        top: 0;
        left: 0;
        text-align: center;
        padding: 15px 0;
        background-color: transparent;
        z-index: 100;
        order: 1;
    }
    
    .header-brand img {
        width: 70px;
        height: 71px;
    }
    
    /* Slogan bar - full width, smaller text */
    .bosch-slogan-bar {
        position: relative;
        left: 0;
        width: 100%;
        height: 40px;
        padding: 0 15px;
        top: 0;
    }
    
    .bosch-slogan-bar .container {
        padding: 0;
        max-width: 100%;
    }
    
    .brand-claim {
        font-size: 16px;
        line-height: 40px;
        text-align: center;
    }
    
    /* Navigation - hamburger menu style */
    .navbar-light {
        height: auto;
        padding: 0;
        background-color: white;
    }
    
    .navbar-light .container {
        padding: 0 15px;
        max-width: 100%;
    }
    
    /* Mobile menu toggle button */
    .navbar-toggler {
        display: block;
        border: 1px solid var(--bosch-service-blue);
        padding: 8px 12px;
        margin: 10px 0;
    }
    
    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(76, 144, 205, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }
    
    /* Navigation menu - vertical stack */
    .navbar-collapse {
        background-color: white;
        padding: 10px 0;
    }
    
    .navbar-nav {
        flex-direction: column;
        width: 100%;
    }
    
    .navbar-light .nav-item {
        border-right: none;
        border-bottom: 1px solid var(--gray-50);
        width: 100%;
    }
    
    .navbar-light .nav-link {
        font-size: 16px;
        padding: 15px 20px;
        width: 100%;
        text-align: left;
        display: block;
    }
    
    .navbar-light .nav-item:first-child .nav-link {
        border-left: none;
    }
    
    /* ========================================
       HERO SECTION - MOBILE
       ======================================== */
    
    .hero-section {
        width: 100%;
        height: auto;
        min-height: 0;
        border: none;
        margin: 0;
        display: flex;
        flex-direction: column;
    }
    
    .hero-image-wrapper {
        position: relative;
        height: 200px;
        width: 100%;
        overflow: hidden;
    }
    
    .hero-image {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center center;
    }
    
    .hero-content {
        position: relative;
        width: 100%;
        padding: 20px 15px;
        background: white;
    }
    
    .hero-title {
        font-size: 24px;
        line-height: 26px;
        margin-bottom: 10px;
    }
    
    .hero-subtitle {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 15px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .hero-buttons .btn,
    .hero-buttons .btn-cta,
    .hero-buttons .btn-nav {
        width: 100%;
        height: auto;
        padding: 12px 20px;
        font-size: 14px;
        line-height: 1.4;
    }
    
    .hero-link,
    .hero-mail-link,
    .hero-download-link {
        display: block;
        width: 100%;
        padding: 10px 0;
        font-size: 14px;
    }
    
    /* ========================================
       TYPOGRAPHY - MOBILE
       ======================================== */
    
    h1, .h1 {
        font-size: 24px;
        line-height: 26px;
    }
    
    h2, .h2 {
        font-size: 20px;
        line-height: 22px;
    }
    
    h3, .h3 {
        font-size: 16px;
        line-height: 18px;
    }
    
    p, .p {
        font-size: 14px;
        line-height: 1.6;
    }
    
    small, .small-text {
        font-size: 12px;
        line-height: 1.5;
    }
    
    .section-title {
        font-size: 24px;
        line-height: 26px;
        margin-bottom: 30px;
    }
    
    /* ========================================
       BUTTONS - MOBILE
       ======================================== */
    
    .btn-bosch,
    .btn-cta,
    .btn-nav,
    .btn-control {
        height: auto;
        min-height: 44px; /* Mobile touch target */
        padding: 12px 20px;
        font-size: 14px;
        line-height: 1.4;
        width: 100%;
        display: block;
        text-align: center;
    }
    
    .btn-bosch-outline {
        padding: 12px 20px;
        width: 100%;
    }
    
    .btn-icon {
        height: auto;
        padding: 10px 15px;
        width: auto;
        display: inline-flex;
    }
    
    /* ========================================
       SERVICES SECTION - MOBILE
       ======================================== */
    
    .services-section {
        padding: 40px 0;
    }
    
    .service-card {
        padding: 30px 20px;
        margin-bottom: 20px;
        min-height: 0;
    }
    
    .service-icon {
        font-size: 60px;
        margin-bottom: 20px;
    }
    
    .service-card h3 {
        font-size: 18px;
        line-height: 20px;
        min-height: 0;
        margin-bottom: 15px;
    }
    
    .service-card p {
        display: block; /* Show descriptions on mobile */
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .service-card .btn {
        width: 100%;
        margin-top: 10px;
    }
    
    /* ========================================
       FEATURES SECTION - MOBILE
       ======================================== */
    
    .features-section {
        padding: 40px 0;
    }
    
    .feature-box {
        padding: 20px 10px;
        margin-bottom: 20px;
    }
    
    .feature-icon {
        width: 80px;
        height: 80px;
        font-size: 35px;
        margin-bottom: 15px;
    }
    
    .feature-box h4 {
        font-size: 16px;
        line-height: 18px;
        margin-bottom: 10px;
    }
    
    .feature-box p {
        font-size: 14px;
    }
    
    /* ========================================
       LOCATION & CONTACT - MOBILE
       ======================================== */
    
    .location-section,
    .contact-section {
        padding: 40px 0;
    }
    
    .location-info {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .location-info .info-item {
        margin-bottom: 15px;
    }
    
    .location-info .info-item i {
        font-size: 16px;
        width: 25px;
        margin-right: 10px;
    }
    
    .map-placeholder {
        height: 250px;
        font-size: 14px;
    }
    
    .contact-form {
        padding: 20px;
    }
    
    .form-label {
        font-size: 14px;
        margin-bottom: 5px;
    }
    
    .form-control,
    .form-select {
        font-size: 14px;
        padding: 10px;
        height: auto;
    }
    
    textarea.form-control {
        min-height: 120px;
    }
    
    /* ========================================
       CTA SECTION - MOBILE
       ======================================== */
    
    .cta-section {
        padding: 40px 0;
    }
    
    .cta-section h2 {
        font-size: 24px;
        line-height: 26px;
        margin-bottom: 20px;
    }
    
    .cta-section p {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .cta-section .btn {
        width: 100%;
        margin: 5px 0;
        display: block;
    }
    
    /* ========================================
       FOOTER - MOBILE
       ======================================== */
    
    footer {
        padding: 40px 0 20px;
    }
    
    footer h5,
    footer h6 {
        font-size: 16px;
        line-height: 18px;
        margin-bottom: 15px;
    }
    
    footer p,
    footer li,
    footer a {
        font-size: 14px;
    }
    
    footer ul li {
        margin-bottom: 8px;
    }
    
    footer .social-links a {
        width: 35px;
        height: 35px;
        line-height: 35px;
        margin-right: 8px;
    }
    
    .footer-bottom {
        margin-top: 30px;
        padding-top: 15px;
        text-align: center;
    }
    
    /* ========================================
       CARDS & COMPONENTS - MOBILE
       ======================================== */
    
    .garage-card {
        padding: 20px;
        margin-bottom: 15px;
    }
    
    .garage-card h4 {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .garage-card .info-item {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .booking-steps {
        padding: 40px 0;
    }
    
    .step-item {
        padding: 20px 10px;
        margin-bottom: 20px;
    }
    
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        margin-bottom: 15px;
    }
    
    .step-item h4 {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    /* ========================================
       UTILITIES - MOBILE
       ======================================== */
    
    /* Spacing adjustments */
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    .my-5 {
        margin-top: 2rem !important;
        margin-bottom: 2rem !important;
    }
    
    /* Container padding */
    .container,
    .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Grid adjustments */
    .row {
        margin-left: -10px;
        margin-right: -10px;
    }
    
    .row > * {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    /* Text alignment on mobile */
    .text-md-start,
    .text-md-end,
    .text-md-center {
        text-align: center !important;
    }
    
    /* Hide on mobile if needed */
    .d-none-mobile {
        display: none !important;
    }
    
    /* Full width on mobile */
    .w-100-mobile {
        width: 100% !important;
    }
    
    /* ========================================
       TABLES - MOBILE RESPONSIVE
       ======================================== */
    
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        /* -webkit-overflow-scrolling deprecated, removed for compatibility */
    }
    
    table {
        font-size: 12px;
    }
    
    table th,
    table td {
        padding: 8px;
        white-space: nowrap;
    }
    
    /* ========================================
       IMAGES - MOBILE
       ======================================== */
    
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* ========================================
       MODALS & OVERLAYS - MOBILE
       ======================================== */
    
    .modal-dialog {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    .modal-content {
        padding: 15px;
    }
    
    /* ========================================
       FORMS - MOBILE TOUCH FRIENDLY
       ======================================== */
    
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"],
    input[type="number"],
    input[type="date"],
    select,
    textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 44px; /* Touch target size */
    }
    
    /* Checkbox and radio - larger touch targets */
    input[type="checkbox"],
    input[type="radio"] {
        width: 20px;
        height: 20px;
        margin-right: 8px;
    }
    
    /* ========================================
       LANGUAGE SWITCHER - MOBILE
       ======================================== */
    
    .language-switcher {
        display: flex;
        justify-content: center;
        margin: 10px 0;
    }
    
    .language-switcher a {
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* ========================================
   VERY SMALL DEVICES (<380px)
   ======================================== */

@media (max-width: 379px) {
    
    .page-wrapper,
    .content-container {
        padding: 0 10px;
    }
    
    .hero-title {
        font-size: 20px;
        line-height: 22px;
    }
    
    h1, .h1 {
        font-size: 20px;
        line-height: 22px;
    }
    
    h2, .h2 {
        font-size: 18px;
        line-height: 20px;
    }
    
    .brand-claim {
        font-size: 14px;
    }
    
    .navbar-light .nav-link {
        font-size: 14px;
        padding: 12px 15px;
    }
    
    .service-icon {
        font-size: 50px;
    }
    
    .feature-icon {
        width: 70px;
        height: 70px;
        font-size: 30px;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    
    body {
        background: white;
        font-size: 12pt;
    }
    
    .page-wrapper {
        width: 100%;
        box-shadow: none;
    }
    
    .top-bar,
    .bosch-slogan-bar,
    .navbar-light,
    footer,
    .btn,
    .language-switcher {
        display: none !important;
    }
    
    .hero-section,
    .service-card,
    .feature-box {
        page-break-inside: avoid;
    }
    
    a {
        text-decoration: underline;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
    }
}

/* ========================================
   LANDSCAPE ORIENTATION - MOBILE
   ======================================== */

@media (max-width: 767px) and (orientation: landscape) {
    
    .hero-section {
        min-height: 250px;
    }
    
    .hero-image {
        height: 150px;
    }
    
    .header-logo-container {
        padding: 10px 0;
    }
    
    .header-brand img {
        width: 60px;
        height: 61px;
    }
    
    .bosch-slogan-bar {
        height: 35px;
    }
    
    .brand-claim {
        font-size: 14px;
        line-height: 35px;
    }
}

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-bosch,
    .btn-cta,
    .btn-nav {
        border: 2px solid currentColor;
    }
}

/* ========================================
   END OF RESPONSIVE STYLES
   ======================================== */
