@font-face {
    font-family: 'Thicker Trial';
    src: url('Faberge-Regular.otf') format('opentype');
}

:root {
    --main-bg: #faf9f6;
    --accent: #6c63ff;
    --text-main: #222;
    --text-muted: #888;
    --card-bg: #fff;
    --shadow: 0 4px 24px rgba(60,60,90,0.07);
    --radius: 18px;
    --transition: 0.25s cubic-bezier(.4,0,.2,1);
}

body {
    background: linear-gradient(120deg, #f8fafc 0%, #e9e6ff 100%);
    font-family: 'Thicker Trial', Arial, sans-serif;
    color: var(--text-main);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    line-height: 1.6;
}

header {
    background: transparent;
    box-shadow: none;
    padding: 32px 0 0 0;
}

nav ul {
    display: flex;
    justify-content: center;
    gap: 36px;
    list-style: none;
    margin: 0;
    padding: 0;
}

nav ul li a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    padding: 6px 12px;
    border-radius: var(--radius);
    transition: background var(--transition), color var(--transition);
}

nav ul li a:hover {
    background: var(--accent);
    color: #fff;
}

main {
    max-width: 700px;
    margin: 40px auto 0 auto;
    padding: 0 16px;
}

section {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 32px;
    padding: 32px 24px;
    transition: box-shadow var(--transition);
}

section:hover {
    box-shadow: 0 8px 32px rgba(60,60,90,0.12);
}

h1, h2, h3 {
    font-weight: 600;
    color: var(--text-main);
    margin-top: 0;
    margin-bottom: 18px;
    letter-spacing: 0.01em;
}

.big-title {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 0;
}

p, li {
    color: var(--text-muted);
    font-size: 1.05rem;
}

ul.bio-list, ul.mission-list {
    padding-left: 18px;
    margin: 0 0 18px 0;
}

.background-photo {
    background: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
    padding: 0;
    box-shadow: none;
}

.background-photo .text-container {
    background: rgba(255,255,255,0.85);
    border-radius: var(--radius);
    padding: 18px 24px;
    margin: 24px;
    color: var(--text-main);
    font-size: 1.1rem;
    box-shadow: 0 2px 12px rgba(60,60,90,0.06);
}

.doctor-full-photo {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(60,60,90,0.13);
    margin-bottom: 18px;
    object-fit: cover;
    display: block;
}

.diploma-carousel {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 18px auto;
    overflow: hidden;
    background: none;
    box-shadow: none;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-inner {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 8px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 10+ */
}

.carousel-inner::-webkit-scrollbar {
    display: none;
}

.carousel-item {
    flex: 0 0 calc(50% - 9px);
    max-width: calc(50% - 9px);
    min-width: 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(60,60,90,0.08);
    background: #fff;
    transition: transform var(--transition);
}

.carousel-item img {
    width: 100%;
    display: block;
}

.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0; top: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.18);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.close {
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    align-self: flex-end;
    margin-bottom: 8px;
    transition: color var(--transition);
}

.close:hover {
    color: var(--accent);
}

.modal-image {
    width: 100%;
    max-width: 480px;
    border-radius: var(--radius);
}

footer {
    background: transparent;
    color: var(--text-muted);
    text-align: center;
    font-size: 0.95rem;
    margin: 24px 0 0 0;
    padding: 0;
    border: none;
    box-shadow: none;
}

/* Соц. иконки */
#socialNetworks a img {
    width: 36px;
    height: 36px;
    margin: 0 8px 8px 0;
    filter: grayscale(0.2) brightness(0.95);
    transition: filter var(--transition), transform var(--transition);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(60,60,90,0.08);
}

#socialNetworks a img:hover {
    filter: grayscale(0) brightness(1.1);
    transform: scale(1.08);
}

/* Адаптивность */
@media (max-width: 900px) {
    main {
        max-width: 98vw;
        padding: 0 2vw;
    }
    .big-title {
        font-size: 1.5rem;
    }
    section {
        padding: 18px 8px;
        margin-bottom: 18px;
    }
    .doctor-full-photo {
        max-width: 98vw;
        border-radius: 10px;
    }
    .diploma-carousel {
        max-width: 98vw;
    }
    .carousel-item {
        flex: 0 0 70%;
        max-width: 70%;
    }
    .background-photo .text-container {
        margin: 8px;
        padding: 10px 8px;
    }
    nav ul {
        gap: 18px;
    }
    .modal-content {
        padding: 10px;
    }
}

@media (max-width: 700px) {
    main {
        max-width: 100vw;
        padding: 0 2vw;
    }
    .big-title {
        font-size: 1.1rem;
    }
    section {
        padding: 10px 2px;
        margin-bottom: 10px;
    }
    .doctor-full-photo {
        max-width: 100vw;
        border-radius: 0;
    }
    .diploma-carousel {
        max-width: 100vw;
    }
    .carousel-item {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .background-photo .text-container {
        margin: 4px;
        padding: 6px 2px;
        font-size: 0.98rem;
    }
    nav ul {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
        background: #fff;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100vw;
        padding: 12px 0;
        box-shadow: 0 2px 12px rgba(60,60,90,0.08);
        display: none;
    }
    nav ul.active {
        display: flex;
    }
    nav .burger {
        display: block;
        position: absolute;
        right: 18px;
        top: 18px;
        width: 32px;
        height: 32px;
        cursor: pointer;
        z-index: 100;
    }
    nav .burger span, nav .burger span:before, nav .burger span:after {
        display: block;
        position: absolute;
        width: 32px;
        height: 4px;
        background: #6c63ff;
        border-radius: 2px;
        transition: 0.3s;
        content: '';
    }
    nav .burger span {
        top: 14px;
        left: 0;
    }
    nav .burger span:before {
        top: -10px;
        left: 0;
    }
    nav .burger span:after {
        top: 10px;
        left: 0;
    }
    nav .burger.active span {
        background: transparent;
    }
    nav .burger.active span:before {
        top: 0;
        transform: rotate(45deg);
    }
    nav .burger.active span:after {
        top: 0;
        transform: rotate(-45deg);
    }
    footer {
        font-size: 0.85rem;
        margin: 10px 0 0 0;
    }
    #socialNetworks a img {
        width: 28px;
        height: 28px;
        margin: 0 4px 4px 0;
    }
}

.carousel-prev, .carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: #fff;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: box-shadow 0.2s, background 0.2s;
    box-shadow: 0 6px 24px 0 rgba(60,60,90,0.22), 0 1.5px 6px 0 rgba(60,60,90,0.10);
    outline: none;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    opacity: 1;
}

.carousel-prev {
    left: -4px;
}

.carousel-next {
    right: -4px;
}

.carousel-prev svg, .carousel-next svg {
    display: block;
    border-radius: 50%;
    transition: background 0.2s;
    width: 32px;
    height: 32px;
}

.carousel-prev svg circle,
.carousel-next svg circle {
    fill: #fff;
    stroke: #6c63ff;
    transition: fill 0.2s, stroke 0.2s;
}

.carousel-prev svg path,
.carousel-next svg path {
    stroke: #222;
    transition: stroke 0.2s;
}

.carousel-prev:hover svg circle,
.carousel-next:hover svg circle {
    fill: var(--accent);
    stroke: var(--accent);
}

.carousel-prev:hover svg path,
.carousel-next:hover svg path {
    stroke: #fff;
}

.carousel-prev:hover, .carousel-next:hover {
    transform: translateY(-50%) scale(1.08);
}
