/**
 * Destination Showcase Widget — Styles
 * Prefix: dsw- (avoids theme conflicts)
 */

/* ─── RESET & VARIABLES ─── */
.dsw-destination-widget *,
.dsw-destination-widget *::before,
.dsw-destination-widget *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.dsw-destination-widget {
    --dsw-glass-bg: rgba(255, 255, 255, 0.12);
    --dsw-glass-border: rgba(255, 255, 255, 0.2);
    --dsw-text-primary: #ffffff;
    --dsw-text-secondary: rgba(255, 255, 255, 0.8);
    --dsw-accent: #e8c872;
    --dsw-card-width: 180px;
    --dsw-card-height: 240px;
    --dsw-ease: cubic-bezier(0.4, 0, 0.2, 1);

    position: relative;
    width: 100%;
    min-height: 560px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.35);
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.5;
}

/* ─── BACKGROUND ─── */
.dsw-widget-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.dsw-widget-bg-layer {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: opacity 1s var(--dsw-ease);
}

.dsw-widget-bg-layer.dsw-active {
    opacity: 1;
}

.dsw-widget-bg-layer.dsw-inactive {
    opacity: 0;
}

.dsw-widget-bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.72) 0%,
        rgba(0, 0, 0, 0.45) 40%,
        rgba(0, 0, 0, 0.25) 70%,
        rgba(0, 0, 0, 0.4) 100%
    );
    z-index: 1;
}

/* ─── INNER LAYOUT ─── */
.dsw-widget-inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: stretch;
    min-height: 560px;
    padding: 48px;
    gap: 40px;
}

/* ─── CONTENT PANEL (LEFT) ─── */
.dsw-content-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 480px;
}

.dsw-content-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--dsw-accent);
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(12px);
    animation: dswFadeUp 0.6s var(--dsw-ease) forwards;
}

.dsw-content-badge svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.dsw-content-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(32px, 4vw, 52px);
    font-weight: 700;
    color: var(--dsw-text-primary);
    line-height: 1.1;
    margin-bottom: 18px;
    opacity: 0;
    transform: translateY(18px);
    animation: dswFadeUp 0.7s 0.1s var(--dsw-ease) forwards;
}

.dsw-content-description {
    font-size: 15px;
    line-height: 1.7;
    color: var(--dsw-text-secondary);
    margin-bottom: 32px;
    max-width: 400px;
    opacity: 0;
    transform: translateY(18px);
    animation: dswFadeUp 0.7s 0.2s var(--dsw-ease) forwards;
}

/* ─── CTA BUTTON (GLASSMORPHISM) ─── */
.dsw-content-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 60px;
    background: var(--dsw-glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--dsw-glass-border);
    color: var(--dsw-text-primary);
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.4s var(--dsw-ease);
    opacity: 0;
    transform: translateY(18px);
    animation: dswFadeUp 0.7s 0.3s var(--dsw-ease) forwards;
    width: fit-content;
}

.dsw-content-cta:hover,
.dsw-content-cta:focus {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    color: var(--dsw-text-primary);
    text-decoration: none;
}

.dsw-content-cta svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: transform 0.3s var(--dsw-ease);
}

.dsw-content-cta:hover svg {
    transform: translateX(4px);
}

/* ─── CONTENT TRANSITIONS ─── */
.dsw-content-panel.dsw-transitioning .dsw-content-badge,
.dsw-content-panel.dsw-transitioning .dsw-content-title,
.dsw-content-panel.dsw-transitioning .dsw-content-description,
.dsw-content-panel.dsw-transitioning .dsw-content-cta {
    animation: none;
    opacity: 0;
    transform: translateY(18px);
}

.dsw-content-panel.dsw-entering .dsw-content-badge {
    animation: dswFadeUp 0.5s 0.05s var(--dsw-ease) forwards;
}
.dsw-content-panel.dsw-entering .dsw-content-title {
    animation: dswFadeUp 0.5s 0.12s var(--dsw-ease) forwards;
}
.dsw-content-panel.dsw-entering .dsw-content-description {
    animation: dswFadeUp 0.5s 0.19s var(--dsw-ease) forwards;
}
.dsw-content-panel.dsw-entering .dsw-content-cta {
    animation: dswFadeUp 0.5s 0.26s var(--dsw-ease) forwards;
}

/* ─── CARDS PANEL (RIGHT) ─── */
.dsw-cards-panel {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 420px;
    position: relative;
}

.dsw-cards-carousel-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    padding: 8px 0;
}

.dsw-cards-track {
    display: flex;
    gap: 16px;
    transition: transform 0.5s var(--dsw-ease);
    cursor: grab;
    padding: 8px 4px;
    user-select: none;
    -webkit-user-select: none;
}

.dsw-cards-track.dsw-dragging {
    cursor: grabbing;
    transition: none;
}

.dsw-cards-track::after {
    content: '';
    flex: 0 0 4px;
}

/* ─── CARD ─── */
.dsw-dest-card {
    flex: 0 0 var(--dsw-card-width);
    height: var(--dsw-card-height);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: all 0.45s var(--dsw-ease);
    border: 2px solid transparent;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.dsw-dest-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 1;
    transition: all 0.4s var(--dsw-ease);
}

.dsw-dest-card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.dsw-dest-card.dsw-active {
    border-color: var(--dsw-accent);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 36px rgba(232, 200, 114, 0.2), 0 8px 24px rgba(0, 0, 0, 0.3);
}

.dsw-dest-card.dsw-active::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 16px;
    border: 2px solid var(--dsw-accent);
    z-index: 3;
    animation: dswBorderPulse 2s ease-in-out infinite;
    pointer-events: none;
}

.dsw-card-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s var(--dsw-ease);
}

.dsw-dest-card:hover .dsw-card-image {
    transform: scale(1.08);
}

.dsw-card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    z-index: 2;
}

.dsw-card-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--dsw-text-primary);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.dsw-card-subtitle {
    font-size: 11px;
    color: var(--dsw-text-secondary);
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* ─── CAROUSEL NAV DOTS ─── */
.dsw-carousel-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.dsw-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    border: none;
    cursor: pointer;
    transition: all 0.3s var(--dsw-ease);
    padding: 0;
    outline: none;
}

.dsw-carousel-dot:hover {
    background: rgba(255, 255, 255, 0.45);
}

.dsw-carousel-dot.dsw-active {
    width: 24px;
    border-radius: 4px;
    background: var(--dsw-accent);
}

/* ─── ANIMATIONS ─── */
@keyframes dswFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes dswBorderPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ─── RESPONSIVE: TABLET ─── */
@media (max-width: 960px) {
    .dsw-destination-widget {
        min-height: auto;
        border-radius: 20px;
    }

    .dsw-widget-inner {
        flex-direction: column;
        padding: 36px 28px;
        gap: 28px;
        min-height: auto;
    }

    .dsw-content-panel {
        max-width: 100%;
        text-align: center;
        align-items: center;
    }

    .dsw-content-description {
        max-width: 100%;
    }

    .dsw-cards-panel {
        width: 100%;
    }

    .dsw-widget-bg-overlay {
        background: linear-gradient(
            180deg,
            rgba(0, 0, 0, 0.7) 0%,
            rgba(0, 0, 0, 0.45) 40%,
            rgba(0, 0, 0, 0.3) 60%,
            rgba(0, 0, 0, 0.55) 100%
        );
    }

    .dsw-destination-widget {
        --dsw-card-width: 150px;
        --dsw-card-height: 200px;
    }
}

/* ─── RESPONSIVE: MOBILE ─── */
@media (max-width: 480px) {
    .dsw-destination-widget {
        --dsw-card-width: 130px;
        --dsw-card-height: 180px;
        border-radius: 16px;
    }

    .dsw-widget-inner {
        padding: 28px 20px;
        gap: 24px;
    }

    .dsw-content-title {
        font-size: 28px;
    }

    .dsw-content-description {
        font-size: 14px;
    }

    .dsw-content-cta {
        padding: 12px 28px;
        font-size: 13px;
    }

    .dsw-cards-track {
        gap: 12px;
    }

    .dsw-card-info {
        padding: 12px;
    }

    .dsw-card-title {
        font-size: 13px;
    }

    .dsw-card-subtitle {
        font-size: 10px;
    }
}
