/* General Styles */
body, h1, h2, p {
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
    color: white;
}

body {
    background-color: black;
    font-size: 16px;
}

/* Hero Section */
.hero {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: black;
    color: white;
    position: relative;
}

.hero-text {
    z-index: 2;
    text-align: center;
}

.hero h1 {
    font-size: 4rem;
    font-weight: bold;
}

.hero p {
    font-size: 1.5rem;
}

.hero-text p:last-child {
    color: rgba(255, 255, 255, 0.6);
}

/* Services Section */
.services {
    padding: 120px 40px 40px 40px;
    background-color: black;
    text-align: center;
    color: white;
}

/* Services Title Centered in the section */
.services-title {
    font-size: 2.8rem;
    font-weight: 600;
    margin-bottom: 40px;
    color: black;
    text-align: center;
}

/* Service Container */
.service-container {
    background-color: white;
    padding: 40px 20px 100px 20px;
    border-radius: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin-right: auto;
    margin-left: auto;
    position: relative;
    max-width: 1200px;
    width: 90%;
}

/* Service Carousel Container */
.service-carousel-container {
    display: flex;
    margin: 0 auto;
    align-items: center;
    overflow: hidden;
    position: relative;
    max-width: 100%;
    width: 100%;
    height: auto;
    min-height: 450px;
    padding-bottom: 80px;
}

/* Добавляем эффект занавески с обеих сторон на контейнер */
.service-carousel-container::before,
.service-carousel-container::after {
    content: "";
    position: absolute;
    top: 0;
    width: 1px;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.service-carousel-container::before {
    left: 0;
    background: linear-gradient(to right, white 30%, rgba(255, 255, 255, 0.8) 60%, rgba(255, 255, 255, 0));
}

.service-carousel-container::after {
    right: 0;
    background: linear-gradient(to left, white 30%, rgba(255, 255, 255, 0.8) 60%, rgba(255, 255, 255, 0));
}

/* Custom arrows */
.carousel-arrow {
    background-color: black;
    color: white;
    font-size: 1.5rem;
    border: none;
    cursor: pointer;
    padding: 6px;
    position: absolute;
    z-index: 25;
    transition: all 0.3s ease;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    opacity: 1;
    top: 50%;
    transform: translateY(-50%);
}

.carousel-arrow:hover {
    background-color: #333;
    color: white;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.6);
    transform: translateY(-50%) scale(1.1);
}

.left {
    left: 25px;
    right: auto;
}

.right {
    right: 25px;
    left: auto;
}

/* Service Carousel */
.service-carousel {
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    transition: transform 0.3s ease-in-out;
    display: flex;
    gap: 30px;
    width: max-content;
    padding: 20px 40px;
    position: relative;
}

/* Удаляем эффект занавески с карусели */
.service-carousel::before,
.service-carousel::after {
    content: none;
}

/* Service Card */
.service-card {
    width: 320px;
    height: 300px;
    background-color: white;
    color: black;
    padding: 25px;
    border-radius: 40px;
    text-align: left;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    margin: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    user-select: none;
    flex: 0 0 auto;
    transition: transform 0.3s ease;
    border: 2px solid white;
}

.service-card:hover {
    transform: scale(1.05);
    border-color: #f0f0f0;
}

.service-card h3 {
    font-size: 1.75rem;
    margin-bottom: 15px;
}

.service-card p {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

/* Short Description */
.service-short-description {
    font-size: 1rem;
    color: #555;
    margin-top: 10px;
    font-weight: 500;
}

/* Описание после контейнера */
.description {
    font-size: 14px;
    color: white;
    text-align: center;
    padding: 20px;
    max-width: 90%;
    margin: 0 auto;
}

/* Контейнер с тремя прямоугольниками */
.container {
    display: flex;
    justify-content: center;
    padding: 30px 20px;
    gap: 30px;
    flex-wrap: wrap;
    background-color: black;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    align-items: stretch;
}

/* Стили для каждого прямоугольника (карточки) */
.card {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    flex: 1 1 300px;
    max-width: 550px;
    min-width: 280px;
    margin: 10px;
    transition: transform 0.3s ease;
    border: 2px solid white;
}

.card:hover {
    transform: scale(1.03);
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tags {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 5px;
    color: white;
}

.tags span {
    margin-right: 5px;
    font-size: 14px;
}

/* Контейнер с заголовком и кнопкой */
.idea-container {
    background-color: white;
    padding: 40px;
    padding-bottom: 0px;
    border-radius: 100px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin: 40px auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 500px;
    width: 60%;
    max-width: 800px;
    margin-right: 0;
    margin-left: 20%;
}

.idea-container h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: black;
}

/* Кнопка */
.cta-btn {
    display: inline-block;
    background-color: black;
    color: white;
    padding: 15px 40px;
    border: 2px solid black;
    border-radius: 30px;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s ease-in-out;
}

.cta-btn:hover {
    background-color: white;
    color: black;
    transform: scale(1.05);
}

.menu-icon {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 25px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    z-index: 20;
}

.menu-icon span {
    width: 100%;
    height: 5px;
    background-color: white;
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
}

/* Скрытое меню */
.cta-section {
    padding: 40px;
    text-align: center;
    background-color: black;
    color: white;
    width: 100%;
    position: fixed;
    bottom: -200px;
    left: 0;
    right: 0;
    z-index: 10;
    transition: bottom 0.5s ease-in-out;
}

/* Когда меню открыто */
.cta-section.open {
    bottom: 0;
}

/* Кнопка для вызова меню */
.cta-btn {
    display: inline-block;
    background-color: white;
    color: black;
    padding: 15px 40px;
    border: 2px solid black;
    border-radius: 30px;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s ease-in-out;
    margin: 10px;
}

.cta-btn:hover {
    background-color: black;
    color: white;
    transform: scale(1.05);
}

/* Анимация для меню */
.menu-icon.open span:nth-child(1) {
    transform: rotate(45deg);
    top: 7px;
}

.menu-icon.open span:nth-child(2) {
    opacity: 0;
}

.menu-icon.open span:nth-child(3) {
    transform: rotate(-45deg);
    top: -7px;
}

/* Footer */
footer {
    padding: 20px;
    text-align: center;
    background-color: #333;
    color: white;
}

/* Для экранов меньше 768px (планшеты и мобильные устройства) */
@media (max-width: 768px) {
    /* General Improvements */
    body {
        overflow-x: hidden;
    }
    
    /* Hero Section */
    .hero h1 {
        font-size: 2rem;
        padding: 0 15px;
    }
    
    .hero p {
        font-size: 1rem;
        padding: 0 15px;
    }
    
    /* Services Section */
    .services {
        padding: 80px 15px 30px 15px;
    }
    
    .services-title {
        font-size: 2rem;
        margin-bottom: 25px;
    }
    
    .service-container {
        padding: 20px 10px 80px 10px;
        border-radius: 25px;
        width: 92%;
    }
    
    .service-carousel-container {
        min-height: 350px;
        padding-bottom: 70px;
    }
    
    .carousel-arrow {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .left {
        left: 15px;
    }
    
    .right {
    }
    
    .service-card {
        width: 260px;
        min-height: 220px;
        padding: 15px;
        border-width: 1px;
    }
    
    .service-card h3 {
        font-size: 1.2rem;
    }
    
    .service-card p {
        font-size: 0.9rem;
    }
    
    /* Container with Cards */
    .container {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        padding: 20px 10px;
    }
    
    .card {
        width: 100%;
        height: 250px;
        margin: 10px 0;
        border-radius: 25px;
        max-width: 90%;
        border: 1px solid white;
    }
    
    /* Idea Container */
    .idea-container {
        margin: 20px;
        margin-left: 5%;
        height: auto;
        padding: 30px 15px;
        border-radius: 25px;
        width: 85%;
    }
    
    .idea-container h2 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    /* CTA Section */
    .cta-section {
        padding: 25px 15px;
    }
    
    .cta-btn {
        padding: 12px 30px;
        font-size: 0.9rem;
        margin: 5px;
    }
    
    .menu-icon {
        top: 15px;
        left: 15px;
        z-index: 100;
    }
    
    .service-carousel {
        gap: 15px;
        padding: 10px 20px;
    }
    
    /* Уменьшаем размер занавески для мобильных */
    .service-carousel-container::before,
    .service-carousel-container::after {
        width: 1px;
    }
    
    /* Убедимся, что стрелки отображаются поверх занавесок и хорошо видны */
    .carousel-arrow {
        width: 40px;
        height: 40px;
        background-color: rgba(0, 0, 0, 0.8);
        z-index: 30;
    }

    .left {
        left: 15px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.6rem;
    }
    
    .hero p {
        font-size: 0.9rem;
    }
    
    .services-title {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }
    
    .service-card {
        width: 220px;
        min-height: 180px;
        padding: 12px;
        border-radius: 20px;
        border-width: 1px;
    }
    
    .service-card h3 {
        font-size: 1.1rem;
    }
    
    .description {
        font-size: 0.8rem;
        padding: 15px;
    }
    
    .card {
        height: 220px;
        border-width: 1px;
    }
    
    .tags span {
        font-size: 0.7rem;
    }
    
    .idea-container h2 {
        font-size: 1.5rem;
    }
    
    .cta-btn {
        padding: 10px 20px;
        font-size: 0.8rem;
    }
    
    .click-hint {
        font-size: 0.8rem;
    }
    
    .service-container {
        padding: 15px 8px 70px 8px;
        width: 95%;
    }
    
    .service-carousel-container {
        padding-bottom: 60px;
    }
    
    /* Подстраиваем ширину занавесок для маленьких экранов */
    .service-carousel-container::before,
    .service-carousel-container::after {
        width: 1px;
    }
    
    /* Выразительнее стрелки на малых экранах */
    .carousel-arrow {
        width: 35px;
        height: 35px;
        border: 2px solid white;
    }
    
    .left {
        left: 10px;
    }
    
    /* Idea Container */
    .idea-container {
        margin: 15px;
        margin-left: 5%;
        width: 85%;
    }
    
    /* Адаптируем занавески для разных размеров экранов */
}

/* Для экранов шириной от 768px до 1024px (планшеты в альбомной ориентации и небольшие экраны) */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .hero h1 {
        font-size: 3rem;
    }

    .hero p {
        font-size: 1.4rem;
    }

    .service-carousel-container {
        height: auto;
        min-height: 400px;
        padding-bottom: 80px;
    }
    
    .carousel-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .left {
        left: 20px;
    }
    
    .right {
        left: 680px;
    }
    
    .service-card {
        width: 320px;
        height: auto;
        min-height: 250px;
    }

    .container {
        flex-wrap: wrap;
        justify-content: center;
    }

    .card {
        flex: 0 0 45%;
        margin: 10px;
        border: 2px solid white;
    }

    .idea-container {
        width: 70%;
        height: auto;
        padding: 40px 25px;
        margin: 30px;
        margin-left: 15%;
    }

    .service-container {
        padding-bottom: 100px;
    }

    .service-carousel-container::before,
    .service-carousel-container::after {
        width: 1px;
    }
}

/* Для экранов больше 1024px (десктопы) */
@media (min-width: 1025px) and (orientation: landscape) {
    /* Hero Section */
    .hero h1 {
        font-size: 4rem;
    }

    .hero p {
        font-size: 1.5rem;
    }

    /* Контейнеры и расположение */
    .service-container {
        max-width: 1200px;
        margin: 0 auto;
    }
    
    .container {
        max-width: 1400px;
        margin: 0 auto;
        justify-content: center;
    }
    
    .card {
        flex: 0 0 30%;
        max-width: 600px;
        margin: 15px;
    }

    .cta-btn {
        padding: 15px 40px;
        font-size: 1.1rem;
    }

    .carousel-arrow {
        width: 50px;
        height: 50px;
        font-size: 1.6rem;
    }
    
    .left {
        left: 25px;
    }
    
    .right {
        left: 850px;
    }
    
    .idea-container {
        margin: 40px;
        margin-left: 25%;
        width: 50%;
    }
}

.click-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 1.2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover .click-hint {
    opacity: 1;
}

/* Обновляем стили для iPad в вертикальном положении */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    /* Улучшаем общую центровку */
    .service-container, .container, .idea-container {
        margin-left: auto;
        margin-right: auto;
        width: 90%;
    }
    
    /* Настраиваем контейнер проектов */
    .container {
        justify-content: center;
    }
    
    /* Корректируем размер карточек проектов */
    .card {
        flex: 0 0 auto;
        width: 90%;
        max-width: 500px;
        height: 350px;
        margin: 15px auto;
        border: 2px solid white;
    }
    
    /* Центруем контейнер идеи */
    .idea-container {
        margin: 30px;
        margin-left: 20%;
        height: auto;
        padding: 40px 20px;
        border-radius: 40px;
        width: 70%;
    }
    
    /* Корректируем карусель услуг */
    .service-carousel-container {
        min-height: 400px;
        padding-bottom: 80px;
    }
    
    .carousel-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .left {
        left: 20px;
    }
    
    .right {
    }
    
    .service-card {
        width: 300px;
        min-height: 250px;
    }
    
    .service-carousel {
        gap: 20px;
    }
    
    .service-container {
        padding-bottom: 100px;
    }

    .service-carousel-container::before,
    .service-carousel-container::after {
        width: 1px;
    }
}

/* Общие стили для планшетов независимо от ориентации */
@media (min-width: 768px) and (max-width: 1023px) {
    /* Общие улучшения центровки */
    .service-container {
        width: 90%;
        margin-left: auto;
        margin-right: auto;
    }
    
    /* Корректировка размера шрифтов */
    .services-title {
        font-size: 2.5rem;
    }
    
    .service-card h3 {
        font-size: 1.4rem;
    }
    
    /* Улучшение отображения карусели */
    .carousel-arrow {
        width: 40px;
        height: 40px;
    }
}

/* Для очень больших экранов */
@media (min-width: 1400px) {
    .service-container {
        max-width: 1400px;

    }
    
    .services-title {
        font-size: 3.2rem;
        margin-bottom: 50px;
    }
    
    .container {
        max-width: 1600px;
        gap: 40px;
    }
    
    .card {
        max-width: 600px;
        height: 440px;
    }
    
    .idea-container {
        margin: 60px;
        margin-left: 30%;
        height: 450px;
        max-width: 900px;
        width: 40%;
    }
    
    .carousel-arrow {
        width: 55px;
        height: 55px;
        font-size: 1.8rem;
    }
    
    .left {
        left: 35px;
    }
    
    .right {
        left: 290px;
    }
}

/* Для экранов больше 1200px (большие десктопы) */
@media (min-width: 1200px) {
    .service-card {
        width: 340px;
        height: 320px;
        padding: 25px;
    }
    
    .service-carousel-container {
        min-height: 500px;
        padding-bottom: 100px;
    }
    
    .service-carousel {
        gap: 40px;
    }
    
    .carousel-arrow {
        width: 50px;
        height: 50px;
        font-size: 1.6rem;
        bottom: 30px;
    }
    
    .left {
        left: 30px;
    }
    
    .right {
        left: 1000px;
    }
    
    /* Адаптируем занавески для больших экранов */
    .service-carousel-container::before,
    .service-carousel-container::after {
        width: 1px;
    }
}