/* ======================================================
   АДАПТАЦИЯ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ (mobile.css)
   ====================================================== */

/* ===== ПЛАНШЕТЫ (до 1024px) ===== */
@media (max-width: 1024px) {
    .container {
        max-width: 960px;
    }
    
    .hero h1 {
        font-size: 42px;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    #halls .container > div {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

/* ===== МАЛЕНЬКИЕ ПЛАНШЕТЫ И ТЕЛЕФОНЫ (до 768px) ===== */
@media (max-width: 768px) {
    section {
        padding: 50px 0;
    }
    
    .container {
        padding: 0 16px;
    }
    
    .header {
        height: 60px;
        padding: 0;
    }
    
    .header .container {
        gap: 10px;
        padding: 0 12px;
    }
    
    .logo-text {
        font-size: 14px;
    }
    
    .logo-avatar {
        width: 32px;
        height: 32px;
    }
    
    .nav-links a {
        font-size: 11px;
    }
    
    .phone-link {
        font-size: 11px;
        padding: 2px 10px;
    }
    
    .hero {
        height: 80vh;
        min-height: 500px;
    }
    
    .hero h1 {
        font-size: 28px;
        line-height: 1.2;
    }
    
    .hero p {
        font-size: 15px;
        margin-bottom: 20px;
    }
    
    .hero-content {
        padding: 15px;
    }
    
    .btn-primary {
        font-size: 14px;
        padding: 12px 28px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .section-subtitle {
        font-size: 15px;
        margin-bottom: 30px;
    }
    
    .bubble {
        width: 70px;
        height: 70px;
        font-size: 9px;
        padding: 8px;
    }
    
    .bubble::before {
        top: 4px;
        left: 10%;
        width: 35%;
        height: 20%;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .feature-card {
        padding: 20px;
        aspect-ratio: auto;
    }
    
    .coaches-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    
    .coach-photo {
        width: 120px;
        height: 120px;
    }
    
    .coach-name {
        font-size: 18px;
    }
    
    .about-text p {
        font-size: 15px;
        text-align: justify;
    }
    
    .about-highlight {
        padding: 20px;
    }
    
    .about-highlight blockquote {
        font-size: 17px;
        padding-left: 15px;
    }
    
    #halls .container > div {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    #map {
        height: 350px;
        position: relative;
        top: 0;
    }
    
    #hallSelect {
        font-size: 15px;
        padding: 12px;
    }
    
    #hallInfo {
        padding: 20px;
    }
    
    #hallName {
        font-size: 22px;
    }
    
    #hallSchedule {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .founder-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 25px;
    }
    
    .founder-name {
        font-size: 26px;
    }
    
    .founder-image img {
        max-width: 200px;
        margin: 0 auto;
        display: block;
    }
    
    .founder-list li {
        font-size: 14px;
    }
    
    .form-section {
        padding: 30px 20px;
    }
    
    .form-section .section-title {
        font-size: 24px;
    }
    
    input {
        padding: 12px;
        font-size: 15px;
    }
    
    .footer {
        padding: 25px 0;
        font-size: 12px;
    }
    
    .footer .container {
        padding: 0 12px;
    }
    
    .footer a {
        font-size: 11px !important;
    }
    
    .card img {
        height: 150px;
    }
    
    .popup-content {
        width: 95%;
        padding: 12px;
    }
    
    .popup-slide img {
        max-height: none;
    }
    
    .popup-prev,
    .popup-next {
        width: 32px;
        height: 32px;
        font-size: 20px;
    }
    
    .popup-slide img {
        width: 100%;
        height: auto;
        aspect-ratio: 4 / 5;
        object-fit: cover;
        display: block;
    }
}

/* ===== МАЛЕНЬКИЕ ТЕЛЕФОНЫ (до 480px) ===== */
@media (max-width: 480px) {
    .header {
        height: 54px;
    }
    
    .logo-text {
        font-size: 12px;
    }
    
    .logo-avatar {
        width: 28px;
        height: 28px;
    }
    
    .nav-links a {
        font-size: 10px;
    }
    
    .phone-link {
        font-size: 10px;
        padding: 1px 8px;
    }
    
    .hero {
        height: 70vh;
        min-height: 400px;
    }
    
    .hero h1 {
        font-size: 24px;
    }
    
    .hero p {
        font-size: 13px;
    }
    
    .btn-primary {
        font-size: 13px;
        padding: 10px 22px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .bubble {
        width: 56px;
        height: 56px;
        font-size: 8px;
        padding: 6px;
    }
    
    .coaches-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .coach-photo {
        width: 100px;
        height: 100px;
    }
    
    #hallSchedule {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .about-text p {
        font-size: 14px;
    }
    
    .about-highlight blockquote {
        font-size: 15px;
    }
    
    .form-section .section-title {
        font-size: 20px;
    }
    
    input {
        padding: 10px;
        font-size: 14px;
    }
    
    .popup-slide img {
        width: 100%;
        height: auto;
        aspect-ratio: 4 / 5;
        object-fit: cover;
        display: block;
    }
}

/* ===== ОЧЕНЬ МАЛЕНЬКИЕ ЭКРАНЫ (до 360px) ===== */
@media (max-width: 360px) {
    .header {
        height: 48px;
    }
    
    .logo-text {
        font-size: 10px;
    }
    
    .logo-avatar {
        width: 24px;
        height: 24px;
    }
    
    .nav-links a {
        font-size: 9px;
    }
    
    .phone-link {
        font-size: 9px;
        padding: 1px 6px;
    }
    
    .hero h1 {
        font-size: 20px;
    }
    
    .hero p {
        font-size: 12px;
    }
    
    .btn-primary {
        font-size: 12px;
        padding: 8px 18px;
    }
    
    .section-title {
        font-size: 20px;
    }
}

/* ===== АДАПТАЦИЯ ПРЕВЬЮШЕК НА МОБИЛЬНЫХ ===== */
@media (max-width: 768px) {
    .card {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .card img {
        width: 100%;
        height: auto;
        aspect-ratio: 4 / 5;
        object-fit: cover;
        display: block;
    }
}

@media (max-width: 480px) {
    .card {
        max-width: 100%;
    }
}

/* ===== БУРГЕР-МЕНЮ (МАКСИМАЛЬНЫЙ ПРИОРИТЕТ) ===== */
.burger {
    display: none !important;
    flex-direction: column !important;
    cursor: pointer !important;
    gap: 5px !important;
    padding: 10px 5px !important;
    z-index: 1001 !important;
}

.burger span {
    display: block !important;
    width: 28px !important;
    height: 3px !important;
    background: #fff !important;
    border-radius: 3px !important;
    transition: all 0.3s ease !important;
}

.mobile-actions {
    display: flex;
    align-items: center;  /* Выравнивает кнопки по центру по вертикали */
    gap: 10px;
}

.phone-link {
    display: flex !important; /* Делаем кнопку гибкой */
    align-items: center !important; /* Центрируем текст по вертикали */
    justify-content: center !important; /* Центрируем текст по горизонтали */
    height: 40px !important; /* Фиксируем высоту */
    padding: 0 16px !important; /* Убираем вертикальные отступы, оставляем только горизонтальные */
    font-size: 14px !important;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.7) 0%, rgba(255, 200, 100, 0.35) 60%, rgba(200, 140, 50, 0.5) 100%) !important;
    border-radius: 30px !important;
    border: 1px solid rgba(255, 215, 100, 0.5) !important;
    box-shadow: inset 0 -12px 30px rgba(0, 0, 0, 0.5), inset 0 8px 20px rgba(255, 255, 255, 0.3), 0 15px 40px rgba(0, 0, 0, 0.5), 0 0 60px rgba(137, 110, 233, 0.25) !important;
    color: #fff !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important; /* Чтобы padding не увеличивал общий размер */
}

.mobile-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 40px !important; /* Такая же высота, как у .phone-link */
    padding: 0 16px !important; /* Такие же отступы */
    font-size: 14px !important; /* Такой же размер шрифта */
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.7) 0%, rgba(255, 200, 100, 0.35) 60%, rgba(200, 140, 50, 0.5) 100%) !important;
    border-radius: 30px !important;
    border: 1px solid rgba(255, 215, 100, 0.5) !important;
    box-shadow: inset 0 -12px 30px rgba(0, 0, 0, 0.5), inset 0 8px 20px rgba(255, 255, 255, 0.3), 0 15px 40px rgba(0, 0, 0, 0.5), 0 0 60px rgba(137, 110, 233, 0.25) !important;
    color: #fff !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
}

    .burger {
        display: flex !important;
    }
    
    .mobile-actions {
        display: flex !important;
    }
    
    .header .container .nav-links#navLinks {
        display: none !important;
        position: absolute !important;
        top: 70px !important;
        left: 0 !important;
        width: 100% !important;
        background: rgba(0, 0, 0, 0.35) !important;
        backdrop-filter: blur(10px) !important;
        flex-direction: column !important;
        padding: 20px !important;
        gap: 0 !important;
        text-align: center !important;
        border-top: 1px solid rgba(255,255,255,0.1) !important;
        z-index: 9999 !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
    }
    
    .header .container .nav-links#navLinks.open {
        display: flex !important;
        flex-direction: column !important;
    }
    
    .header .container .nav-links#navLinks a {
        display: block !important;
        font-size: 18px !important;
        padding: 15px 0 !important;
        border-bottom: 1px solid rgba(255,255,255,0.05) !important;
        text-align: center !important;
        color: #fff !important;
        text-decoration: none !important;
        transition: background 0.2s !important;
    }
    
    .header .container .nav-links#navLinks a:hover {
        background: rgba(255,255,255,0.05) !important;
    }
    
    .header .container .nav-links#navLinks a:last-child {
        border-bottom: none !important;
    }
/* ===== ФИНАЛЬНОЕ ПРАВИЛО ДЛЯ БУРГЕРА (САМОЕ СИЛЬНОЕ) ===== */
html body .header .container .nav-links#navLinks.open {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
}
/* ===== ПРИНУДИТЕЛЬНОЕ ОТОБРАЖЕНИЕ МЕНЮ ===== */
#navLinks.open {
    display: flex !important;
    flex-direction: column !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
}