* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-purple: #9B7ED9;
    --light-purple: #C8B8FF;
    --dark-purple: #6B4E9E;
    --bg-lavender: #F5F3FF;
    --text-dark: #1a1a1a;
    --text-gray: #666;
    --border-gray: #e0e0e0;
    --white: #ffffff;
}

body {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    color: var(--text-dark);
    line-height: 1.2;
    background-color: var(--white);
    background-image: url("../images/pattern1.svg");
    background-repeat: repeat;
    background-size: 400px 400px;
}

/* Header */
header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1001;
}

.header-top {
    background: var(--bg-lavender);
    padding: 10px 0;
    font-size: 15px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-top-content {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 30px;
}

.contact-info {
    display: flex;
    gap: 20px;
    align-items: center;
}

.contact-info a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
}

.contact-info a:hover {
    color: var(--primary-purple);
}

a.vk-link {
    color: var(--primary-purple);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    text-decoration: none;
}

.logo-icon {
    width: 50px;
    height: 50px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--primary-purple);
}

/* ===== Бургер-кнопка (стилизованная) ===== */
.hamburger {
    background: transparent;
    border: none;
    cursor: pointer;
    display: none;
    padding: 10px;
    z-index: 1001;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.hamburger:hover {
    background-color: rgba(155, 126, 217, 0.1);
}

.hamburger-box {
    width: 28px;
    height: 24px;
    display: inline-block;
    position: relative;
}

.hamburger-inner {
    position: absolute;
    top: 50%;
    margin-top: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--text-dark);
    border-radius: 4px;
    transition: transform 0.2s, background-color 0.2s;
}

.hamburger-inner::before,
.hamburger-inner::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--text-dark);
    border-radius: 4px;
    transition: transform 0.2s, top 0.2s, bottom 0.2s;
}

.hamburger-inner::before {
    top: -8px;
}

.hamburger-inner::after {
    bottom: -8px;
}

/* Анимация при открытии (крестик) */
.hamburger.active .hamburger-inner {
    background-color: transparent;
}

.hamburger.active .hamburger-inner::before {
    transform: rotate(45deg);
    top: 0;
}

.hamburger.active .hamburger-inner::after {
    transform: rotate(-45deg);
    bottom: 0;
}

/* Оверлей (затемнение фона) */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 998;
    /* ниже шапки и меню */
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    .contact-info-address {
        display: none;
    }

    .contact-info-phone span {
        display: none;
    }

    .hamburger {
        display: flex;
        /* показываем бургер */
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        /* сразу под шапкой */
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding: 0;
        gap: 0;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        transform: translateY(-100%);
        /* скрыто вверх */
        transition: transform 0.3s ease;
        z-index: 1000;
        /* ниже шапки, но выше контента */
        overflow-y: auto;
        border-radius: 0 0 20px 20px;
        /* Высоту установим динамически через JS, но зададим запасную */
        max-height: 0;
    }

    .nav-menu.active {
        transform: translateY(0);
        /* выезжает вниз */
        max-height: calc(100vh - 80px);
        /* резерв, если JS не сработает */
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-menu a {
        display: block;
        font-size: 1.2rem;
        padding: 16px 20px;
        border-radius: 0;
        transition: background 0.2s, padding-left 0.2s;
    }

    .nav-menu a:hover {
        background-color: var(--bg-lavender);
        padding-left: 28px;
    }
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(245, 243, 255, 0.95) 0%, rgba(255, 255, 255, 0.95) 100%);
    padding: 80px 0;
    position: relative;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-text h1 {
    font-size: 48px;
    margin-bottom: 30px;
    color: var(--text-dark);
}

.hero-list {
    list-style: none;
    margin-bottom: 40px;
}

.hero-list li {
    padding: 0;
    padding-left: 30px;
    position: relative;
    font-size: 20px;
    line-height: 1.2;
    margin-bottom: 10px;
}

.hero-list li:last-child {
    margin-bottom: 0;
}

.hero-list li:before {
    content: "•";
    color: var(--primary-purple);
    font-weight: bold;
    position: absolute;
    left: 0;
    font-size: 20px;
}

.btn {
    display: inline-block;
    padding: 15px 40px;
    background: var(--primary-purple);
    color: var(--white);
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn:hover {
    background: var(--dark-purple);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(155, 126, 217, 0.4);
}

.response-time {
    margin-top: 15px;
    font-size: 14px;
    color: var(--text-gray);
}

.hero-image {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(155, 126, 217, 0.3);
}

.hero-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    display: block;
}

/* Special Offers */
.section {
    padding: 80px 0;
}

.section-title {
    font-size: 32px;
    margin-bottom: 40px;
    text-align: center;
}

.offers-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.offer-banner {
    background: rgba(245, 243, 255, 0.9);
    border-radius: 20px;
    padding: 30px 30px;
    text-align: center;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-purple);
    transition: transform 0.3s;
    backdrop-filter: blur(5px);
}

.offer-banner:hover {
    transform: translateY(-5px);
}

.offer-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

/* Services */
.services {
    background: rgba(245, 243, 255, 0.9);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.service-card:hover {
    border-color: var(--primary-purple);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(155, 126, 217, 0.2);
}

.service-image {
    width: 100%;
    height: 350px;
    object-fit: cover;
    background: var(--light-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-purple);
    font-size: 14px;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-card h3 {
    padding: 25px 20px 15px;
    font-size: 20px;
    text-align: center;
}

.service-card p {
    padding: 0 20px 25px;
    text-align: center;
    color: var(--text-gray);
    font-size: 14px;
}

.services-center {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

/* Gallery - Masonry Layout */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 250px;
    gap: 20px;
    grid-auto-flow: dense;
}

.gallery-item {
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item.tall {
    grid-row: span 2;
}

.gallery-item.wide {
    grid-column: span 2;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(107, 78, 158, 0.9), transparent);
    color: var(--white);
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 3000;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 10px;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 50px;
    color: var(--white);
    cursor: pointer;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: var(--primary-purple);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 50px;
    color: var(--white);
    cursor: pointer;
    padding: 20px;
    transition: color 0.3s;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    color: var(--primary-purple);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Specialists */
.specialists {
    background: rgba(245, 243, 255, 0.9);
    backdrop-filter: blur(5px);
}

.specialist-slider {
    display: flex;
    gap: 60px;
    align-items: flex-start;
    max-width: 1100px;
    margin: 0 auto;
}

.specialist-info {
    flex: 1;
    padding-top: 40px;
}

.specialist-name {
    font-size: 28px;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.specialist-position {
    font-size: 18px;
    color: var(--primary-purple);
    font-weight: 600;
    margin-bottom: 30px;
}

.specialist-detail {
    margin-bottom: 20px;
    font-size: 15px;
    line-height: 1.6;
}

.specialist-detail strong {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.specialist-photo {
    width: 400px;
    height: 550px;
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(155, 126, 217, 0.3);
}

.specialist-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-controls {
    display: flex;
    gap: 15px;
    margin-top: 40px;
    justify-content: center;
}

.slider-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--primary-purple);
    background: var(--white);
    cursor: pointer;
    font-size: 24px;
    color: var(--primary-purple);
    transition: all 0.3s;
}

.slider-btn:hover {
    background: var(--primary-purple);
    color: var(--white);
}

/* About Clinic with Slider */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text {
    font-size: 16px;
    line-height: 1.8;
}

.about-text p {
    margin-bottom: 20px;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.about-slider {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(155, 126, 217, 0.2);
}

.about-slider-container {
    display: flex;
    transition: transform 0.5s ease;
}

.about-slide {
    min-width: 100%;
    height: 450px;
}

.about-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-slider-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.about-slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.about-slider-dot.active {
    background: var(--white);
    width: 30px;
    border-radius: 6px;
}

/* Reviews Carousel */
.reviews {
    background: rgba(245, 243, 255, 0.9);
    backdrop-filter: blur(5px);
}

.reviews-carousel {
    position: relative;
    overflow: hidden;
}

.reviews-track {
    display: flex;
    gap: 30px;
    transition: transform 0.5s ease;
}

.review-card {
    min-width: calc(33.333% - 20px);
    background: var(--white);
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.review-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--light-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--dark-purple);
}

.review-meta {
    flex: 1;
}

.review-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.stars {
    color: #FFD700;
    font-size: 14px;
}

.review-date {
    font-size: 13px;
    color: var(--text-gray);
}

.review-text {
    color: var(--text-gray);
    line-height: 1.7;
    font-size: 14px;
}

.reviews-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
}

.reviews-nav-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--primary-purple);
    background: var(--white);
    cursor: pointer;
    font-size: 20px;
    color: var(--primary-purple);
    transition: all 0.3s;
}

.reviews-nav-btn:hover {
    background: var(--primary-purple);
    color: var(--white);
}

/* Pharmacy */
.pharmacy-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    font-size: 18px;
    line-height: 1.8;
}

.pharmacy-content p {
    margin-bottom: 20px;
}

.pharmacy-content p:last-child {
    margin-bottom: 0;
}

.pharmacy-image {
    background: var(--bg-lavender);
    border-radius: 20px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-purple);
    overflow: hidden;
}

.pharmacy-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Contacts */
.contacts {
    background: rgba(245, 243, 255, 0.9);
    backdrop-filter: blur(5px);
}

.contacts-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-details h3 {
    font-size: 24px;
    margin-bottom: 30px;
}

.contact-item {
    margin-bottom: 20px;
}

.contact-item a {
    color: var(--primary-purple);
    font-weight: 600;
}

.contact-item a:hover {
    color: var(--dark-purple);
}

.contact-item strong {
    display: block;
    margin-bottom: 5px;
}

.map-container {
    background: var(--white);
    border-radius: 20px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-purple);
}

.map-container iframe {
    border-radius: 20px;
}

@media (max-width: 575px) {
    .map-container iframe {
        width: 100%;
    }
}

/* Footer */
footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 40px 0 20px;
    text-align: left;
    font-size: 15px;
}

.footer-links {
    display: flex;
    justify-content: space-between;
    gap: 10px 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--light-purple);
    text-decoration: none;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
    color: var(--text-gray);
}

.modal-close:hover {
    color: var(--text-dark);
}

.price-list {
    margin-top: 20px;
}

.price-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-gray);
    gap: 20px;
}
.price-item strong{
    text-wrap: nowrap;
}
/* Responsive */
@media (max-width: 1024px) {

    .hero-content,
    .about-content,
    .pharmacy-content,
    .contacts-content {
        grid-template-columns: 1fr;
    }

    .hero-image {
        order: -1;
    }

    .hero-image img {
        height: 400px;
    }

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

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

    .review-card {
        min-width: calc(50% - 15px);
    }

    .specialist-slider {
        flex-direction: column;
        align-items: center;
    }

    .specialist-photo {
        width: 350px;
        height: 450px;
    }
}

@media (max-width: 768px) {
    .hero-text h1 {
        font-size: 32px;
    }

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

    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

    .gallery-grid {
        grid-template-columns: 2fr;
        grid-auto-rows: 350px;
    }

    .gallery-item.tall {
        grid-column: span 1;
        grid-row: span 2;
    }

    .gallery-item.wide {
        grid-column: span 2;
        grid-row: span 1;
    }


    .review-card {
        min-width: 100%;
    }

    .specialist-photo {
        width: 100%;
        max-width: 350px;
        height: 450px;
    }
}

@media (max-width: 575px) {

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

    .gallery-item.tall,
    .gallery-item.wide {
        grid-column: span 1;
        grid-row: span 1;
    }
}