/**
 * ПРОФЕССИОНАЛЬНЫЙ МОБИЛЬНЫЙ ДИЗАЙН
 * Ramada Encore By Wyndham Bukhara
 */

/* ============================================
   БАЗОВЫЕ МОБИЛЬНЫЕ ОПТИМИЗАЦИИ
   ============================================ */

@media (max-width: 768px) {
    /* Убираем горизонтальную прокрутку */
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }

    /* Улучшенное касание */
    * {
        -webkit-tap-highlight-color: rgba(212, 175, 55, 0.2);
        -webkit-touch-callout: none;
    }

    /* НАВИГАЦИЯ */
    .navbar {
        height: 65px !important;
        padding: 0 15px !important;
    }

    .nav-container {
        height: 65px !important;
        padding: 0 10px !important;
    }

    .logo {
        max-width: 140px !important;
        height: auto !important;
    }

    /* ГАМБУРГЕР МЕНЮ */
    .hamburger {
        display: flex !important;
        width: 28px;
        height: 22px;
        flex-direction: column;
        justify-content: space-between;
        cursor: pointer;
        z-index: 1001;
        position: relative;
        padding: 5px;
        order: 10;
    }

    .hamburger span {
        display: block !important;
        width: 100%;
        height: 2.5px;
        background-color: #2c2c2c !important;
        border-radius: 3px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Анимация гамбургера */
    .hamburger.active span:nth-child(1) {
        transform: translateY(9.75px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
        transform: translateX(-10px);
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-9.75px) rotate(-45deg);
    }

    /* Скрываем desktop элементы */
    .weather-header,
    .language-switcher {
        display: none !important;
    }

    /* МОБИЛЬНОЕ МЕНЮ */
    .nav-menu {
        position: fixed !important;
        top: 65px !important;
        right: -100% !important;
        width: 90% !important;
        max-width: 350px !important;
        height: calc(100vh - 65px) !important;
        background: linear-gradient(135deg, #ffffff 0%, #faf8f3 100%) !important;
        box-shadow: -8px 0 30px rgba(0, 0, 0, 0.15) !important;
        flex-direction: column !important;
        padding: 30px 0 !important;
        overflow-y: auto !important;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
        z-index: 1000 !important;
        border-left: 1px solid rgba(212, 175, 55, 0.2) !important;
    }

    .nav-menu.active {
        right: 0 !important;
    }

    /* Элементы меню */
    .nav-item {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border-bottom: 1px solid rgba(212, 175, 55, 0.08);
    }

    .nav-item:last-child {
        border-bottom: none;
    }

    .nav-link {
        display: flex !important;
        align-items: center !important;
        gap: 15px !important;
        padding: 18px 25px !important;
        font-size: 1.05rem !important;
        font-weight: 500 !important;
        color: #2c2c2c !important;
        text-decoration: none !important;
        border-left: 4px solid transparent !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        position: relative !important;
    }

    .nav-link::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        height: 100%;
        width: 0;
        background: linear-gradient(90deg, rgba(212, 175, 55, 0.12), transparent);
        transition: width 0.3s ease;
    }

    .nav-link:hover::before,
    .nav-link.active::before {
        width: 100%;
    }

    .nav-link:hover,
    .nav-link.active {
        border-left-color: #d4af37 !important;
        color: #d4af37 !important;
        background: rgba(212, 175, 55, 0.08) !important;
    }

    .mobile-icon {
        font-size: 1.3rem !important;
        min-width: 24px !important;
    }

    /* OVERLAY */
    .mobile-menu-overlay {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        background: rgba(0, 0, 0, 0) !important;
        backdrop-filter: blur(0px) !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        z-index: 999 !important;
    }

    .mobile-menu-overlay.active {
        background: rgba(0, 0, 0, 0.6) !important;
        backdrop-filter: blur(5px) !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* БЛОКИРОВКА СКРОЛЛА */
    body.menu-open {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
    }

    /* HERO SECTION */
    .hero {
        height: 70vh !important;
        min-height: 500px !important;
        padding-top: 65px !important;
    }

    .hero-overlay {
        background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.5) 0%,
            rgba(0, 0, 0, 0.3) 50%,
            rgba(0, 0, 0, 0.6) 100%
        ) !important;
    }

    /* Скрываем форму поиска на главной странице */
    #heroSearchForm,
    .booking-search {
        display: none !important;
    }

    .hero-content {
        padding: 40px 20px !important;
        text-align: center !important;
    }

    .hero-title {
        font-size: 2rem !important;
        line-height: 1.2 !important;
        margin-bottom: 15px !important;
    }

    .hero-subtitle {
        font-size: 1.05rem !important;
        margin-bottom: 20px !important;
        opacity: 0.95 !important;
    }

    .hero-location {
        font-size: 0.95rem !important;
        margin-bottom: 25px !important;
    }

    .hero-buttons {
        flex-direction: column !important;
        gap: 12px !important;
        align-items: stretch !important;
    }

    .luxury-btn,
    .luxury-btn-outline {
        width: 100% !important;
        max-width: 280px !important;
        margin: 0 auto !important;
        padding: 14px 20px !important;
        font-size: 1rem !important;
        justify-content: center !important;
    }

    /* СЕКЦИИ */
    section {
        padding: 60px 0 !important;
    }

    .section-title {
        font-size: 2rem !important;
        margin-bottom: 15px !important;
    }

    .section-subtitle {
        font-size: 1rem !important;
        margin-bottom: 40px !important;
        padding: 0 15px !important;
    }

    /* КАРТОЧКИ */
    .service-card,
    .room-card,
    .amenity-card {
        margin-bottom: 20px !important;
    }

    .service-card {
        padding: 25px 20px !important;
    }

    .service-icon {
        font-size: 2.5rem !important;
        margin-bottom: 15px !important;
    }

    .service-title {
        font-size: 1.3rem !important;
        margin-bottom: 10px !important;
    }

    .service-description {
        font-size: 0.95rem !important;
    }

    /* КОМНАТЫ */
    .room-card {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    }

    .room-image {
        height: 240px !important;
    }

    .room-content {
        padding: 20px !important;
    }

    .room-title {
        font-size: 1.4rem !important;
        margin-bottom: 10px !important;
    }

    .room-price {
        font-size: 1.5rem !important;
    }

    .room-features {
        gap: 8px !important;
        margin: 15px 0 !important;
    }

    .room-feature {
        font-size: 0.9rem !important;
        padding: 8px 12px !important;
    }

    /* ФУТЕР */
    .footer {
        padding: 40px 0 20px !important;
    }

    .footer-content {
        flex-direction: column !important;
        gap: 35px !important;
    }

    .footer-section {
        width: 100% !important;
        text-align: center !important;
    }

    .footer-section h3 {
        font-size: 1.3rem !important;
        margin-bottom: 15px !important;
    }

    .footer-links {
        flex-direction: column !important;
        gap: 8px !important;
        align-items: center !important;
    }

    .social-links {
        justify-content: center !important;
        gap: 15px !important;
    }

    .social-link {
        width: 45px !important;
        height: 45px !important;
        font-size: 1.3rem !important;
    }

    /* CONTACT FORM */
    .contact-form {
        padding: 25px 20px !important;
    }

    .form-group {
        margin-bottom: 20px !important;
    }

    .form-input,
    .form-textarea {
        font-size: 1rem !important;
        padding: 12px 15px !important;
    }

    .form-textarea {
        min-height: 140px !important;
    }

    /* МОДАЛЬНЫЕ ОКНА */
    .modal-content {
        width: 95% !important;
        max-width: 95% !important;
        margin: 20px auto !important;
        padding: 25px 20px !important;
        max-height: 85vh !important;
    }

    .modal-header h2 {
        font-size: 1.5rem !important;
    }

    .modal-close {
        width: 35px !important;
        height: 35px !important;
        font-size: 1.5rem !important;
    }

    /* BOOKING FORM */
    .booking-form-group {
        margin-bottom: 18px !important;
    }

    .booking-summary {
        padding: 20px 15px !important;
        margin-top: 25px !important;
    }

    /* ГАЛЕРЕЯ */
    .gallery-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .gallery-item {
        height: 250px !important;
    }

    /* REVIEWS */
    .review-card {
        padding: 20px !important;
    }

    .review-author {
        font-size: 1.1rem !important;
    }

    .review-text {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
    }

    /* ANIMATIONS - Отключаем сложные анимации на мобильных */
    * {
        animation-duration: 0.3s !important;
    }

    .fade-in,
    .slide-in-left,
    .slide-in-right,
    .zoom-in {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    /* УТИЛИТЫ */
    .container {
        padding: 0 15px !important;
    }

    .text-center-mobile {
        text-align: center !important;
    }

    .hide-mobile {
        display: none !important;
    }

    .show-mobile {
        display: block !important;
    }

    /* КНОПКИ */
    .btn,
    button {
        min-height: 44px !important; /* Удобный размер для касания */
        font-size: 1rem !important;
    }

    /* SPACING */
    .mb-mobile-20 {
        margin-bottom: 20px !important;
    }

    .mt-mobile-20 {
        margin-top: 20px !important;
    }

    .p-mobile-15 {
        padding: 15px !important;
    }
}

    /* МОБИЛЬНЫЕ ДОПОЛНИТЕЛЬНЫЕ ЭЛЕМЕНТЫ */
    .mobile-menu-cta {
        border-top: 1px solid rgba(0, 0, 0, 0.1);
        padding-top: 15px;
        margin-top: 15px;
    }

    .mobile-book-btn {
        background: #d4af37 !important;
        color: white !important;
        border-radius: 8px !important;
        font-weight: 600 !important;
        justify-content: center !important;
    }

    .mobile-book-btn:hover {
        background: #b8941f !important;
    }

    .language-selector-mobile {
        border-top: 1px solid rgba(0, 0, 0, 0.1);
        padding-top: 15px;
        margin-top: 15px;
    }

    .language-title {
        font-size: 0.85rem;
        color: #666;
        padding: 0 25px 10px;
        text-transform: uppercase;
        letter-spacing: 1px;
    }

    .language-options {
        display: flex;
        gap: 10px;
        padding: 0 25px;
    }

    .language-option {
        flex: 1;
        padding: 10px;
        text-align: center;
        border: 2px solid #e0e0e0;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.3s ease;
        font-weight: 500;
    }

    .language-option:hover,
    .language-option.active {
        border-color: #d4af37;
        background: rgba(212, 175, 55, 0.1);
        color: #d4af37;
    }
}

/* ============================================
   BOOKING FORM FIX
   ============================================ */

@media (max-width: 768px) {
    /* BOOKING WIDGET НА ГЛАВНОЙ */
    .booking-widget {
        position: static !important;
        width: 100% !important;
        margin: 20px 0 !important;
        padding: 0 !important;
    }

    .booking-form {
        padding: 25px 20px !important;
        border-radius: 12px !important;
    }

    .booking-form-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
    }

    .form-group {
        width: 100% !important;
        margin-bottom: 0 !important;
    }

    .form-group label {
        display: block !important;
        margin-bottom: 8px !important;
        font-weight: 500 !important;
        color: #2c2c2c !important;
    }

    .form-group input,
    .form-group select {
        width: 100% !important;
        padding: 12px 15px !important;
        font-size: 16px !important; /* Предотвращает zoom на iOS */
        border: 1px solid #ddd !important;
        border-radius: 8px !important;
        background: white !important;
        color: #2c2c2c !important;
    }

    .form-group input:focus,
    .form-group select:focus {
        outline: none !important;
        border-color: #d4af37 !important;
        box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1) !important;
    }

    .booking-submit-btn {
        width: 100% !important;
        padding: 15px !important;
        font-size: 1rem !important;
        background: #d4af37 !important;
        color: white !important;
        border: none !important;
        border-radius: 8px !important;
        font-weight: 600 !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
    }

    .booking-submit-btn:hover {
        background: #b8941f !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3) !important;
    }

    /* СТРАНИЦА BOOKING */
    .booking-page .booking-form-wrapper {
        padding: 20px 15px !important;
        margin: 0 !important;
    }

    .booking-steps {
        flex-direction: column !important;
        gap: 10px !important;
        margin-bottom: 30px !important;
    }

    .step {
        padding: 12px 15px !important;
    }

    /* ФОРМА КОНТАКТОВ */
    .contact-form {
        padding: 25px 20px !important;
    }

    .contact-form .form-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
    }

    .contact-form .form-group {
        width: 100% !important;
    }

    .contact-form input,
    .contact-form select,
    .contact-form textarea {
        font-size: 16px !important; /* Предотвращает zoom */
        padding: 12px 15px !important;
    }

    .contact-form textarea {
        min-height: 120px !important;
    }
}

/* ============================================
   ДОПОЛНИТЕЛЬНЫЕ ИСПРАВЛЕНИЯ
   ============================================ */

@media (max-width: 480px) {
    .hamburger {
        width: 28px !important;
        height: 22px !important;
    }

    .nav-menu {
        width: 90% !important;
        max-width: 280px !important;
    }

    .nav-link {
        padding: 12px 20px !important;
        font-size: 1rem !important;
    }

    .booking-form {
        padding: 20px 15px !important;
    }

    .form-group input,
    .form-group select {
        padding: 10px 12px !important;
    }
}

/* ============================================
   ИСПРАВЛЕНИЕ КОНТАКТОВ ФУТЕРА
   ============================================ */

.footer-section .contact-item {
    display: flex !important;
    align-items: flex-start !important;
    gap: 10px !important;
    margin-bottom: 15px !important;
    color: rgba(255, 255, 255, 0.9) !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: transparent !important; /* Убираем белый фон */
    border: none !important;
    padding: 0 !important;
}

.footer-section .contact-item i {
    color: var(--primary-gold) !important;
    margin-top: 2px !important;
    width: 16px !important;
    flex-shrink: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 16px !important;
}

.footer-section .contact-item span {
    color: rgba(255, 255, 255, 0.9) !important;
    visibility: visible !important;
    opacity: 1 !important;
    display: inline !important;
    background: transparent !important;
    line-height: 1.6 !important;
}

/* Убедимся, что футер виден */
.footer-section {
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
}

.footer-section h4 {
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
    color: white !important;
    margin-bottom: 25px !important;
}
