/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    scroll-behavior: smooth;
}

/* Отступ для якорных ссылок, чтобы секции не скрывались под фиксированной шапкой */
#services, #about, #reviews, #contact {
    scroll-margin-top: 180px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Шапка */
header {
    background: white;
    color: #333;
    padding: 10px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-right: auto;
    margin-left: -120px;
}

.header-logo-img {
    width: 100px;
    height: 100px;
    object-fit: contain;
}

.header-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.header-logo {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.header-label {
    font-size: 14px;
    color: #666;
}

.header-phone {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: none;
}

.header-address {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.header-email {
    font-size: 13px;
    color: #333;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.header-email:hover {
    text-decoration: underline;
}

.email-icon {
    width: 24px;
    height: 24px;
    vertical-align: middle;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-right: -120px;
}

.header-phone-main {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.phone-icon {
    width: 24px;
    height: 24px;
    vertical-align: middle;
}

.header-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.header-schedule {
    display: flex;
    flex-direction: column;
    font-size: 16px;
    color: black;
    line-height: 1.4;
}

nav {
    margin-top: 10px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 0;
    align-items: center;
    justify-content: center;
}

nav ul li {
    margin-left: 0;
}

nav ul li a {
    color: #1a1a1a;
    text-decoration: none;
    padding: 10px 20px;
    font-weight: 500;
    font-size: 15px;
    border: none;
    outline: none;
    position: relative;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: block;
}

nav ul li a:hover {
    color: #0066cc;
}

/* Герой-секция */
.hero {
    position: relative;
    width: 100%;
    height: 80vh;
    overflow: hidden;
    margin-top: 0;
}

.hero-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 30px;
    padding: 15px 20px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    border-radius: 5px;
}

.slider-btn:hover {
    background: rgba(75, 73, 72, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.slider-btn.prev {
    left: 20px;
}

.slider-btn.next {
    right: 20px;
}

.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 10;
}

.dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.2);
}

.dot.active {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.3);
}

/* Услуги */
.services {
    padding: 80px 100px;
    width: 100%;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 36px;
    color: #1a1a1a;
    margin-bottom: 15px;
}

.section-title p {
    color: #666;
    max-width: 700px;
    margin: 0 auto;
}

/* Swiper слайдер для услуг */
.swiper-container.services-slider {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    height: 500px;
    transition: opacity .6s ease;
    position: relative;
}

.swiper-container.services-slider.swiper-container-coverflow {
    padding: 2% 0 calc(2% + 30px) 0;
}

.swiper-container.services-slider * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.swiper-slide {
    background-position: center;
    background-size: cover;
    position: relative;
}

.swiper-slide .swiper-content {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 95%;
    padding: 20px;
    color: #fff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: transparent;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.swiper-slide .swiper-content .swiper-title {
    font-size: 48px;
    font-weight: 600;
    margin-bottom: auto;
    margin-top: 20px;
    color: #fff;
}

.swiper-slide .swiper-content .swiper-caption {
    display: block;
    font-size: 22px;
    line-height: 1.6;
    color: #f0f0f0;
    margin-bottom: 20px;
}

.swiper-container-horizontal > .swiper-pagination-bullets .swiper-pagination-bullet {
    margin: 0 10px;
    position: relative;
    z-index: 3;
    width: 12px;
    height: 12px;
    background-color: #007bff;
    opacity: .5;
    transition: all .3s ease;
}

.swiper-container-horizontal > .swiper-pagination-bullets .swiper-pagination-bullet::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    transform: translate(-50%, -50%);
    border: 1px solid #007bff;
    border-radius: 50%;
}

.swiper-container-horizontal > .swiper-pagination-bullets .swiper-pagination-bullet:hover,
.swiper-container-horizontal > .swiper-pagination-bullets .swiper-pagination-bullet.swiper-pagination-bullet-active {
    opacity: 1;
}

/* Стрелки навигации */
.services-slider .swiper-button-prev,
.services-slider .swiper-button-next {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    width: auto;
    height: auto;
    padding: 15px 20px;
    border-radius: 5px;
    transition: all 0.3s ease;
    top: 50%;
    transform: translateY(-50%);
}

.services-slider .swiper-button-prev {
    left: -70px;
}

.services-slider .swiper-button-next {
    right: -70px;
}

.services-slider .swiper-button-prev:after,
.services-slider .swiper-button-next:after {
    font-size: 30px;
    font-weight: normal;
}

.services-slider .swiper-button-prev:hover,
.services-slider .swiper-button-next:hover {
    background: rgba(75, 73, 72, 0.3);
    transform: translateY(-50%) scale(1.1);
}

@media (max-width: 767px) {
    .swiper-container.services-slider {
        height: 400px;
    }
    
    .swiper-container-horizontal > .swiper-pagination-bullets .swiper-pagination-bullet {
        bottom: 4px;
    }
    
    .swiper-slide .swiper-content {
        max-width: 85%;
        padding: 12px 16px;
    }
    
    .swiper-slide .swiper-content .swiper-title {
        font-size: 26px;
    }
    
    .swiper-slide .swiper-content .swiper-caption {
        font-size: 16px;
    }
}

/* О нас */
.about {
    padding: 80px 0;
    color: #333;
}

.about-container {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-img {
    flex: 1;
    height: 400px;
    background-color: #ddd;
    border-radius: 5px;
    background-image: url('/static/images/o_nas.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 1s, transform 1s;
}

.about-img.visible {
    opacity: 1;
    transform: translateX(0);
}

.about-content {
    flex: 1;
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 1s, transform 1s;
}

.about-content.visible {
    opacity: 1;
    transform: translateX(0);
}

.about-content h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.about-content p {
    margin-bottom: 15px;
}

/* Отзывы */
.reviews {
    padding: 80px 0;
    background-color: #f5f5f5;
}

.reviews-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 40px;
}

.reviews-header h2 {
    font-size: 36px;
    color: #1a1a1a;
    margin: 0;
}

.reviews-actions {
    display: flex;
    gap: 15px;
}

.btn-review-all {
    background-color: transparent;
    color: #1a1a1a;
    border: none;
    padding: 0;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0;
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
}

.btn-review-all::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #1a1a1a;
    transition: width 0.3s ease-in-out;
}

.btn-review-all:hover::after {
    width: 100%;
}

.btn-review-all:hover {
    color: #1a1a1a;
}

.reviews-carousel-container {
    position: relative;
    margin-top: 40px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.reviews-carousel-wrapper {
    overflow: hidden;
    flex: 1;
}

.reviews-grid {
    display: flex;
    gap: 30px;
    transition: transform 0.5s ease;
}

.reviews-grid .empty-state {
    width: 100%;
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 16px;
}

.carousel-btn {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    color: #333;
}

.carousel-btn:hover {
    background: #f5f5f5;
    border-color: #333;
}

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: default;
    border-color: #e0e0e0;
}

.carousel-btn:disabled:hover {
    background: white;
    border-color: #e0e0e0;
}

.review-card {
    background-color: white;
    padding: 18px 30px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    width: calc((100% - 60px) / 3);
    min-width: calc((100% - 60px) / 3);
    max-width: calc((100% - 60px) / 3);
    flex-shrink: 0;
    opacity: 1;
    transform: translateY(0);
    transition: box-shadow 0.3s, transform 0.3s;
    height: 175px;
    cursor: pointer;
}

.review-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.review-top {
    display: flex;
    margin-bottom: 15px;
}

.review-avatar {
    display: none;
}

.review-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.review-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.review-date {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.review-rating {
    color: #ffa500;
    font-size: 14px;
}

.review-author {
    font-weight: 600;
    font-size: 16px;
    color: #1a1a1a;
}

.review-text {
    color: #666;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    font-size: 14px;
    flex: 1;
    max-height: 67px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    word-wrap: break-word;
    word-break: break-word;
}

.btn-review-full {
    align-self: flex-start;
    padding: 8px 20px;
    background-color: transparent;
    border: 1px solid #ddd;
    border-radius: 3px;
    color: #999;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-review-full:hover {
    background-color: #f0f0f0;
    color: #666;
}

.btn-read-more {
    margin-top: 10px;
    padding: 8px 20px;
    background-color: transparent;
    border: 1px solid #ddd;
    border-radius: 3px;
    color: #999;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-read-more:hover {
    background-color: #f0f0f0;
    color: #666;
}

/* Модальное окно для отзыва */
.review-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    overflow: auto;
    animation: fadeIn 0.3s ease;
}

.review-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.review-modal-content {
    background-color: white;
    margin: auto;
    padding: 40px;
    border-radius: 8px;
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        transform: translateY(50px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

.review-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    font-weight: 300;
    color: #999;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    transition: color 0.3s;
}

.review-modal-close:hover {
    color: #333;
}

.review-modal-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.review-modal-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.review-modal-date {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.review-modal-rating {
    color: #ffa500;
    font-size: 18px;
    letter-spacing: 2px;
}

.review-modal-author {
    font-weight: 600;
    font-size: 20px;
    color: #1a1a1a;
}

.review-modal-text {
    color: #666;
    line-height: 1.8;
    font-size: 15px;
    white-space: pre-wrap;
}

/* Контакты */
.contact {
    padding: 80px 0;
}

.contact-info {
    background-color: white;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s, transform 0.5s;
}

.contact-info.visible {
    opacity: 1;
    transform: translateY(0);
}

.contact-info h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #1a1a1a;
    text-align: center;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.contact-item i {
    margin-right: 10px;
    color: #ff6600;
}

.map-container {
    margin-top: 40px;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

#map {
    width: 100%;
    height: 400px;
}

/* Подвал */
footer {
    background-color: #1a1a1a;
    color: white;
    padding: 15px 0;
    text-align: center;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-email-mobile {
    display: none;
}

.social-links a {
    color: white;
    margin-left: 15px;
    font-size: 20px;
    transition: color 0.3s;
}

.social-links a:hover {
    color: #0066cc;
}

.social-icon {
    width: 40px;
    height: 40px;
    vertical-align: middle;
    display: inline-block;
    transition: transform 0.3s;
}

.social-links a:hover .social-icon {
    transform: scale(1.2);
}

/* Адаптивность */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        gap: 15px;
        padding: 15px 0;
    }

    .header-logo-img {
        display: none;
    }

    .header-left {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-left: 0;
        margin-right: 0;
        width: 100%;
    }

    .header-text {
        align-items: center;
        text-align: center;
        width: 100%;
    }

    .header-logo {
        font-size: 20px;
        text-align: center;
    }

    .header-address {
        font-size: 14px;
        text-align: center;
    }

    .header-right {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        margin-right: 0;
    }

    .header-phone-main {
        font-size: 18px;
        justify-content: center;
    }

    .phone-icon {
        width: 20px;
        height: 20px;
    }

    .header-info {
        align-items: center;
        text-align: center;
    }

    .header-schedule,
    .header-email {
        font-size: 12px;
        text-align: center;
    }

    .header-email {
        display: none;
    }

    .email-icon {
        width: 16px;
        height: 16px;
    }

    nav ul {
        margin-top: 10px;
        justify-content: center;
        flex-wrap: wrap;
        gap: 5px;
    }

    nav ul li a {
        padding: 8px 12px;
        font-size: 14px;
    }

    .header-container {
        flex-direction: column;
        text-align: center;
    }

    nav {
        margin-left: 0;
        width: 100%;
    }

    .container {
        width: 100%;
        padding: 0 2%;
    }
    .hero h1 {
        font-size: 8vw;
    }
    .hero p {
        font-size: 4vw;
    }
    .about-container {
        flex-direction: column;
        gap: 3vw;
    }
    .about-content {
        padding: 0 20px;
    }
    .about-img {
        width: 100%;
        height: 50vw;
        margin-bottom: 3vw;
    }
    .services-grid {
        grid-template-columns: 1fr;
    }
    .reviews {
        padding: 60px 0;
    }
    .reviews-header {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        padding: 0 20px;
    }
    .reviews-header h2 {
        font-size: 28px;
        text-align: center;
    }
    .reviews-actions {
        width: 100%;
        flex-direction: column;
    }
    .btn-review-all {
        width: 100%;
    }
    .reviews-carousel-container {
        padding: 0 10px;
    }
    .carousel-btn {
        display: none;
    }
    .reviews-carousel-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .reviews-grid {
        display: flex;
        gap: 15px;
        padding: 0 10px;
    }
    .review-card {
        width: 85vw;
        min-width: 85vw;
        max-width: 85vw;
        height: auto;
        min-height: 150px;
    }
    .contact-info {
        max-width: 98vw;
    }

    .social-links {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
    }

    .social-links a {
        margin: 0 5px;
    }

    .social-icon {
        width: 35px;
        height: 35px;
    }

    .copyright {
        display: none;
    }

    .footer-email-mobile {
        display: inline-block;
    }

    .footer-container {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 10px;
    }
}
@media (min-width: 769px) and (max-width: 1200px) {
    .reviews-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 1024px) {
    .container {
        width: 98%;
        padding: 0 1%;
    }
    .hero h1 {
        font-size: 6vw;
    }
    .hero p {
        font-size: 3vw;
    }
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(45%, 1fr));
    }
    .reviews {
        padding: 60px 0;
    }
    .reviews-header {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        padding: 0 20px;
    }
    .reviews-actions {
        width: 100%;
        flex-direction: column;
    }
    .btn-review-all {
        width: 100%;
    }
    .carousel-btn {
        width: 40px;
        height: 40px;
    }
    .reviews-grid {
        gap: 20px;
    }
    .review-card {
        width: calc((100% - 20px) / 2);
        min-width: calc((100% - 20px) / 2);
        max-width: calc((100% - 20px) / 2);
        height: auto;
        min-height: 160px;
    }
    .about-img {
        height: 40vw;
    }
    .about-content h2 {
        font-size: 4vw;
    }
    .contact-info {
        max-width: 80vw;
    }
}
@media (max-width: 480px) {
    .container {
        width: 100%;
        padding: 0 1%;
    }
    .hero {
        padding: 20vw 2vw 10vw;
    }
    .hero h1 {
        font-size: 10vw;
    }
    .hero p {
        font-size: 5vw;
    }
    .btn {
        padding: 2vw 6vw;
        font-size: 4vw;
    }
    .about-img {
        height: 60vw;
    }
    .about-content h2 {
        font-size: 6vw;
    }
    .services {
        padding: 10vw 0;
    }
    .contact-info {
        padding: 4vw;
        max-width: 100vw;
    }
    footer {
        padding: 5vw 0;
    }
}