:root {
    --primary-color: #002244;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #002244;
    --text-color: #333;
    --text-light: #7f8c8d;
}

/* Основные стили */
body {
    margin: 0;
    font-family: 'Open Sans', sans-serif;
    background: #ffffff;
    color: #002244;
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Шапка */
.header {
    background: #002244;
    padding: 20px 0;
    color: #fff;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.header .logo {
    font-size: 24px;
    font-weight: bold;
    font-family: 'Open Sans', sans-serif;
}

.nav {
    float: right;
}

.nav a {
    margin-left: 20px;
    color: #fff;
    font-weight: 600;
}

.burger {
    display: none;
    font-size: 28px;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
}

@media (max-width: 768px) {
    .burger {
        display: block;
    }
    
    .nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        right: 0;
        width: 100%;
        background: #002244;
    }
    
    .nav.show {
        display: flex;
    }
    
    .nav a {
        margin: 10px 0;
    }
}

/* Адаптив */
@media screen and (max-width: 768px) {
    .header .container {
        justify-content: center;
        padding: 10px;
    }

    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        font-size: 22px;
    }

    .burger {
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        display: block;
    }

    .nav {
        display: none;
        flex-direction: column;
        background-color: #002244;
        position: absolute;
        top: 60px;
        right: 0;
        width: 100%;
        text-align: center;
        padding-bottom: 20px;
        z-index: 1000;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
    }

    .nav.show {
        display: flex;
        max-height: 300px;
    }

    .nav a {
        margin: 15px 0;
    }

    .header {
        position: sticky;
        top: 0;
        z-index: 999;
    }
}

.nav a.active {
    position: relative;
}

.nav a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    animation: underline 0.3s ease-out;
}

@keyframes underline {
    from { width: 0 }
    to { width: 100% }
}

@media (max-width: 768px) {
    .nav a.active {
        background-color: rgba(255, 215, 0, 0.1);
        padding: 8px 0;
    }
}

/* Main Content */
main {
    margin-top: 10px;
    padding: 20px 0 20px;
}

/* Profile Section */
.profile-container {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.photo-column {
    flex: 1;
    min-width: 0;
}

.text-column {
    flex: 1;
    min-width: 0;
}

.name {
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.description {
    margin-bottom: 25px;
    color: var(--text-color);
    line-height: 1.8;
}

.contact-info {
    background-color: var(--light-color);
    padding: 10px;
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
}

.contact-info p {
    margin-bottom: 0px;
}

.contact-info strong {
    color: var(--dark-color);
}

/* Carousel Section - ПОЛНОСТЬЮ ПЕРЕДЕЛАНО */
.carousel-container {
    position: relative;
    height: 600px; /* Уменьшил высоту для лучшего отображения */
}

.carousel {
    position: relative;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    height: 100%;
    background: #f8f8f8;
    overflow: hidden;
}

.carousel-inner {
    display: flex;
    transition: transform 0.5s ease;
    height: 100%;
}

.carousel-item {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.carousel-item img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; /* Важно: contain вместо cover */
    display: block;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 15px;
    text-align: center;
    font-size: 16px;
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    color: var(--dark-color);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    z-index: 10;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-control:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
}

.carousel-control.prev {
    left: 20px;
}

.carousel-control.next {
    right: 20px;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 10px;
    position: absolute;
    bottom: -40px;
    left: 0;
    right: 0;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-light);
    cursor: pointer;
    transition: all 0.3s;
}

.carousel-indicator.active {
    background: var(--secondary-color);
    transform: scale(1.2);
}

.carousel-indicator:hover {
    background: var(--secondary-color);
}

/* Footer Styles */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 30px 0;
    text-align: center;
}

.footer p {
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .header .container {
        justify-content: center;
        padding: 10px;
    }
    
    .burger {
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        display: block;
    }
    
    .nav {
        display: none;
        flex-direction: column;
        background-color: #002244;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        width: 100%;
        text-align: center;
        padding-bottom: 20px;
        z-index: 1000;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    
    .nav.show {
        display: flex;
        max-height: 300px;
    }
    
    .nav a {
        margin: 10px 0;
    }

    .profile-container {
        flex-direction: column;
        margin-bottom: 30px;
        gap: 20px;
    }

    .carousel-container {
        height: 400px;
    }
    
    .photo-column {
        order: 2;
        width: 100%;
    }
    
    .text-column {
        order: 3;
        width: 100%;
    }
    
    .name {
        order: 1;
        font-size: 28px;
        margin-bottom: 15px;
        text-align: center;
    }
    
    .carousel-control {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .carousel-control.prev {
        left: 10px;
    }
    
    .carousel-control.next {
        right: 10px;
    }
    
    .carousel-caption {
        padding: 10px;
        font-size: 14px;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .carousel-container {
        height: 350px;
    }
    
    .carousel-control {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    .name {
        font-size: 24px;
    }
    
    .description {
        font-size: 14px;
        line-height: 1.6;
    }
}

/* Для больших экранов */
@media (min-width: 1200px) {
    .carousel-container {
        height: 700px;
    }
}