/* Main Content Layout */
.main-content {
    max-width: 1512px;
    margin: 0 auto;
    padding: 0 72px 100px;
    overflow: hidden;
}

/* Profile Section */
.profile-section {
    margin-bottom: 80px;
}

.profile-container {
    display: flex;
    gap: 60px;
    align-items: center;
}

.profile-photo {
    width: 447px;
    height: 447px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #d0d0d0;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 45px;
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 30px;
}

.profile-description {
    font-size: 30px;
    line-height: 1.5;
    margin-bottom: 40px;
}

/* Projects Section */
.projects-section {
    margin: 80px 0 120px;
    position: relative;
}

.section-title {
    font-size: 50px;
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 60px;
}

.projects-carousel {
    position: relative;
    width: 100%;
    margin: 0 auto;
}

.carousel-container {
    overflow: hidden;
    width: calc(100% - 200px);
    margin: 0 auto;
    padding: 30px 0;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
    gap: 40px;
    padding: 0 20px;
}

.project-card {
    flex: 0 0 calc(50% - 20px);
    border: 2px solid #d0d0d0;
    border-radius: 54.5px;
    padding: 40px;
    transition: all 0.3s ease;
    height: 650px;
    box-sizing: border-box;
    background-color: #fcfcfc;
    min-width: 0;
    text-decoration: none;
    color: #333;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: #333;
}

.project-text-container {
    height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-bottom: 30px;
}

.project-title {
    font-size: 35px;
    font-weight: 500;
    line-height: 1.3;
    margin: 0;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-image-container {
    width: 100%;
    height: 350px;
    overflow: hidden;
    border-radius: 25px;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .project-image {
    transform: scale(1.05);
}

/* Carousel Buttons */
.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: #fcfcfc;
    border: 2px solid #d0d0d0;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 20px;
}

.carousel-button:hover {
    background: #333;
    color: #f8f8f8;
    border-color: #333;
}

.carousel-button.prev {
    left: 0;
}

.carousel-button.next {
    right: 0;
}

.carousel-button.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: #fcfcfc;
    color: #333;
    border-color: #d0d0d0;
}

/* CTA Button */
.cta-button {
    display: inline-block;
    padding: 15px 40px;
    font-size: 30px;
    font-weight: 500;
    color: #333;
    background-color: #fcfcfc;
    border: 2px solid #d0d0d0;
    border-radius: 54.5px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.cta-button:hover {
    background-color: #333;
    color: #f8f8f8;
    border-color: #333;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Responsive Styles */
@media (max-width: 1440px) {
    .project-card {
        height: 600px;
    }
    
    .project-image-container {
        height: 300px;
    }
}

/* Мобильная версия (ширина < 1200px) - горизонтальный скролл */
@media (max-width: 1199px) {
    .projects-carousel {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 20px;
        margin: 0 -20px;
    }
    
    .projects-carousel::-webkit-scrollbar {
        display: none;
    }
    
    .carousel-container {
        width: auto;
        overflow: visible;
        padding: 30px 20px;
    }
    
    .carousel-track {
        display: flex;
        flex-wrap: nowrap;
        gap: 30px;
        padding: 0 20px;
        width: max-content;
    }
    
    .project-card {
        flex: 0 0 auto;
        width: 350px; /* Оптимальный размер для планшетов */
        height: 450px;
        scroll-snap-align: start;
        padding: 25px;
        border-radius: 40px;
    }
    
    .project-text-container {
        height: 100px;
        margin-bottom: 20px;
        justify-content: flex-start;
        align-items: center; /* Добавлено вертикальное центрирование */
        justify-content: center; /* Горизонтальное центрирование */
    }
    
    .project-title {
        font-size: 22px;
        text-align: center;
        -webkit-line-clamp: 2;
        margin-bottom: 15px;
    }
    
    .project-image-container {
        height: 250px;
        border-radius: 20px;
        margin-bottom: 15px;
    }
    
    .carousel-button {
        display: none !important;
    }
}


/* Сохраняем ВСЕ оригинальные медиа-запросы из вашего примера */
@media (max-width: 1200px) {
    .main-content {
        padding: 0 60px 80px;
    }
    
    .profile-container {
        gap: 40px;
    }
    
    .profile-photo {
        width: 350px;
        height: 350px;
    }
    
    .profile-name {
        font-size: 36px;
    }
    
    .profile-description {
        font-size: 24px;
    }
    
    .section-title {
        font-size: 60px;
    }
}

@media (max-width: 992px) {
    .project-card {
        width: 320px;
        height: 420px;
    }
    
    .project-image-container {
        height: 230px;
    }

    .project-text-container {
        height: 90px;
    }
}

@media (max-width: 886px) {
    .main-content {
        padding: 0 40px 60px;
    }

    .project-text-container {
        height: 80px;
    }
    
    .profile-container {
        flex-direction: column;
    }
    
    .profile-photo {
        width: 300px;
        height: 300px;
    }
    
    .section-title {
        font-size: 50px;
        margin-bottom: 40px;
    }
    
    /* Адаптация карточек для горизонтального скролла */
    .project-card {
        width: 240px;
        height: 320px;
        padding: 16px;
    }
    
    .project-image-container {
        height: 200px;
    }

    .project-text-container {
        height: 64px; /* Было 80px */
    }
    
    .project-title {
        font-size: 16px;
    }
}

@media (max-width: 576px) {
    .main-content {
        padding: 0 20px 40px;
    }
    
    .hero-title, .section-title {
        font-size: 36px;
    }
    
    .profile-photo {
        width: 250px;
        height: 250px;
    }
    
    .profile-name {
        font-size: 28px;
    }

    .cta-button{
        font-size: 20px;
    }

    .projects-section{
        margin-top: 10px;
    }

    .profile-section{
        margin-bottom: 50px;
    }

    .section-title{
        margin-bottom: 10px;
    }
    
    .profile-description {
        font-size: 20px;
    }
    
    /* Адаптация карточек для маленьких экранов */
    .project-card {
        width: 208px; /* Было 260px */
        height: 280px; /* Было 350px */
        padding: 14.4px; /* Было 18px */
        border-radius: 24px; /* Было 30px */
    }
    
    .project-text-container {
        height: 64px;
        margin-bottom: 12px;
        align-items: center;
        justify-content: center;
    }
    
    .project-title {
        font-size: 12px;
        margin-bottom: 10px;
    }
    
    .project-image-container {
        height: 160px;
        border-radius: 12px;
        margin-bottom: 8px;
    }
}

@media (max-width: 400px) {
    .project-card {
        width: 176px; /* Было 220px */
        height: 240px; /* Было 300px */
    }
    
    .project-image-container {
        height: 128px;
    }
    
    .project-title {
        font-size: 10px;
    }

    .project-text-container {
        height: 48px;
    }
}