/* Carousel Section */
.headlines-carousel,
.carousel-section {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Carousel */
.carousel-container {
    position: relative;
    overflow: hidden;
    background: transparent;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.15),
        0 4px 16px rgba(139, 69, 19, 0.1);
    width: 100%;
    aspect-ratio: 21 / 7;
    z-index: 1;
    border: none;
}

.carousel-wrapper {
    display: flex;
    width: 100%;
    transition: transform 0.8s cubic-bezier(0.77,0,0.18,1);
    height: 100%;
}

.carousel-slide {
    position: relative;
    background: transparent;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 100%;
    flex-shrink: 0;
    height: 100%;
}

.carousel-slide.inactive-slide {
    opacity: 0.65;
}

.carousel-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0;
    background: transparent;
    align-self: center;
    padding: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.carousel-slide:hover img {
    border-color: #C8102E;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.8);
    padding: 16px;
    cursor: pointer;
    border: none;
    background: transparent;
    border-radius: 50%;
    font-size: 44px;
    z-index: 10;
    opacity: 1;
    pointer-events: auto;
    box-shadow: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn.prev:hover,
.carousel-btn.next:hover {
    opacity: 1;
    background: rgba(255, 215, 0, 0.3) !important;
    color: #FFFFFF !important;
    box-shadow:
        0 0 30px rgba(255, 240, 100, 0.9),
        0 0 50px rgba(255, 235, 80, 0.6),
        0 4px 20px rgba(240, 220, 120, 0.5) !important;
    transform: translateY(-50%) scale(1.05) !important;
    text-shadow: 0 0 12px rgba(255, 245, 150, 0.9) !important;
}

.carousel-btn.prev {
    left: 24px;
}

.carousel-btn.next {
    right: 24px;
}

/* Carousel Navigation Areas */
.carousel-nav-area {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    cursor: pointer;
    z-index: 5;
    background: transparent;
    transition: background 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    height: 100%;
}

.carousel-nav-left {
    left: 0;
}

.carousel-nav-right {
    right: 0;
}

/* Carousel Dots Indicator */
.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    align-items: center;
    z-index: 15;
    padding: 0;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.carousel-dot:hover {
    background: rgba(240, 235, 220, 0.8);
    border-color: rgba(240, 235, 220, 0.9);
    box-shadow: 0 0 8px rgba(240, 235, 220, 0.5);
    transform: scale(1.2);
}

.carousel-dot.active {
    background: rgba(240, 235, 220, 0.95);
    border-color: rgba(240, 235, 220, 1);
    box-shadow: 0 0 12px rgba(240, 235, 220, 0.7);
    width: 14px;
    height: 14px;
}

.carousel-nav-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: bold;
}

.carousel-nav-dot:hover {
    background: rgba(240, 235, 220, 0.7);
    border-color: rgba(240, 235, 220, 0.9);
    box-shadow: 0 0 8px rgba(240, 235, 220, 0.5);
    transform: scale(1.1);
}

.carousel-below {
    max-width: 980px;
    margin: 18px auto 0;
    padding: clamp(16px, 3vw, 28px);
    color: #FFF4D6;
    background: rgba(40, 18, 6, 0.6);
    border: 1px solid rgba(255, 215, 0, 0.25);
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
    text-align: left;
}

.carousel-eyebrow {
    margin: 0 0 8px;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 236, 190, 0.9);
    font-weight: 700;
}

.carousel-title {
    margin: 0 0 10px;
    font-size: clamp(1.4rem, 2.4vw, 2.2rem);
    font-weight: 800;
    line-height: 1.2;
    color: #FFFFFF;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.carousel-text {
    margin: 0 0 16px;
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.carousel-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 999px;
    background: rgba(255, 215, 0, 0.18);
    border: 1px solid rgba(255, 215, 0, 0.5);
    color: #FFF4D6;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.4px;
    transition: all 0.2s ease;
}

.carousel-cta:hover {
    background: rgba(255, 215, 0, 0.32);
    border-color: rgba(255, 215, 0, 0.75);
    transform: translateY(-1px);
}

/* Carousel admin controls */
.carousel-admin-toggle {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.carousel-admin-toggle-btn,
.carousel-mgmt-btn {
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    background: rgba(17, 24, 39, 0.82);
    color: #f9fafb;
    min-height: 46px;
    padding: 10px 14px;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    backdrop-filter: blur(14px);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.22);
}

.carousel-admin-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding-inline: 16px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.carousel-admin-toggle-btn:hover,
.carousel-admin-toggle-btn:focus-visible,
.carousel-mgmt-btn:hover,
.carousel-mgmt-btn:focus-visible {
    transform: translateY(-1px);
    background: rgba(30, 41, 59, 0.92);
    border-color: rgba(255, 215, 0, 0.45);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.26);
    outline: none;
}

.carousel-admin-toggle-btn .hamburger {
    font-size: 1.05rem;
    line-height: 1;
}

.carousel-admin-toggle-label {
    white-space: nowrap;
}

.carousel-management {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: clamp(360px, 30vw, 420px);
    max-width: calc(100vw - 32px);
    padding: 16px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.24);
    backdrop-filter: blur(18px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px) scale(0.98);
    transform-origin: top right;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.carousel-management.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.carousel-management-header {
    margin-bottom: 12px;
}

.carousel-management-eyebrow {
    margin: 0 0 4px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #b45309;
}

.carousel-management-title {
    margin: 0;
    font-size: 1rem;
    line-height: 1.3;
    color: #0f172a;
}

.carousel-info {
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 247, 237, 0.95), rgba(255, 255, 255, 0.98));
    border: 1px solid rgba(251, 191, 36, 0.28);
    color: #7c2d12;
    font-size: 0.92rem;
    line-height: 1.5;
    line-height: 1.4;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

#currentCarouselOrder {
    display: block;
    max-width: 34ch;
}

.carousel-controls {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 1.2fr) auto;
    gap: 10px;
}

.carousel-mgmt-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border-radius: 14px;
    font-weight: 700;
    min-height: 38px;
    padding: 8px 10px;
}

.carousel-mgmt-btn i {
    margin-right: 6px;
}

.carousel-mgmt-btn span {
    flex: 0 1 auto;
    text-align: center;
    white-space: nowrap;
}

.carousel-mgmt-btn.add-btn {
    background: linear-gradient(135deg, rgba(6, 95, 70, 0.95), rgba(4, 120, 87, 0.92));
}

.carousel-mgmt-btn.edit-btn {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.95), rgba(37, 99, 235, 0.9));
}

.carousel-mgmt-btn.delete-btn {
    background: linear-gradient(135deg, rgba(153, 27, 27, 0.96), rgba(220, 38, 38, 0.9));
}

.carousel-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 6px 8px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.carousel-switch .form-check {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
}

.carousel-switch .form-check-input {
    position: relative;
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
    float: none;
    width: 2.45rem;
    min-width: 2.45rem;
    height: 1.35rem;
    border-radius: 999px;
    border: 1px solid #94a3b8;
    background: linear-gradient(135deg, #cbd5e1, #e2e8f0);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.14);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.carousel-switch .form-check-input::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    width: 1.05rem;
    height: 1.05rem;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
    transition: transform 0.2s ease;
}

.carousel-switch .form-check-input:checked {
    border-color: #0f766e;
    background: linear-gradient(135deg, #0f766e, #14b8a6);
}

.carousel-switch .form-check-input:checked::before {
    transform: translateX(1.05rem);
}

.carousel-switch .form-check-input:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.22);
}

.carousel-switch .form-check-label {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .carousel-admin-toggle {
        top: 12px;
        right: 12px;
        left: 12px;
        align-items: stretch;
    }

    .carousel-admin-toggle-btn {
        width: 100%;
        justify-content: center;
    }

    .carousel-management {
        left: 0;
        right: 0;
        width: auto;
        transform-origin: top center;
    }

    .carousel-controls {
        grid-template-columns: 1fr;
    }
}
