/* Базовые стили для навигации */
.nav-toggle {
    display: none;
}

.nav__list {
    display: flex;
    gap: 30px;
}

/* Большие экраны (до 1200px) */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }

    .features__inner {
        grid-template-columns: repeat(2, 1fr);
    }

    .reviews__inner {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Планшеты (до 992px) */
@media (max-width: 992px) {
    .container {
        max-width: 720px;
    }

    .hero__inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero__content {
        max-width: 100%;
        margin-bottom: 40px;
    }

    .hero__image {
        max-width: 400px;
        margin: 0 auto;
        aspect-ratio: 3/4;
    }

    .footer__inner {
        grid-template-columns: 1fr 1fr;
    }

    .contact-info__inner {
        grid-template-columns: 1fr;
    }

    .contact-info__map {
        height: 300px;
    }

    .gallery__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .about__inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about__image {
        max-width: 400px;
        margin: 0 auto;
    }

    .about__content {
        text-align: center;
    }

    .media-grid__inner {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Малые планшеты (до 768px) */
@media (max-width: 768px) {
    .container {
        max-width: 540px;
    }

    /* Предотвращаем горизонтальный скролл */
    body {
        overflow-x: hidden;
    }

    /* Фиксим контейнер на мобильных */
    .container {
        width: 100%;
        padding: 0 15px;
        overflow: hidden;
    }

    .header__inner {
        height: 70px;
        position: relative;
        padding: 0 15px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .logo {
        order: 0;
    }

    .nav {
        order: 1;
        position: relative;
        z-index: 1010;
    }

    .nav-toggle {
        display: block;
        width: 30px;
        height: 24px;
        position: relative;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1011;
    }

    .nav-toggle__line {
        position: absolute;
        width: 100%;
        height: 2px;
        background: var(--primary-color);
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        transition: all 0.3s ease;
    }

    .nav-toggle__line::before,
    .nav-toggle__line::after {
        content: '';
        position: absolute;
        width: 100%;
        height: 2px;
        background: var(--primary-color);
        left: 0;
        transition: all 0.3s ease;
    }

    .nav-toggle__line::before {
        top: -8px;
    }

    .nav-toggle__line::after {
        bottom: -8px;
    }

    .nav-toggle.active .nav-toggle__line {
        background: transparent;
    }

    .nav-toggle.active .nav-toggle__line::before {
        top: 0;
        transform: rotate(45deg);
    }

    .nav-toggle.active .nav-toggle__line::after {
        bottom: 0;
        transform: rotate(-45deg);
    }

    .nav__list {
        position: absolute;
        top: 100%;
        right: -15px;
        width: 100vw;
        background: white;
        padding: 0;
        box-shadow: var(--shadow);
        flex-direction: column;
        gap: 0;
        z-index: 1010;
        position: fixed;
        top: 70px;
        right: 0;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: all 0.3s ease;
        pointer-events: none;
    }

    .nav__list.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }

    .nav__item {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }

    .nav__link {
        display: block;
        padding: 15px 20px;
        text-align: center;
        transition: all 0.3s ease;
    }

    .nav__link:hover,
    .nav__link--active {
        background: var(--light-bg);
        color: var(--accent-color);
    }

    .nav__link:after {
        display: none;
    }

    .features__inner,
    .reviews__inner {
        grid-template-columns: 1fr;
    }

    .page-title {
        font-size: 36px;
    }

    .page-description {
        font-size: 16px;
    }

    .footer__inner {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    /* Центрирование элементов */
    .section-title,
    .page-title,
    .page-description,
    .hero__title,
    .hero__subtitle,
    .hero__text,
    .feature-card,
    .service-card,
    .review-card,
    .telegram-bot__title,
    .telegram-bot__text {
        text-align: center;
    }

    .feature-card,
    .service-card,
    .review-card {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* Улучшенное центрирование текста */
    .hero__content,
    .section__content,
    .feature-card__content,
    .service-card__content,
    .review-card__content {
        text-align: center;
        margin: 0 auto;
    }

    .hero__title,
    .hero__subtitle,
    .hero__text {
        margin-left: auto;
        margin-right: auto;
        max-width: 90%;
    }

    .page-header {
        padding: 100px 15px 60px;
    }

    .page-title,
    .page-description {
        margin-left: auto;
        margin-right: auto;
        max-width: 90%;
    }

    /* Улучшенное центрирование для первого блока */
    .hero {
        text-align: center;
        padding: 120px 0 60px;
    }

    .hero__content {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: 100%;
    }

    .hero__title,
    .hero__subtitle,
    .hero__text {
        width: 100%;
        max-width: 540px;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

    .hero__buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px;
        width: 100%;
        max-width: 300px;
        margin: 30px auto 0;
    }

    .hero__button {
        width: 100%;
    }

    .timeline {
        margin-left: 0;
        padding-left: 40px;
    }

    .timeline__item {
        padding-left: 30px;
    }

    .timeline__date {
        position: relative;
        left: auto;
        top: auto;
        width: auto;
        display: inline-block;
        font-size: 13px;
        margin-bottom: 10px;
    }

    .timeline__content {
        margin-right: 0;
    }

    .media-filter__btn {
        padding: 8px 16px;
        font-size: 14px;
    }
}

/* Мобильные устройства (до 576px) */
@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }

    .header__inner {
        padding: 0 10px;
    }

    .logo__text {
        font-size: 18px;
    }

    .hero {
        padding: 100px 0 50px;
    }

    .hero__title {
        font-size: 32px;
        line-height: 1.3;
    }

    .hero__subtitle {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .hero__text {
        font-size: 16px;
        padding: 0 15px;
    }

    .section-title {
        font-size: 28px;
    }

    .feature-card,
    .service-card,
    .review-card {
        padding: 20px;
    }

    .contact-info__item {
        padding: 15px;
    }

    .telegram-bot__inner {
        padding: 30px 20px;
    }

    .btn {
        width: 100%;
    }

    .review-form,
    .contact-form {
        padding: 20px;
    }

    .hero__image {
        max-width: 300px;
        aspect-ratio: 1/1;
    }

    .gallery__grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .gallery__item {
        aspect-ratio: 16/9;
    }

    .timeline {
        padding-left: 30px;
    }

    .timeline__content {
        padding: 15px;
    }

    .timeline__title {
        font-size: 16px;
    }

    .timeline__text {
        font-size: 14px;
    }

    .timeline__date {
        font-size: 12px;
        padding: 4px 8px;
    }

    .about__title {
        font-size: 28px;
    }

    .about__text {
        font-size: 16px;
    }

    .media-grid__inner {
        grid-template-columns: 1fr;
    }

    .media-card__title {
        font-size: 18px;
    }
}

/* Очень маленькие экраны (до 375px) */
@media (max-width: 375px) {
    .hero__title {
        font-size: 28px;
    }

    .hero__subtitle {
        font-size: 16px;
    }

    .hero__text {
        font-size: 14px;
    }

    .logo__text {
        font-size: 20px;
    }

    .page-title {
        font-size: 28px;
    }

    .footer {
        padding: 40px 0 20px;
    }
} 