/* 3D Carousel Widget — carousel.css v1.4.0 */

/* ─── CSS Variables ─── */
.dcwg-wrap {
    --dcwg-accent:  #e63946;
    --dcwg-card-bg: #0d0d0d;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem 2.5rem;
    overflow: hidden;
    position: relative;
}

/* ─── Title ─── */
.dcwg-title {
    font-size: clamp(1.4rem, 3.5vw, 2rem);
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 1.5rem;
    letter-spacing: -0.02em;
    text-align: center;
}
.dcwg-title span { color: var(--dcwg-accent); }

/* Hint text REMOVED — .dcwg-hint no longer rendered */

/* ─── Stage ─── */
.dcwg-stage {
    perspective: 1800px;
    width: 100%;
    height: 420px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
}

/* ─── Ring ─── */
.dcwg-ring {
    width: 240px;
    height: 340px;
    position: relative;
    transform-style: preserve-3d;
}

/* ─── Card ─── */
.dcwg-card {
    position: absolute;
    inset: 0;
    background: var(--dcwg-card-bg, #0d0d0d);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    cursor: pointer;
    box-sizing: border-box;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.dcwg-card:hover {
    border-color: rgba(230,57,70,0.5);
    box-shadow: 0 8px 40px rgba(230,57,70,0.22), 0 2px 8px rgba(0,0,0,0.5);
}
.dcwg-card:focus-visible {
    outline: 2px solid var(--dcwg-accent);
    outline-offset: 3px;
}

/* Shine layer */
.dcwg-card-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, transparent 55%);
    border-radius: inherit;
    pointer-events: none;
    z-index: 3;
}

/* Glow layer */
.dcwg-card-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 0%, rgba(230,57,70,0.2) 0%, transparent 70%);
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.4s;
}
.dcwg-card:hover .dcwg-card-glow { opacity: 1; }

/* ─── Card inner ─── */
.dcwg-card-inner {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.2rem 1.2rem 1.35rem;
}

/* ─── Media wrap ─── */
.dcwg-media-wrap { margin-bottom: 0.8rem; }

/* ─── Icon ─── */
.dcwg-icon {
    font-size: 26px;
    color: var(--dcwg-accent);
    display: block;
    line-height: 1;
}

/* ─── Image: Cover ─── */
.dcwg-img-cover {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center top;
    border-radius: inherit;
    z-index: 0;
}
.dcwg-card--img-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.25) 55%, transparent 100%);
    border-radius: inherit;
    z-index: 1;
    pointer-events: none;
}
.dcwg-card--img-cover .dcwg-card-inner { justify-content: flex-end; }
.dcwg-card--img-cover h3              { color: #fff !important; }
.dcwg-card--img-cover .dcwg-preview   { color: rgba(255,255,255,0.72); }

/* ─── Image: Contain ─── */
.dcwg-img-contain {
    display: block;
    width: 100%;
    height: 130px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 10px;
    background-color: rgba(255,255,255,0.04);
}

/* ─── Image: Icon-size ─── */
.dcwg-img-icon {
    width: 44px; height: 44px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

/* ─── Card text ─── */
.dcwg-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dcwg-accent);
    margin: 0 0 0.3rem;
    line-height: 1.25;
    letter-spacing: -0.01em;
}
.dcwg-card .dcwg-preview {
    font-size: 12px;
    color: #aaa;
    margin: 0;
    line-height: 1.5;
}

/* ─── Popup media — FIXED ─── */
.dcwg-popup-media {
    margin: -1.75rem -1.5rem 1rem;  /* bleed to edges of popup */
    border-radius: inherit inherit 0 0;
    overflow: hidden;
    max-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.2);
}
.dcwg-popup-media .dcwg-popup-icon {
    font-size: 30px;
    color: var(--dcwg-accent);
    padding: 1.25rem;
}
.dcwg-popup-img {
    width: 100%;
    height: 100%;
    max-height: 220px;
    object-fit: cover;      /* fills the bleed area properly */
    object-position: center top;
    display: block;
    border-radius: 0;
}
.dcwg-popup-img--icon {
    width: 54px; height: 54px;
    object-fit: cover;
    border-radius: 10px;
    margin: 1rem;
}

/* ─── Dot navigation ─── */
.dcwg-dot-row {
    display: flex;
    gap: 7px;
    margin-top: 1.4rem;
    align-items: center;
}
.dcwg-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: rgba(200,200,200,0.3);
    cursor: pointer;
    border: none;
    padding: 0;
    transition: background 0.3s, transform 0.25s, width 0.25s;
}
.dcwg-dot.active {
    background: var(--dcwg-accent);
    transform: scale(1.35);
    width: 18px;
    border-radius: 4px;
}

/* ─── Controls ─── */
.dcwg-controls {
    display: flex;
    gap: 8px;
    margin-top: 1.2rem;
    flex-wrap: wrap;
    justify-content: center;
}
.dcwg-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    padding: 0.5rem 1.1rem;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05);
    color: #ddd;
    transition: background 0.2s, border-color 0.2s;
    font-family: inherit;
    font-weight: 500;
}
.dcwg-btn:hover  { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.25); }
.dcwg-btn:active { transform: scale(0.97); }

/* ─── Overlay ─── */
.dcwg-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 99998;
    display: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.dcwg-overlay.open { display: block; opacity: 1; }

/* ─── Popup ─── */
.dcwg-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -46%) scale(0.9);
    width: min(440px, 92vw);
    background: #111;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 1.75rem 1.5rem 1.5rem;
    z-index: 99999;
    opacity: 0;
    display: none;
    transition: opacity 0.28s ease, transform 0.28s cubic-bezier(.34,1.56,.64,1);
    overflow: hidden;      /* important: keeps popup-media bleed clean */
}
.dcwg-popup.open {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
.dcwg-popup-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.4rem;
}

/* ─── Divider ─── */
.dcwg-popup-divider {
    width: 60px;
    height: 3px;
    background: #e63946;
    border-radius: 99px;
    margin: 0 0 0.85rem;
}

/* ─── Tag ─── */
.dcwg-popup-tag {
    display: inline-block;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(230,57,70,0.15);
    color: var(--dcwg-accent, #e63946);
    margin-bottom: 0.9rem;
    font-weight: 600;
}

/* ─── Description ─── */
.dcwg-popup-desc {
    font-size: 14px;
    color: #aaa;
    line-height: 1.7;
    margin: 0 0 1.25rem;
}

/* ─── Close button ─── */
.dcwg-close-btn {
    width: 100%;
    justify-content: center;
    padding: 0.65rem;
    font-size: 14px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.15);
    color: #fff;
}
.dcwg-close-btn:hover { background: rgba(255,255,255,0.12); }

/* ════════════════════════════
   RESPONSIVE BREAKPOINTS
   ════════════════════════════ */

/* ── Large desktop (>1200px) ── */

/* ── Tablet landscape (≤1024px) ── */
@media (max-width: 1024px) {
    .dcwg-card h3 { font-size: 0.95rem; }
    .dcwg-popup-media { max-height: 190px; }
    .dcwg-popup-img   { max-height: 190px; }
}

/* ── Tablet portrait (≤768px) ── */
@media (max-width: 768px) {
    .dcwg-stage { perspective: 1400px; }
    .dcwg-title { font-size: 1.35rem; }
    .dcwg-card h3 { font-size: 0.9rem; }
    .dcwg-popup { width: min(400px, 92vw); }
}

/* ── Mobile (≤600px) ── */
@media (max-width: 600px) {
    .dcwg-stage { perspective: 1000px; }
    .dcwg-card-inner { padding: 0.9rem 0.9rem 1rem; }
    .dcwg-card h3 { font-size: 0.82rem; }
    .dcwg-card .dcwg-preview { font-size: 11px; }
    .dcwg-icon  { font-size: 20px; }
    .dcwg-img-contain { height: 90px; }
    .dcwg-img-icon { width: 36px; height: 36px; }
    .dcwg-title { font-size: 1.15rem; margin-bottom: 1.1rem; }
    .dcwg-popup { padding: 1.3rem 1.1rem 1.15rem; border-radius: 16px; }
    .dcwg-popup-media { margin: -1.3rem -1.1rem 0.9rem; max-height: 170px; }
    .dcwg-popup-img   { max-height: 170px; }
    .dcwg-popup-title { font-size: 1rem; }
    .dcwg-popup-desc  { font-size: 13px; }
    .dcwg-btn   { font-size: 12px; padding: 0.42rem 0.8rem; }
    .dcwg-controls { gap: 6px; }
    .dcwg-dot   { width: 6px; height: 6px; }
    .dcwg-dot.active { width: 14px; }
}

/* ── Very small phone (≤400px) ── */
@media (max-width: 400px) {
    .dcwg-card-inner { padding: 0.7rem 0.8rem; }
    .dcwg-popup-media { max-height: 150px; }
    .dcwg-popup-img   { max-height: 150px; }
}
