/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; color: #1a1a2e; background: #fff; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container--narrow { max-width: 800px; }

/* === Typography === */
h1, h2, h3 { line-height: 1.2; }
.section__title { font-size: 2rem; font-weight: 700; text-align: center; margin-bottom: 0.5rem; }
.section__title--white { color: #fff; }
.section__subtitle { text-align: center; color: #666; font-size: 1.1rem; margin-bottom: 2rem; max-width: 600px; margin-left: auto; margin-right: auto; }
.section__cta { text-align: center; margin-top: 2rem; }
.section { padding: 80px 0; }
.section--light { background: #f8f9fa; }
.section--accent { background: linear-gradient(135deg, #2d6a4f 0%, #40916c 100%); color: #fff; }
.section--accent .section__subtitle { color: rgba(255,255,255,0.8); }
.section--dark { background: #1a1a2e; color: #fff; }
.section--dark .section__subtitle { color: rgba(255,255,255,0.7); }

/* === Buttons === */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px; border-radius: 12px; font-weight: 600; font-size: 1rem; cursor: pointer; border: none; transition: all 0.2s; text-align: center; }
.btn--lg { padding: 16px 36px; font-size: 1.1rem; }
.btn--sm { padding: 8px 18px; font-size: 0.9rem; }
.btn--accent { background: #40916c; color: #fff; }
.btn--accent:hover { background: #2d6a4f; transform: translateY(-1px); box-shadow: 0 4px 15px rgba(64,145,108,0.4); }
.btn--outline { background: transparent; border: 2px solid #fff; color: #fff; }
.btn--outline:hover { background: rgba(255,255,255,0.1); }
.btn--outline-accent { background: transparent; border: 2px solid #40916c; color: #40916c; }
.btn--outline-accent:hover { background: #40916c; color: #fff; }
.btn--white { background: #fff; color: #2d6a4f; }
.btn--white:hover { background: #f0f0f0; transform: translateY(-1px); }

/* === Header === */
.header { background: #fff; border-bottom: 1px solid #e9ecef; position: sticky; top: 0; z-index: 100; }
.header__inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; }
.header__logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.3rem; }
.header__logo-icon { font-size: 1.5rem; }
.header__nav { display: flex; gap: 24px; }
.nav-link { font-weight: 500; font-size: 0.95rem; color: #555; transition: color 0.2s; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav-link:hover { color: #40916c; border-bottom-color: #40916c; }
.header__burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.header__burger span { display: block; width: 24px; height: 2px; background: #333; border-radius: 2px; transition: all 0.3s; }

/* === Page Hero === */
.page-hero { background: linear-gradient(135deg, #2d6a4f 0%, #40916c 100%); color: #fff; text-align: center; padding: 60px 0 50px; }
.page-hero__title { font-size: 2.5rem; font-weight: 800; }
.page-hero__subtitle { font-size: 1.15rem; opacity: 0.9; margin-top: 0.5rem; }

/* === Hero === */
.hero { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%); color: #fff; min-height: 70vh; display: flex; align-items: center; padding: 40px 0; position: relative; overflow: hidden; }
.hero__content { max-width: 650px; }
.hero__badge { display: inline-block; background: rgba(255,255,255,0.15); padding: 6px 16px; border-radius: 20px; font-size: 0.9rem; margin-bottom: 20px; backdrop-filter: blur(10px); }
.hero__title { font-size: 3.5rem; font-weight: 800; line-height: 1.1; margin-bottom: 20px; }
.hero__subtitle { font-size: 1.2rem; opacity: 0.85; margin-bottom: 32px; max-width: 500px; }
.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero__stats { display: flex; gap: 40px; margin-top: 40px; }
.hero__stat { display: flex; flex-direction: column; }
.hero__stat-num { font-size: 2rem; font-weight: 800; color: #52b788; }
.hero__stat-label { font-size: 0.9rem; opacity: 0.7; }

/* === When to Call Grid === */
.when-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; margin-top: 40px; }
.when-card { background: #fff; border-radius: 16px; padding: 30px; box-shadow: 0 2px 15px rgba(0,0,0,0.06); transition: transform 0.2s, box-shadow 0.2s; }
.when-card:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(0,0,0,0.1); }
.when-card__icon { font-size: 2.5rem; margin-bottom: 16px; }
.when-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.when-card p { color: #666; font-size: 0.95rem; }

/* === Services Tabs === */
.services-tabs { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 32px; }
.services-tab { padding: 10px 24px; border: 2px solid #dee2e6; border-radius: 30px; background: #fff; cursor: pointer; font-weight: 600; font-size: 0.95rem; transition: all 0.2s; }
.services-tab:hover { border-color: #40916c; }
.services-tab.active { background: #40916c; color: #fff; border-color: #40916c; }
.services-panel { display: none; }
.services-panel.active { display: block; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.services-grid--page { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.service-card { background: #fff; border-radius: 16px; padding: 28px; border: 1px solid #e9ecef; transition: all 0.2s; }
.service-card:hover { border-color: #40916c; box-shadow: 0 4px 20px rgba(64,145,108,0.1); }
.service-card__icon { font-size: 2.2rem; margin-bottom: 12px; }
.service-card__title { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; }
.service-card__desc { color: #666; font-size: 0.9rem; margin-bottom: 12px; }
.service-card__price { font-size: 1.3rem; font-weight: 700; color: #40916c; }

/* === Calculator === */
.calculator { background: rgba(255,255,255,0.1); border-radius: 20px; padding: 36px; max-width: 700px; margin: 0 auto; }
.calculator__row { margin-bottom: 20px; }
.calculator__label { display: block; color: rgba(255,255,255,0.9); font-weight: 500; margin-bottom: 10px; }
.calculator__options { display: flex; gap: 10px; flex-wrap: wrap; }
.calc-opt { padding: 10px 20px; border: 2px solid rgba(255,255,255,0.3); border-radius: 10px; background: transparent; color: #fff; cursor: pointer; font-weight: 500; transition: all 0.2s; }
.calc-opt:hover { border-color: rgba(255,255,255,0.6); }
.calc-opt.active { background: #fff; color: #2d6a4f; border-color: #fff; }
.calculator__range { width: 100%; accent-color: #fff; }
.calculator__result { text-align: center; margin-top: 24px; padding: 20px; background: rgba(255,255,255,0.15); border-radius: 12px; }
.calculator__result-label { display: block; font-size: 0.9rem; opacity: 0.8; }
.calculator__result-price { font-size: 2.5rem; font-weight: 800; }
.calculator__note { text-align: center; font-size: 0.85rem; opacity: 0.6; margin-top: 12px; }

/* === Steps === */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 30px; margin-top: 40px; }
.step { text-align: center; }
.step__num { width: 60px; height: 60px; background: #40916c; color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 700; margin: 0 auto 16px; }
.step h3 { font-size: 1.1rem; margin-bottom: 8px; }
.step p { color: #666; font-size: 0.95rem; }

/* === Doctors === */
.doctors-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; margin-top: 40px; }
.doctors-grid--page { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
.doctor-card { background: #fff; border-radius: 16px; padding: 30px; text-align: center; box-shadow: 0 2px 15px rgba(0,0,0,0.06); transition: transform 0.2s; }
.doctor-card:hover { transform: translateY(-4px); }
.doctor-card--detailed { display: flex; text-align: left; gap: 24px; align-items: center; }
.doctor-card__photo { width: 120px; height: 120px; border-radius: 50%; overflow: hidden; margin: 0 auto 16px; background: #e9ecef; }
.doctor-card__photo--large { width: 160px; height: 160px; flex-shrink: 0; margin-bottom: 0; }
.doctor-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.doctor-card__name { font-size: 1.15rem; font-weight: 700; }
.doctor-card__spec { color: #40916c; font-weight: 600; font-size: 0.9rem; margin: 4px 0; }
.doctor-card__exp { color: #888; font-size: 0.85rem; margin-bottom: 8px; }
.doctor-card__desc { color: #555; font-size: 0.95rem; line-height: 1.5; }

/* === Reviews === */
.reviews-carousel { display: flex; gap: 24px; overflow-x: auto; padding: 10px 0 20px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.reviews-carousel::-webkit-scrollbar { display: none; }
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 24px; }
.review-card { min-width: 350px; max-width: 450px; background: #fff; border-radius: 16px; padding: 28px; box-shadow: 0 2px 15px rgba(0,0,0,0.06); scroll-snap-align: start; }
.review-card--full { min-width: unset; max-width: unset; }
.review-card__stars { margin-bottom: 12px; font-size: 1.1rem; }
.review-card__text { color: #444; font-size: 0.95rem; margin-bottom: 16px; font-style: italic; }
.review-card__author { font-weight: 600; color: #333; }
.review-card__date { color: #aaa; font-size: 0.85rem; margin-top: 4px; }

/* === FAQ === */
.faq-list { max-width: 800px; margin: 40px auto 0; }
.faq-item { border-bottom: 1px solid #e9ecef; }
.faq-question { width: 100%; text-align: left; padding: 18px 0; background: none; border: none; cursor: pointer; font-size: 1.05rem; font-weight: 600; color: #1a1a2e; display: flex; justify-content: space-between; align-items: center; }
.faq-question::after { content: '+'; font-size: 1.3rem; color: #40916c; transition: transform 0.3s; }
.faq-question.open::after { content: '−'; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-answer p { padding: 0 0 18px 0; color: #555; }
.faq-answer.open { max-height: 300px; }

/* === Request Form === */
.request-form { max-width: 700px; margin: 0 auto; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group--full { grid-column: 1 / -1; }
.form-label { display: block; color: rgba(255,255,255,0.85); font-size: 0.9rem; margin-bottom: 6px; font-weight: 500; }
.section--light .form-label { color: #333; }
.form-input { width: 100%; padding: 12px 16px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.25); background: rgba(255,255,255,0.1); color: #fff; font-size: 1rem; font-family: inherit; }
.section--light .form-input { border-color: #dee2e6; background: #fff; color: #333; }
.form-input::placeholder { color: rgba(255,255,255,0.4); }
.section--light .form-input::placeholder { color: #aaa; }
.form-input:focus { outline: none; border-color: #52b788; box-shadow: 0 0 0 3px rgba(82,183,136,0.2); }
.form-checkbox { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,0.85); cursor: pointer; }
.section--light .form-checkbox { color: #333; }
.request-form .btn { margin-top: 20px; }
.form-group select.form-input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }

/* === Contacts === */
.contacts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; margin-top: 40px; }
.contact-card { background: #fff; border-radius: 16px; padding: 30px; text-align: center; box-shadow: 0 2px 15px rgba(0,0,0,0.06); }
.contact-card__icon { font-size: 2.5rem; margin-bottom: 12px; }
.contact-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.contact-card__value { display: block; font-size: 1.2rem; font-weight: 700; color: #40916c; }
.contact-card p { color: #666; font-size: 0.9rem; margin-top: 4px; }

/* === Map === */
.map-container { border-radius: 16px; overflow: hidden; margin-top: 30px; box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
.map-container iframe { display: block; }

/* === Flash messages === */
.flash-messages { position: fixed; top: 80px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: 400px; }
.flash { padding: 14px 20px; border-radius: 12px; font-weight: 500; animation: slideIn 0.3s ease; box-shadow: 0 4px 15px rgba(0,0,0,0.15); }
.flash--success { background: #52b788; color: #fff; }
.flash--error { background: #e63946; color: #fff; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* === Footer === */
.footer { background: #1a1a2e; color: #ccc; padding: 60px 0 30px; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer__logo { font-size: 1.3rem; font-weight: 800; color: #fff; margin-bottom: 12px; }
.footer__text { font-size: 0.9rem; line-height: 1.6; margin-bottom: 8px; }
.footer__author { font-size: 0.85rem; color: #888; margin-top: 12px; }
.footer__title { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.footer__link { display: block; color: #aaa; font-size: 0.9rem; padding: 4px 0; transition: color 0.2s; }
.footer__link:hover { color: #52b788; }
.footer__link--phone { font-size: 1.1rem; font-weight: 600; color: #52b788; }
.footer__bottom { border-top: 1px solid #333; margin-top: 40px; padding-top: 20px; text-align: center; font-size: 0.85rem; color: #666; }
.footer__bottom a { color: #52b788; }

/* === Scroll Top === */
.scroll-top { position: fixed; bottom: 30px; right: 30px; width: 48px; height: 48px; border-radius: 50%; background: #40916c; color: #fff; border: none; cursor: pointer; font-size: 1.3rem; font-weight: 700; opacity: 0; visibility: hidden; transition: all 0.3s; z-index: 50; box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.scroll-top.visible { opacity: 1; visibility: visible; }
.scroll-top:hover { background: #2d6a4f; transform: translateY(-2px); }

/* === Responsive === */
@media (max-width: 768px) {
  .hero__title { font-size: 2.2rem; }
  .hero__stats { flex-wrap: wrap; gap: 20px; }
  .hero__actions { flex-direction: column; }
  .header__nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; flex-direction: column; padding: 20px; border-bottom: 1px solid #e9ecef; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
  .header__nav.open { display: flex; }
  .header__burger { display: flex; }
  .header__phone { display: none; }
  .footer__grid { grid-template-columns: 1fr; gap: 30px; }
  .form-grid { grid-template-columns: 1fr; }
  .doctors-grid--page { grid-template-columns: 1fr; }
  .doctor-card--detailed { flex-direction: column; text-align: center; }
  .reviews-carousel { flex-direction: column; }
  .review-card { min-width: unset; max-width: unset; }
  .section { padding: 50px 0; }
  .page-hero__title { font-size: 1.8rem; }
  .calculator { padding: 24px; }
  .calculator__options { flex-direction: column; }
}
