/* ===== МОБІЛЬНА АДАПТАЦІЯ САЙТУ VINNO ===== */

/* === БАЗОВІ АДАПТИВНІ НАСТРОЙКИ === */
@media (max-width: 1199.98px) {
    .container {
        max-width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* === ПЛАНШЕТИ (768px - 991.98px) === */
@media (max-width: 991.98px) {
    /* Заголовки */
    .section-title {
        font-size: 2.2rem;
        margin-bottom: 1.5rem;
    }

    .page-title {
        font-size: 2.5rem;
    }

    /* Відступи секцій */
    .section-padding {
        padding: 4rem 0;
    }

    /* Продукти */
    .product-card {
        margin-bottom: 2rem;
    }

    /* Кнопки */
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

/* === МОБІЛЬНІ ПРИСТРОЇ (max-width: 767.98px) === */
@media (max-width: 767.98px) {

    /* === HEADER АДАПТАЦІЯ === */
    .top-contact-bar {
        padding: 0.5rem 0;
        font-size: 0.75rem;
    }

    .top-contact-bar .container {
        padding: 0 10px;
    }

    .contact-info {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }

    .contact-info span {
        display: block;
        font-size: 0.75rem;
    }

    .social-links {
        margin-top: 0.5rem;
    }

    .social-links a {
        margin-right: 0.75rem !important;
        font-size: 0.9rem;
    }

    /* Navbar мобільне меню */
    .navbar-brand img {
        height: 35px;
    }

    .navbar-brand .brand-text {
        font-size: 0.9rem;
    }

    .navbar-toggler {
        border: 2px solid var(--vinno-green);
        padding: 0.25rem 0.5rem;
        font-size: 1.1rem;
        border-radius: 6px;
        background-color: transparent;
        transition: all 0.3s ease;
    }

    .navbar-toggler:hover {
        background-color: rgba(68, 179, 64, 0.1);
        border-color: var(--vinno-green);
    }

    .navbar-toggler:focus {
        box-shadow: 0 0 0 3px rgba(68, 179, 64, 0.3);
        border-color: var(--vinno-green);
    }

    .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='%2344b340' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
        transition: transform 0.3s ease;
    }

    .navbar-toggler:not(.collapsed) .navbar-toggler-icon {
        transform: rotate(90deg);
    }

    .navbar-nav {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid #333;
        width: 100%;
    }

    .navbar-nav .nav-item {
        margin-bottom: 0.25rem;
        width: 100%;
    }

    .navbar-nav .nav-link {
        padding: 0.875rem 1rem !important;
        font-size: 1.1rem;
        font-weight: 500;
        border-left: 3px solid transparent;
        transition: all 0.3s ease;
        border-radius: 0 8px 8px 0;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link.active {
        border-left-color: var(--vinno-green);
        background-color: rgba(68, 179, 64, 0.1);
        color: var(--vinno-green);
    }

    .navbar-nav .nav-link.dropdown-toggle {
        position: relative;
    }

    .navbar-nav .nav-link.dropdown-toggle::after {
        position: absolute;
        right: 1rem;
        border: none;
        content: "\f107";
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        font-size: 0.9rem;
        transition: transform 0.3s ease;
    }

    /* Dropdown меню на мобільних */
    .navbar-nav .dropdown-menu {
        background-color: #1a1a1a;
        border: none;
        border-radius: 0;
        margin-top: 0;
        margin-left: 1rem;
        box-shadow: none;
        position: static !important;
        transform: none !important;
        width: calc(100% - 1rem);
        float: none;
        display: none;
    }

    .navbar-nav .dropdown-menu.show {
        display: block;
        animation: slideDown 0.3s ease-out;
    }

    .dropdown-item {
        color: var(--vinno-light);
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
        border-left: 3px solid transparent;
        transition: all 0.3s ease;
    }

    .dropdown-item:hover,
    .dropdown-item:focus {
        background-color: rgba(68, 179, 64, 0.1);
        color: var(--vinno-green);
        border-left-color: var(--vinno-green);
    }

    .dropdown-divider {
        border-color: #333;
        margin: 0.5rem 0;
    }

    .dropdown-toggle::after {
        transition: transform 0.3s ease;
    }

    .dropdown-toggle[aria-expanded="true"]::after {
        transform: rotate(180deg);
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            max-height: 0;
        }
        to {
            opacity: 1;
            max-height: 300px;
        }
    }

    /* Мобільні кнопки дій в навігації */
    .navbar-nav .navbar-nav {
        margin-top: 1.5rem;
        padding-top: 1rem;
        border-top: 1px solid #333;
        text-align: center;
    }

    .navbar-nav .navbar-nav .btn {
        width: 100%;
        margin-bottom: 0.75rem;
        padding: 0.875rem 1rem;
        font-size: 1rem;
        font-weight: 600;
        border-radius: 8px;
    }

    .navbar-nav .navbar-nav .btn-outline-danger {
        border-color: #dc3545;
        color: #dc3545;
    }

    .navbar-nav .navbar-nav .btn-outline-danger:hover {
        background-color: #dc3545;
        border-color: #dc3545;
        color: white;
    }

    .navbar-nav .navbar-nav .btn-vinno-primary {
        background: linear-gradient(135deg, var(--vinno-green) 0%, #2d8e3a 100%);
        border: none;
        color: white;
        box-shadow: 0 2px 8px rgba(68, 179, 64, 0.3);
    }

    .navbar-nav .navbar-nav .btn-vinno-primary:hover {
        background: linear-gradient(135deg, #2d8e3a 0%, var(--vinno-green) 100%);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(68, 179, 64, 0.4);
    }

    /* === HERO СЕКЦІЯ === */
    .hero-section {
        padding: 3rem 0;
        text-align: center;
    }

    .hero-title {
        font-size: 2.2rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
        line-height: 1.5;
    }

    .hero-video {
        margin-bottom: 2rem;
    }

    .hero-video video {
        max-height: 250px !important;
        border-radius: 12px;
    }

    /* === PRODUCTS GRID === */
    .products-catalog .filter-buttons {
        margin-bottom: 2rem;
    }

    .filter-btn {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
        margin: 0.25rem;
        white-space: nowrap;
    }

    .product-card {
        margin-bottom: 1.5rem;
        border-radius: 12px;
        overflow: hidden;
    }

    .product-card .card-img-top {
        height: 200px;
        object-fit: cover;
    }

    .product-category-badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
        top: 8px;
        left: 8px;
    }

    .featured-badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
        top: 8px;
        right: 8px;
    }

    .product-title {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }

    .product-model {
        font-size: 0.8rem;
    }

    .product-description {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    .features-title {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    .features-list {
        font-size: 0.85rem;
    }

    .features-list li {
        margin-bottom: 0.25rem;
        padding: 0.25rem 0;
    }

    .spec-item {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }

    .spec-item i {
        width: 16px;
    }

    /* === SINGLE PRODUCT PAGE === */
    .product-gallery .main-image {
        margin-bottom: 1.5rem;
    }

    .product-gallery .main-image img {
        border-radius: 12px;
    }

    .thumbnail-gallery {
        margin-bottom: 2rem;
    }

    .thumbnail-gallery .thumbnail {
        border-radius: 8px;
        cursor: pointer;
        transition: transform 0.2s ease;
    }

    .thumbnail-gallery .thumbnail:hover {
        transform: scale(1.05);
    }

    .product-info {
        padding-top: 1rem;
    }

    .product-summary .lead {
        font-size: 1rem;
        line-height: 1.5;
    }

    .key-features .feature-list {
        columns: 1;
        column-gap: 0;
    }

    .key-features .feature-list li {
        margin-bottom: 0.75rem;
        break-inside: avoid;
        padding: 0.5rem;
        background: rgba(68, 179, 64, 0.05);
        border-radius: 6px;
        border-left: 3px solid var(--vinno-green);
    }

    .product-actions .btn {
        width: 100%;
        margin-bottom: 0.75rem;
        padding: 0.75rem;
        font-size: 1rem;
    }

    /* === ТЕХНОЛОГІЇ СЕКЦІЯ === */
    .technologies-grid .technology-card {
        margin-bottom: 1.5rem;
        padding: 1.5rem;
        text-align: center;
    }

    .technology-card .technology-icon {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }

    .technology-card h5 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    /* === НОВИНИ === */
    .news-card {
        margin-bottom: 1.5rem;
    }

    .news-card .card-img-top {
        height: 180px;
        object-fit: cover;
    }

    .news-title {
        font-size: 1.1rem;
        line-height: 1.3;
    }

    .news-excerpt {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    /* === КОНТАКТИ === */
    .contact-info-card {
        margin-bottom: 1.5rem;
        padding: 1.5rem;
        text-align: center;
    }

    .contact-info-card .contact-icon {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .contact-form .form-control {
        font-size: 1rem;
        padding: 0.75rem;
        border-radius: 8px;
    }

    .contact-form .btn {
        padding: 0.75rem 2rem;
        font-size: 1rem;
        width: 100%;
    }

    /* === FOOTER === */
    .footer-content {
        text-align: center;
    }

    .footer-section {
        margin-bottom: 2rem;
    }

    .footer-section h5 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .footer-links a {
        font-size: 0.9rem;
        padding: 0.25rem 0;
    }

    .footer-social .social-link {
        margin: 0 0.75rem;
        font-size: 1.25rem;
    }

    .footer-bottom {
        text-align: center;
        font-size: 0.8rem;
        padding: 1rem 0;
    }
}

/* === МАЛЕНЬКІ МОБІЛЬНІ ПРИСТРОЇ (max-width: 575.98px) === */
@media (max-width: 575.98px) {

    /* Загальні налаштування */
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    /* Заголовки */
    .hero-title {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }

    .page-title {
        font-size: 2rem;
    }

    /* Відступи */
    .section-padding {
        padding: 2.5rem 0;
    }

    /* Хедер */
    .top-contact-bar {
        display: none; /* Приховуємо на дуже маленьких екранах */
    }

    .navbar-brand img {
        height: 30px;
    }

    /* Hero секція */
    .hero-video video {
        max-height: 200px !important;
    }

    /* Кнопки */
    .btn {
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }

    .btn-lg {
        font-size: 1rem;
        padding: 0.75rem 1.25rem;
    }

    /* Фільтри продуктів */
    .filter-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }

    .filter-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
        flex: 0 0 auto;
    }

    /* Картки продуктів */
    .product-card .card-img-top {
        height: 180px;
    }

    .product-title {
        font-size: 1.1rem;
    }

    .product-description {
        font-size: 0.85rem;
    }

    .features-list {
        font-size: 0.8rem;
    }

    /* Модальні вікна */
    .modal-dialog {
        margin: 1rem;
    }

    .modal-header {
        padding: 1rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-footer {
        padding: 1rem;
    }

    /* Форми */
    .form-control {
        font-size: 16px; /* Запобігає зумуванню на iOS */
    }

    /* Таблиці */
    .table-responsive {
        font-size: 0.8rem;
    }

    /* Breadcrumb */
    .breadcrumb {
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }

    /* Пагінація */
    .pagination {
        justify-content: center;
    }

    .page-link {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
    }
}

/* === LANDSCAPE ОРІЄНТАЦІЯ НА МОБІЛЬНИХ === */
@media (max-width: 767.98px) and (orientation: landscape) {
    .hero-section {
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    .section-padding {
        padding: 3rem 0;
    }

    .top-contact-bar {
        display: none;
    }
}

/* === ДОДАТКОВІ УТИЛІТИ ДЛЯ МОБІЛЬНИХ === */
@media (max-width: 767.98px) {

    /* Приховати на мобільних */
    .d-mobile-none {
        display: none !important;
    }

    /* Показати тільки на мобільних */
    .d-mobile-block {
        display: block !important;
    }

    .d-mobile-flex {
        display: flex !important;
    }

    /* Текстові утиліти */
    .text-mobile-center {
        text-align: center !important;
    }

    .text-mobile-left {
        text-align: left !important;
    }

    /* Відступи */
    .mb-mobile-3 {
        margin-bottom: 1rem !important;
    }

    .mb-mobile-4 {
        margin-bottom: 1.5rem !important;
    }

    .mt-mobile-3 {
        margin-top: 1rem !important;
    }

    .p-mobile-2 {
        padding: 0.5rem !important;
    }

    .p-mobile-3 {
        padding: 1rem !important;
    }

    /* Висота та ширина */
    .w-mobile-100 {
        width: 100% !important;
    }

    .mh-mobile-auto {
        max-height: none !important;
    }
}

/* === ПОКРАЩЕННЯ ДОСТУПНОСТІ === */
@media (max-width: 767.98px) {

    /* Збільшуємо зони натискання */
    .btn, .nav-link, .dropdown-item {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    /* Покращуємо контрастність */
    .text-muted {
        color: #bbb !important;
    }

    /* Робимо фокус більш помітним */
    .btn:focus,
    .form-control:focus,
    .nav-link:focus {
        box-shadow: 0 0 0 3px rgba(68, 179, 64, 0.3);
        outline: none;
    }
}

/* === АНІМАЦІЇ ДЛЯ МОБІЛЬНИХ === */
@media (max-width: 767.98px) {

    /* Швидші анімації на мобільних */
    * {
        transition-duration: 0.2s !important;
    }

    /* Smooth scroll */
    html {
        scroll-behavior: smooth;
    }

    /* Fade in анімація для карток */
    .product-card,
    .news-card,
    .technology-card {
        animation: mobileSlideInUp 0.6s ease-out;
    }

    @keyframes mobileSlideInUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* === FIXED ELEMENTS НА МОБІЛЬНИХ === */
@media (max-width: 767.98px) {

    /* Sticky navigation */
    .navbar {
        position: sticky;
        top: 0;
        z-index: 1030;
        backdrop-filter: blur(10px);
        background-color: rgba(16, 16, 17, 0.95) !important;
    }

    /* Floating action button */
    .fab-mobile {
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background-color: var(--vinno-green);
        color: white;
        border: none;
        font-size: 1.5rem;
        box-shadow: 0 4px 12px rgba(68, 179, 64, 0.4);
        z-index: 1000;
        transition: all 0.3s ease;
    }

    .fab-mobile:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 16px rgba(68, 179, 64, 0.6);
    }
}
