/* responsive.css - полная адаптация для всех устройств с фиксом позиционирования project-info */

* {
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

@supports (-webkit-touch-callout: none) {
    .horizontal-track {
        -webkit-overflow-scrolling: touch;
    }
    .photo-wrapper {
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }
}

.horizontal-track,
.photo-wrapper,
.btn-details {
    will-change: transform;
    backface-visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Планшеты (768px - 1024px) — вертикальный скролл */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-card {
        width: 75% !important;
        padding: 2rem !important;
    }
    .hero-logo-img img {
        height: 100px;
    }
    .logo-apollon {
        font-size: 2.5rem;
    }
    .logo-construction {
        font-size: 1.6rem;
    }
    .logo-group {
        font-size: 1.3rem;
    }
    .project-info {
        position: absolute !important;
        bottom: 5% !important;
        left: 5% !important;
        background: linear-gradient(90deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 70%, transparent 100%) !important;
    }
    .project-card {
        position: relative; /* важно */
    }
}

/* Мобильные телефоны (до 768px) */
@media (max-width: 768px) {
    .hero-card {
        padding: 1.5rem !important;
        width: 90% !important;
    }
    .hero-brand {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    .hero-logo-img img {
        height: 60px;
    }
    .hero-logo-stacked {
        text-align: center;
    }
    .logo-apollon {
        font-size: 2rem;
    }
    .logo-construction {
        font-size: 1.3rem;
    }
    .logo-group {
        font-size: 1rem;
    }
    .slogan {
        font-size: 0.65rem;
        letter-spacing: 2px;
    }
    .hero-sub {
        font-size: 0.7rem;
    }
    .btn-group {
        flex-direction: column;
        gap: 0.8rem;
        margin-top: 1.2rem;
    }
    .btn-primary, .btn-outline {
        width: 100%;
        text-align: center;
        padding: 10px 20px;
    }

    /* Вертикальный режим для мобильных */
    .horizontal-section {
        height: auto !important;
        overflow: visible !important;
    }
    .horizontal-track {
        flex-direction: column !important;
        width: 100% !important;
        gap: 2rem !important;
        padding: 1rem !important;
        transform: none !important;
    }
    .project-card {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 80vh !important;
        flex-shrink: 0;
        margin-bottom: 1rem;
        position: relative !important; /* критически важно для project-info */
    }
    .photo-wrapper {
        width: 90% !important;
        height: auto !important;
        aspect-ratio: 9 / 16 !important;
        border-radius: 16px;
    }
    .project-info {
        position: absolute !important;
        bottom: 3% !important;
        left: 3% !important;
        width: auto !important;
        max-width: 70% !important;
        background: linear-gradient(90deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 70%, transparent 100%) !important;
        padding: 0.5rem 1rem !important;
        backdrop-filter: blur(8px) !important;
        z-index: 5 !important;
    }
    .project-info h2 {
        font-size: 0.9rem !important;
        margin-bottom: 0.1rem;
    }
    .project-category-tag {
        font-size: 0.5rem !important;
        padding: 2px 10px !important;
        margin-bottom: 0.3rem;
    }
    .btn-details {
        width: 36px !important;
        height: 36px !important;
        font-size: 1.3rem !important;
        margin-top: 0.3rem !important;
    }
    .stats-card {
        padding: 1.5rem;
        margin: 0 1rem;
        border-radius: 32px;
    }
    .stats-numbers {
        gap: 1.5rem;
    }
    .stat-value {
        font-size: 1.8rem;
    }
    .stat-label {
        font-size: 0.6rem;
    }
    .final-card {
        padding: 1.5rem;
        margin: 0 1rem;
        border-radius: 32px;
    }
    .final-card h2 {
        font-size: 1.2rem;
    }
    .form-group {
        flex-direction: column;
        gap: 0.8rem;
        margin: 1.5rem 0;
    }
    .form-group input,
    .form-group button {
        width: 100%;
        padding: 10px 16px;
    }
    .social-icons {
        gap: 1.5rem;
    }
    .social-icon svg {
        width: 32px;
        height: 32px;
    }
    .contact-phone {
        padding: 5px 14px;
    }
    .contact-phone svg {
        width: 16px;
        height: 16px;
    }
    .contact-phone a {
        font-size: 0.8rem;
    }
    .fixed-logo-mini {
        top: 14px;
        left: 12px;
        padding: 9px 17px;
        font-size: 0.8rem;
    }
    .fixed-logo-mini img {
        height: 14px;
    }
    .modal-content {
        width: 92%;
        max-width: 400px;
        padding: 1.5rem;
        border-radius: 28px;
    }
    .close-modal {
        top: 12px;
        right: 12px;
        width: 32px;
        height: 32px;
        font-size: 24px;
    }
    #modalDynamicContent h3 {
        font-size: 1.3rem;
        padding-right: 25px;
        margin-bottom: 0.8rem;
    }
    #modalDynamicContent p {
        font-size: 0.9rem;
        margin: 1rem 0;
        line-height: 1.4;
    }
    .close-inner {
        padding: 10px 24px !important;
        font-size: 0.9rem !important;
    }
}

/* Очень маленькие телефоны (до 480px) */
@media (max-width: 480px) {
    .hero-card {
        padding: 1.2rem !important;
    }
    .logo-apollon {
        font-size: 1.6rem;
    }
    .logo-construction {
        font-size: 1.1rem;
    }
    .logo-group {
        font-size: 0.9rem;
    }
    .photo-wrapper {
        width: 95% !important;
    }
    .project-info {
        max-width: 80% !important;
    }
    .project-info h2 {
        font-size: 0.8rem !important;
    }
    .stat-value {
        font-size: 1.5rem;
    }
}