:root {
    --accent: #1fc602;
    --background: #fff;
    --card: #fff;
    --muted: #9a9a9a;
}
body {
    font-family: Lato, sans-serif;
    background: var(--background);
    color: #222;
    margin: 0;
    padding-top: 90px;
}
h1, h2, h3 {font-family: 'Montserrat', sans-serif; margin: 0; font-weight: 700; color: #111;}
.container {max-width: 1300px; margin: 0 auto; padding: 0 40px;}

/* ШАПКА */
.header-wrapper {position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; background: var(--background); padding: 10px 40px; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 2px 10px rgba(0,0,0,0.05);}
.logo img {height: 70px; width: auto; object-fit: contain; margin-left: 50px;}
.header {flex: 1; display: flex; align-items: center; justify-content: space-between; background: rgba(128, 128, 128, 0.9); padding: 10px 30px; border-radius: 30px; margin: 0 35px 0 50px; box-sizing: border-box;}
.nav {display: flex; flex: 1; justify-content: space-around;}
.nav a {color: #fff; text-decoration: none; padding: 6px 12px; border-radius: 8px; transition: all 0.3s ease; font-weight: 500; font-size: 15px;}
.nav a:hover {background: rgba(255, 255, 255, 0.2); transform: scale(1.05);}
/* .right-side {display: flex; align-items: center; gap: 20px;} */
.phone {color: white; font-weight: 600;}
.btn {background: var(--accent); color: white; border: none; padding: 8px 30px; border-radius: 15px; cursor: pointer; transition: all 0.3s ease;}
.btn:hover {background: #148a01;}
.btn-white {background: white; color: var(--accent); border: 2px solid var(--accent); padding: 10px 22px; border-radius: 25px; cursor: pointer; transition: all 0.3s ease;}
.btn-white:hover {background: var(--accent); color: #fff;}

/* Поиск */
.search-wrapper {position: relative; display: flex; align-items: center;}
.icon {width: 40px; height: 40px; background: var(--accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.3s ease; margin-left: 15px; border: 1px solid rgba(255, 255, 255, 0.2);}
.icon:hover {transform: scale(1.1); background: #148a01; border-color: rgba(255, 255, 255, 0.4);}
.search-box {position: absolute; right: 45px; width: 0; opacity: 0; visibility: hidden; transition: all 0.3s ease; z-index: 1000;}
.search-input {width: 100%; padding: 10px 15px; border: none; border-radius: 20px; outline: none; background: white; box-shadow: 0 2px 10px rgba(0,0,0,0.2); font-size: 14px;}
.search-active .search-box {width: 250px; opacity: 1; visibility: visible;}

/* КОНТЕНТ */
.main-content {padding: 20px 0;}
.doctor-container {display: flex; gap: 40px; padding: 20px; background: var(--card); border-radius: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); overflow: hidden; transition: all 0.3s ease;}
.doctor-container:hover {box-shadow: 0 6px 20px rgba(0,0,0,0.15); transform: translateY(-5px);}
.doctor-photo img {width: 340px; border-radius: 15px 0 0 15px; object-fit: cover; transition: transform 0.3s ease;}
.doctor-container:hover .doctor-photo img {transform: scale(1.05);}
.doctor-info {flex: 1; padding: 20px; display: flex; flex-direction: column; justify-content: center;}
.doctor-name {font-size: 32px; margin-bottom: 15px; color: #1a1a1a; font-weight: 700; letter-spacing: 1px;}
.info-title, .section-title {font-size: 22px; margin-bottom: 15px; font-weight: 600; color: #333; border-bottom: 2px solid var(--accent); padding-bottom: 5px; width: fit-content;}
.info-list {list-style: none; padding: 0; margin: 0 0 20px 0; line-height: 1.8; color: #444;}
.info-list li {margin-bottom: 10px; padding-left: 15px; position: relative;}
.info-list li:before {content: "•"; color: var(--accent); position: absolute; left: 0; font-size: 18px;}
.price {margin: 20px 0; font-size: 20px; font-weight: 600; color: var(--accent); background: #e6ffe6; padding: 8px 15px; border-radius: 10px; display: inline-block;}
.doctor-btn {background: transparent; border: 2px solid var(--accent); padding: 10px 22px; border-radius: 25px; color: var(--accent); font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; align-self: center;}
.doctor-btn:hover {background: var(--accent); color: #fff;}

/* Табы */
.tabs-container {width: 100%; overflow-x: auto;}
.tabs {display: flex; gap: 20px; justify-content: space-between; padding: 30px 0; width: max-content; min-width: 100%;}
.tab {flex: 1; padding: 8px 30px; border: none; background: #f0f0f0; border-radius: 15px; cursor: pointer; font-weight: 600; font-size: 15px; transition: all 0.3s ease;}
.tab:hover {background: #e2e2e2;}
.tab.active {background: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(31,198,2,0.3);}

/* Секции */
.education-section, .experience-section, .skills-section, .services-section, .appointment-section, .reviews-section {border: 1px solid #ccc; border-radius: 8px; padding: 20px; margin: 20px 0; background: #fafafa; transition: all 0.3s ease;}
.education-section:hover, .experience-section:hover, .skills-section:hover, .services-section:hover, .appointment-section:hover, .reviews-section:hover {box-shadow: 0 4px 15px rgba(0,0,0,0.1); transform: translateY(-5px);}
.education-list {list-style: none; padding: 0; margin: 0 0 20px 0; line-height: 1.8;}
.education-list li {margin-bottom: 12px; font-size: 16px;}
.education-list li strong {color: var(--accent); font-weight: 600;}
.more-btn {padding: 10px 22px; border-radius: 25px; background: white; color: var(--accent); border: 2px solid var(--accent); font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; display: block; margin: 20px auto; text-align: center;}
.more-btn:hover {background: var(--accent); color: #fff;}

/* Клиники */
.clinics {display: flex; justify-content: center; gap: 30px; flex-wrap: wrap;}
.clinic-card {padding: 25px 40px; background: #fff; border-radius: 15px; box-shadow: 0 6px 18px rgba(0,0,0,0.08); cursor: pointer; transition: all 0.3s ease; font-size: 18px; font-weight: 600; color: #111; min-width: 250px; text-align: center; border: 2px solid transparent;}
.clinic-card:hover {transform: translateY(-5px); border-color: var(--accent); box-shadow: 0 8px 20px rgba(0,0,0,0.12);}

/* Услуги */
.diseases-columns {display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 20px;}
.disease-list {list-style: none; padding: 0; margin: 0; line-height: 1.8;}
.disease-list li {margin-bottom: 15px; padding: 12px 15px; background: white; border-radius: 8px; box-shadow: 0 2px 6px rgba(0,0,0,0.08); border-left: 3px solid var(--accent); transition: all 0.3s ease;}
.disease-list li:hover {box-shadow: 0 4px 12px rgba(0,0,0,0.12); transform: translateX(5px);}
.disease-name {font-weight: 600; color: #333; margin-bottom: 5px; font-size: 16px;}
.disease-description {color: #666; font-size: 14px;}

/* Награды */
.awards-section,
.articles-section {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    background: #fafafa;
    transition: all 0.3s ease;
}
.awards-section:hover,
.articles-section:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}

.awards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.award-item {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 18px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}
.award-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.award-item img,
.award-item svg {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    margin-right: 18px;
    fill: var(--accent);
}


.award-item p {
    margin: 0;
    font-size: 15px;
    color: #333;
    font-weight: 500;
    line-height: 1.5;
    flex: 1;
}

/* Статьи */
/* Статьи — полностью как отзывы */
.articles-section {
    background: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.articles-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);  /* ← вот это главное: 3 колонки в ряд */
    gap: 25px;
    margin-top: 20px;
}

.article-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;                     /* важно: карточки одной высоты */
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.article-card h3 {
    margin: 0;
    font-size: 17px;
    color: #111;
    line-height: 1.4;
    font-weight: 600;
}

.article-date {
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
}

.article-card p {
    margin: 0;
    color: #555;
    line-height: 1.55;
    flex-grow: 1;
}

.article-link {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.article-link:hover {
    text-decoration: underline;
}

.articles-more {
    text-align: center;
    margin-top: 30px;
}

/* На мобильных — одна колонка */
@media (max-width: 768px) {
    .articles-container {
        grid-template-columns: 1fr;
    }
}


/* Отзывы */
.reviews-section {background: #f9f9f9;}
.reviews-container {display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; margin-top: 20px;}
.review-card {background: #fff; border: 1px solid #eee; border-radius: 8px; padding: 20px; box-shadow: 0 4px 12px rgba(0,0,0,0.08); transition: all 0.3s ease; display: flex; flex-direction: column; gap: 12px;}
.review-card:hover {transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.15);}

/* Модалки */
#doctorTrigger .select-value {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.modal-content h2 {
    margin-bottom: 30px;
}

.form-grid {
    margin-top: 10px;
}
.modal,
.review-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
}

.modal.active,
.review-modal.show {
    display: flex;
}
.agreement-error {
    display: none;
    margin-top: 8px;
    font-size: 13px;
    color: #e53935;
}
.agreement-error.show {
    display: block;
}

.modal-content,
.review-modal-content {
    background: var(--card);
    padding: 32px 30px;
    border-radius: 20px;
    width: 520px;
    max-width: calc(100% - 30px);
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    animation: modalIn 0.35s ease forwards;
}

@keyframes modalIn {
    from {
        transform: translateY(30px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Кнопка закрытия */
/* .modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--accent);
    color: var(--accent);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.modal-close:hover {
    background: var(--accent);
    color: #fff;
    transform: rotate(90deg);
} */
/* Форма */
.form-grid {display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px;}
.form-group {display: flex; flex-direction: column; gap: 8px;}
.form-group.full-width {grid-column: 1 / -1;}
.form-group label {font-size: 14px; font-weight: 600; color: #333;}
.form-group input, .form-group select, .form-group textarea {width: 100%; padding: 12px 16px; border: 2px solid #e9ecef; border-radius: 12px; font-size: 15px; transition: all 0.3s ease;}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31,198,2,0.15);}
.btn-submit {background: var(--accent); color: #fff; border: none; padding: 14px 30px; border-radius: 12px; font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; width: 100%; margin-top: 10px;}
.btn-submit:hover {background: #148a01; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(31,198,2,0.3);}

/* Чекбокс */
.checkbox {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}
.checkmark {
    position: relative;
}

/* Футер */
.footer {background: #fff; border-top: 1px solid #eee; padding: 40px 0 20px; font-size: 14px; color: #000;}
.footer-top {display: flex; justify-content: space-between; gap: 40px;}
.footer-links {display: flex; flex: 1; gap: 80px;}
.footer-column h4 {font-weight: 600; margin-bottom: 10px;}
.footer-column a {text-decoration: none; color: #000; transition: opacity .2s;}
.footer-column a:hover {opacity: 0.7;}
.footer-bottom {border-top: 1px solid #eee; margin-top: 40px; padding-top: 15px; display: flex; justify-content: space-between; font-size: 13px; color: #555;}

/* Адаптив */
@media (max-width: 1000px) {
    .footer-top {flex-direction: column; gap: 20px;}
    .doctor-container {flex-direction: column; gap: 20px;}
    .doctor-photo img {width: 100%; border-radius: 15px;}
}
@media (max-width: 768px) {
    .form-grid, .diseases-columns, .reviews-container {grid-template-columns: 1fr;}
    .modal-content {padding: 25px 20px; width: calc(100% - 40px);}
    .tabs {flex-wrap: wrap;}
}

/* Анимация */
@keyframes fadeIn {from {opacity: 0;} to {opacity: 1;}}
html {scroll-behavior: smooth; scroll-padding-top: 90px;}
.tab-content-section {scroll-margin-top: 100px;}