.waiv-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    font-family: "Montserrat", Arial, Helvetica, sans-serif;
}

.waiv-header {
    max-width: 760px;
    margin: 0 auto 36px;
    text-align: center;
}

.waiv-heading {
    font-size: 2rem;
    font-weight: 800;
    color: #1a2233;
    margin: 0 0 14px;
}

.waiv-subtext {
    font-size: 1rem;
    line-height: 1.6;
    color: #4a5568;
    margin: 0;
}

/* ==========================================================================
   FEATURED VIDEO
   ========================================================================== */

.waiv-featured {
    margin-bottom: 40px;
}

.waiv-featured .waiv-card {
    max-width: 800px;
    margin: 0 auto;
}

.waiv-featured .waiv-card-title {
    font-size: 1.3rem;
    text-align: center;
}

.waiv-featured .waiv-card-desc {
    text-align: center;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================================================
   GRID
   ========================================================================== */

.waiv-grid {
    display: grid;
    grid-template-columns: repeat(var(--waiv-columns, 3), 1fr);
    gap: 32px;
}

.waiv-card {
    display: flex;
    flex-direction: column;
}

.waiv-embed-wrapper {
    position: relative;
    width: 100%;
    background-color: #111;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: 0 4px 16px rgba(20, 30, 50, .08);
    cursor: pointer;
}

.waiv-ratio-16-9 { padding-top: 56.25%; }
.waiv-ratio-9-16 { padding-top: 177.78%; }
.waiv-ratio-1-1  { padding-top: 100%; }

/* Small grid-card thumbnails: cap portrait/square videos so they don't
   blow up huge in a 3-column grid. The featured player (below) is
   explicitly excluded from this constraint. */
.waiv-grid .waiv-ratio-9-16,
.waiv-grid .waiv-ratio-1-1 {
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

/* Featured player: always a fixed landscape-shaped box regardless of
   the loaded video's own aspect ratio. A portrait/square video gets
   pillarboxed (black bars left/right) inside it instead of stretching
   the whole page tall. */
.waiv-featured .waiv-embed-wrapper {
    padding-top: 0 !important;
    height: 450px;
    max-height: 60vh;
    max-width: 100%;
    background-color: #000;
}

.waiv-featured .waiv-facade-thumb {
    object-fit: contain !important;
    background-color: #000;
}

.waiv-embed-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.waiv-facade-thumb {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 !important;
    max-width: none !important;
}

.waiv-facade-thumb-blank {
    background: linear-gradient(145deg, #2a3244, #161b26);
}

.waiv-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .35));
    transition: transform .15s ease;
}

.waiv-embed-wrapper:hover .waiv-play-btn {
    transform: translate(-50%, -50%) scale(1.08);
}

.waiv-embed-wrapper.waiv-loaded .waiv-play-btn,
.waiv-embed-wrapper.waiv-loaded .waiv-facade-thumb {
    display: none;
}

.waiv-card-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #1a2233;
    line-height: 1.35;
    margin: 0 0 8px;
}

.waiv-card-desc {
    font-size: .9rem;
    line-height: 1.6;
    color: #55637a;
    margin: 0;
}

@media (max-width: 900px) {
    .waiv-grid {
        grid-template-columns: 1fr;
    }
    .waiv-featured .waiv-embed-wrapper {
        height: 260px;
        max-height: 45vh;
    }
}
