/* =====================================
   32Дент - Основные стили
   ===================================== */

/* CSS Custom Properties */
:root {
    /* Цветовая палитра */
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #60a5fa;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --text-light: #9ca3af;
    --background-white: #ffffff;
    --background-gray: #f9fafb;
    --background-dark: #111827;
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Типографика */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-secondary: 'Roboto', sans-serif;
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    /* Размеры */
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 16px;
    --transition: all 0.3s ease;
    --max-width: 1200px;
}

/* =====================================
   Сброс стилей и базовые настройки
   ===================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background-white);
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

ul {
    list-style: none;
}

/* =====================================
   Утилитарные классы
   ===================================== */

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: var(--font-weight-bold);
    color: var(--text-dark);
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto;
}

.highlight {
    color: var(--primary-color);
}

/* =====================================
   Кнопки
   ===================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-weight: var(--font-weight-medium);
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    text-align: center;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--background-white);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--background-white);
    transform: translateY(-1px);
}

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* =====================================
   Хедер
   ===================================== */

.header {
    background-color: var(--background-white);
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: var(--transition);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius);
}

.brand-text {
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-weight: var(--font-weight-medium);
    color: var(--text-dark);
    padding: 8px 0;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary-color);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    border-radius: 2px;
    transition: var(--transition);
}

/* =====================================
   Герой секция
   ===================================== */

.hero {
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding-top: 80px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
    overflow: hidden;
}

.hero-content {
    flex: 1;
    z-index: 2;
}

.hero-text {
    max-width: 600px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
    margin-bottom: 24px;
    color: var(--text-dark);
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-gray);
    margin-bottom: 32px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
}

.hero-stats {
    display: flex;
    gap: 48px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: var(--font-weight-bold);
    color: var(--primary-color);
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-gray);
    margin-top: 4px;
}

.hero-image {
    flex: 1;
    position: relative;
    z-index: 1;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-xl);
}

/* =====================================
   Услуги
   ===================================== */

.services {
    padding: 120px 0;
    background-color: var(--background-white);
}

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

.service-card {
    background: var(--background-white);
    border-radius: var(--border-radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-light);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.service-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.service-icon i {
    font-size: 24px;
    color: var(--background-white);
}

.service-title {
    font-size: 1.5rem;
    font-weight: var(--font-weight-semibold);
    margin-bottom: 16px;
    color: var(--text-dark);
}

.service-description {
    color: var(--text-gray);
    margin-bottom: 20px;
    line-height: 1.6;
}

.service-features {
    margin-bottom: 24px;
}

.service-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.875rem;
    color: var(--text-gray);
}

.service-features li::before {
    content: '✓';
    color: var(--secondary-color);
    font-weight: var(--font-weight-bold);
}

.service-price {
    font-size: 1.25rem;
    font-weight: var(--font-weight-bold);
    color: var(--primary-color);
    text-align: right;
}

/* =====================================
   О клинике
   ===================================== */

.about {
    padding: 120px 0;
    background-color: var(--background-gray);
}

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

.about-description {
    font-size: 1.125rem;
    color: var(--text-gray);
    margin-bottom: 40px;
    line-height: 1.7;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.feature-item i {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--background-white);
    font-size: 18px;
    flex-shrink: 0;
}

.feature-item h4 {
    font-size: 1.125rem;
    font-weight: var(--font-weight-semibold);
    margin-bottom: 4px;
    color: var(--text-dark);
}

.feature-item p {
    color: var(--text-gray);
    font-size: 0.875rem;
}

.image-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.image-grid img {
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    height: 250px;
    object-fit: cover;
}

/* =====================================
   Врачи
   ===================================== */

.doctors {
    padding: 120px 0;
    background-color: var(--background-white);
}

.doctors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 32px;
}

.doctor-card {
    background: var(--background-white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.doctor-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.doctor-photo {
    height: 280px;
    overflow: hidden;
}

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

.doctor-info {
    padding: 24px;
}

.doctor-name {
    font-size: 1.25rem;
    font-weight: var(--font-weight-semibold);
    margin-bottom: 8px;
    color: var(--text-dark);
}

.doctor-specialty {
    color: var(--primary-color);
    font-weight: var(--font-weight-medium);
    margin-bottom: 16px;
}

.doctor-description {
    color: var(--text-gray);
    margin-bottom: 20px;
    line-height: 1.6;
}

.doctor-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill {
    background: var(--background-gray);
    color: var(--text-dark);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: var(--font-weight-medium);
}

/* =====================================
   Контакты
   ===================================== */

.contact {
    padding: 120px 0;
    background-color: var(--background-gray);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.contact-card {
    background: var(--background-white);
    padding: 24px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
}

.contact-card h3 {
    font-size: 1.25rem;
    font-weight: var(--font-weight-semibold);
    margin-bottom: 16px;
    color: var(--text-dark);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.contact-item i {
    width: 20px;
    color: var(--primary-color);
}

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

.contact-social h3 {
    margin-bottom: 16px;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--background-white);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary-color);
    color: var(--background-white);
}

.social-link i {
    font-size: 18px;
}

/* =====================================
   Формы
   ===================================== */

.form-container {
    background: var(--background-white);
    padding: 32px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
}

.form-container h3 {
    font-size: 1.5rem;
    font-weight: var(--font-weight-semibold);
    margin-bottom: 24px;
    color: var(--text-dark);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group label {
    font-weight: var(--font-weight-medium);
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
    background-color: var(--background-white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-note {
    font-size: 0.75rem;
    color: var(--text-light);
    text-align: center;
    margin-top: 12px;
}

/* =====================================
   Футер
   ===================================== */

.footer {
    background-color: var(--background-dark);
    color: var(--background-white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-logo {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius);
}

.footer-description {
    color: var(--text-light);
    margin-bottom: 24px;
    line-height: 1.6;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.social-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-icon:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.footer-section h4 {
    font-size: 1.125rem;
    font-weight: var(--font-weight-semibold);
    margin-bottom: 16px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links a {
    color: var(--text-light);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-light);
}

.footer-contacts {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-contact-item {
    color: var(--text-light);
    line-height: 1.6;
}

.footer-contact-item a {
    color: var(--primary-light);
    text-decoration: none;
}

.footer-contact-item a:hover {
    text-decoration: underline;
}

.working-hours {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hours-item {
    display: flex;
    justify-content: space-between;
    color: var(--text-light);
    font-size: 0.875rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-legal p {
    color: var(--text-light);
    font-size: 0.875rem;
}

.legal-info {
    margin-top: 4px;
}

.footer-links-bottom {
    display: flex;
    gap: 20px;
}

.footer-links-bottom a {
    color: var(--text-light);
    font-size: 0.875rem;
    transition: var(--transition);
}

.footer-links-bottom a:hover {
    color: var(--primary-light);
}

/* =====================================
   Модальные окна
   ===================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--background-white);
    border-radius: var(--border-radius-lg);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 0;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 24px;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: var(--font-weight-semibold);
    color: var(--text-dark);
}

.close {
    font-size: 24px;
    font-weight: var(--font-weight-bold);
    color: var(--text-light);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

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

.modal-body {
    padding: 0 24px 24px;
}

/* =====================================
   Кнопка "Наверх"
   ===================================== */

.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--background-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    z-index: 1500;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* =====================================
   Анимации
   ===================================== */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translateY(0);
    }
    40%, 43% {
        transform: translateY(-10px);
    }
    70% {
        transform: translateY(-5px);
    }
    90% {
        transform: translateY(-2px);
    }
}