/* ============================================================
   Vertical Marquee Widget – Frontend Styles
   Plugin: vertical-marquee-widget
   ============================================================ */

/* ── Section wrapper ── */
/* NOTE: NO background-color here — let Elementor / user styles control it */
.vmw-section {
    position: relative;
    overflow: hidden;
    padding: 80px 0;
}

/* ── Fade masks ── */
/* The gradient color is injected via inline CSS variable --vmw-fade-color
   set by the widget's "Fade Mask Color" control so it always matches the
   section background. Default is transparent so nothing shows unless set. */
.vmw-has-fade::before,
.vmw-has-fade::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    z-index: 10;
    height: 160px;
    pointer-events: none;
}
.vmw-has-fade::before {
    top: 0;
    background: linear-gradient(to bottom, var(--vmw-fade-color, transparent) 0%, transparent 100%);
}
.vmw-has-fade::after {
    bottom: 0;
    background: linear-gradient(to top, var(--vmw-fade-color, transparent) 0%, transparent 100%);
}

/* ── Section heading ── */
.vmw-heading-wrap {
    text-align: center;
    margin-bottom: 64px;
    padding: 0 24px;
    position: relative;
    z-index: 20;
}

.vmw-section-subtitle {
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #c8f045;
    margin-bottom: 12px;
    display: block;
}

.vmw-section-title {
    font-size: clamp(28px, 4vw, 52px);
    font-weight: 700;
    color: #f0eee8;
    line-height: 1.2;
    margin: 0 0 12px;
}

.vmw-section-title span {
    color: #7b5cfa;
}

.vmw-section-desc {
    color: #888;
    font-size: 16px;
    line-height: 1.7;
    max-width: 560px;
    margin: 0 auto;
}

/* ── Grid ── */
.vmw-grid {
    display: flex;
    gap: 18px;
    justify-content: center;
    padding: 0 24px;
    height: 680px;
    overflow: hidden;
    position: relative;
    z-index: 5;
}

/* Column counts */
.vmw-cols-1 .vmw-col { max-width: 360px; }
.vmw-cols-2 .vmw-col { max-width: 320px; }
.vmw-cols-3 .vmw-col { max-width: 280px; }
.vmw-cols-4 .vmw-col { max-width: 240px; }

/* ── Columns ── */
.vmw-col {
    display: flex;
    flex-direction: column;
    gap: 18px;
    flex: 1;
    min-width: 0;
    will-change: transform;
}

/* ── Card ── */
.vmw-card {
    flex-shrink: 0;
    border-radius: 18px;
    overflow: hidden;
    background-color: #1a1a26;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
    text-decoration: none;
    display: block;
    color: inherit;
}

.vmw-card:hover {
    border-color: rgba(123, 92, 250, 0.4);
    box-shadow: 0 12px 48px rgba(123, 92, 250, 0.25);
    transform: translateY(-2px);
}

/* ── Card image container ── */
.vmw-card-img {
    overflow: hidden;
    width: 100%;
}

.vmw-card-img img {
    width: 100%;
    display: block;
    object-fit: cover;
    pointer-events: none;
    transition: transform 0.4s ease;
}

.vmw-card:hover .vmw-card-img img {
    transform: scale(1.04);
}

/* ── Image heights by card size ── */
.vmw-card.tall .vmw-card-img  { height: 300px; }
.vmw-card.sq   .vmw-card-img  { height: 255px; }
.vmw-card.short .vmw-card-img { height: 200px; }

.vmw-card.tall .vmw-card-img img,
.vmw-card.sq   .vmw-card-img img,
.vmw-card.short .vmw-card-img img {
    height: 100%;
}

/* ── Card body ── */
/* Only rendered in DOM when at least one text element (tag/title/desc) is visible */
.vmw-card-body {
    padding: 16px 18px;
}

/* ── Tag ── */
.vmw-card-tag {
    display: block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #c8f045;
    margin-bottom: 6px;
}

/* ── Card title ── */
.vmw-card-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    color: #f0eee8;
    margin: 0 0 4px;
}

/* ── Card description ── */
.vmw-card-desc {
    font-size: 12px;
    color: #5a5a6e;
    line-height: 1.5;
    margin: 0;
}

/* ── Pause on hover ── */
.vmw-section.vmw-pause-hover .vmw-grid:hover .vmw-col {
    animation-play-state: paused;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .vmw-cols-4 .vmw-col:last-child { display: none; }
}

@media (max-width: 768px) {
    .vmw-grid {
        padding: 0 12px;
    }
    .vmw-cols-3 .vmw-col:last-child,
    .vmw-cols-4 .vmw-col:nth-child(3),
    .vmw-cols-4 .vmw-col:last-child {
        display: none;
    }
    .vmw-section-title {
        font-size: clamp(22px, 5vw, 36px);
    }
}

@media (max-width: 480px) {
    .vmw-cols-2 .vmw-col:last-child,
    .vmw-cols-3 .vmw-col:not(:first-child),
    .vmw-cols-4 .vmw-col:not(:first-child) {
        display: none;
    }
    .vmw-grid {
        height: 500px;
    }
}

/* ============================================================
   HORIZONTAL MARQUEE MODE
   ============================================================ */

/* Horizontal grid: stacks rows vertically, each row scrolls sideways */
.vmw-grid-horizontal {
    display: flex;
    flex-direction: column;
    gap: 18px;
    height: auto !important;   /* override vertical height */
    overflow: visible;
    padding: 0 0;
}

/* Each row is a horizontal strip */
.vmw-row {
    display: flex;
    flex-direction: row;
    gap: 18px;
    will-change: transform;
    overflow: visible;
    white-space: nowrap;
    flex-shrink: 0;
    height: 280px;      /* default, overridden by Elementor control */
}

/* Cards inside horizontal rows */
.vmw-row .vmw-card {
    flex-shrink: 0;
    width: 260px;        /* fixed width for horizontal cards */
    height: 100%;
    white-space: normal;
}

/* In horizontal mode, image fills card height */
.vmw-row .vmw-card .vmw-card-img {
    height: 65%;
}
.vmw-row .vmw-card.tall  .vmw-card-img { height: 72%; }
.vmw-row .vmw-card.short .vmw-card-img { height: 55%; }
.vmw-row .vmw-card.sq    .vmw-card-img { height: 65%; }

.vmw-row .vmw-card-img img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

/* Horizontal fade masks: left & right edges */
.vmw-axis-horizontal.vmw-has-fade::before,
.vmw-axis-horizontal.vmw-has-fade::after {
    width: 160px;
    height: 100%;
    top: 0;
    bottom: 0;
}
.vmw-axis-horizontal.vmw-has-fade::before {
    left: 0;
    right: auto;
    background: linear-gradient(to right, var(--vmw-fade-color, transparent) 0%, transparent 100%);
}
.vmw-axis-horizontal.vmw-has-fade::after {
    right: 0;
    left: auto;
    bottom: auto;
    background: linear-gradient(to left, var(--vmw-fade-color, transparent) 0%, transparent 100%);
}

/* Vertical fade masks: override horizontal for vertical axis */
.vmw-axis-vertical.vmw-has-fade::before {
    top: 0;
    left: 0; right: 0;
    width: auto;
    height: 160px;
    background: linear-gradient(to bottom, var(--vmw-fade-color, transparent) 0%, transparent 100%);
}
.vmw-axis-vertical.vmw-has-fade::after {
    bottom: 0;
    left: 0; right: 0;
    top: auto;
    width: auto;
    height: 160px;
    background: linear-gradient(to top, var(--vmw-fade-color, transparent) 0%, transparent 100%);
}
