.carousel-section {
    padding: 60px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
}

.carousel-wrapper {
    width: 90%;
    max-width: 75%;
    overflow: hidden;
    position: relative;
    border-radius: 10px;
    box-shadow: var(--box-shadow-color);
    background-color: var(--secondary-bg-color);
    margin: 0 auto;
    -webkit-tap-highlight-color: transparent;
    cursor: grab;
}

.carousel-wrapper:active {
    cursor: grabbing;
}

.carousel-track {
    display: flex;
    transition: transform 0.4s ease-in-out;
    will-change: transform;
    width: 100%;
    gap: 0;
    touch-action: pan-y;
    -ms-touch-action: pan-y;
}

.carousel-slide {
    flex: 0 0 100%;
    min-width: 100%;
    max-width: 100%;
    position: relative;
    display: flex;
    flex-direction: row;
    overflow: hidden;
    background: transparent;
    gap: 20px;
    box-sizing: border-box;
}

.carousel-global-counter {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10;
}

.carousel-slide img {
    flex: 1 1 50%;
    width: 50%;
    height: auto;
    object-fit: cover;
    object-position: center;
    border-bottom: none;
    border-right: 1px solid #ccc;
}

.carousel-caption {
    flex: 1 1 50%;
    padding: 20px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.carousel-caption h2 {
    margin: 0 0 8px 0;
    font-size: 2rem;
    line-height: 1.12;
    word-break: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
}

.carousel-caption p,
.carousel-caption ul,
.carousel-caption li {
    margin-left: 1rem;
    font-size: 1rem;
    line-height: 1.6;
    color: #444;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
    padding-left: .5rem;
}

.text-list {
    margin-top: 0.5rem;
}

.text-list li {
    margin-bottom: 0.45rem;
}

.carousel-nav {
    position: absolute;
    bottom: 18px;
    right: 18px;
    display: flex;
    gap: 10px;
    z-index: 10;
}

.carousel-nav button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background-color: var(--secondary-bg-color);
    color: #333;
    cursor: pointer;
    font-size: 1.15rem;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.12);
    transition: background 0.2s, transform 0.12s;
    user-select: none;
}

.carousel-nav button:active {
    transform: scale(0.98);
}

.carousel-nav button:focus {
    outline: 2px solid rgba(0, 0, 0, 0.08);
}

@media (max-width: 992px) {
    .carousel-slide {
        flex-direction: column;
    }
    .carousel-slide img {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #ccc;
    }
    .carousel-caption {
        padding: 22px;
        justify-content: start;
        align-items: start;
    }
    .carousel-caption h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .carousel-wrapper {
        max-width: 90%;
    }
    .carousel-slide img {
        height: clamp(180px, 26vh, 300px);
    }
    .carousel-caption {
        justify-content: start;
        align-items: start;
    }
    .carousel-caption h2 {
        font-size: 1.6rem;
    }
    .carousel-caption p,
    .carousel-caption ul {
        font-size: 0.95rem;
    }
    .carousel-nav {
        visibility: hidden;
        display: none;
    }
    .mediaq-hidden {
        display: none;
        visibility: hidden;
    }
}

@media (max-width: 420px) {
    .carousel-wrapper {
        max-width: 90%;
    }
    .carousel-caption {
        padding: 16px;
    }
    .carousel-caption h2 {
        font-size: 1.4rem;
    }
    .carousel-caption p {
        font-size: 0.92rem;
    }
}