.cm-home-reels {
    box-sizing: border-box;
    width: calc(100% - 48px);
    max-width: 1680px;
    margin: 48px auto;
    padding: 32px 24px 24px;
    border: 1px solid #dfe4eb;
    border-top: 3px solid #b20c17;
    border-bottom: 1px solid #dfe4eb;
    background: #f1f3f6;
    color: #172438;
}

.cm-home-reels > .container {
    width: 100%;
    max-width: none;
    padding: 0;
}

.cm-home-reels [hidden],
.cm-home-reels[hidden] {
    display: none !important;
}

.cm-home-reels-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.cm-home-reels-eyebrow {
    display: block;
    margin-bottom: 8px;
    color: #a90e19;
    font-family: var(--font-sans, sans-serif);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.cm-home-reels-heading h2 {
    margin: 0;
    font-family: var(--font-serif, Georgia, serif);
    font-size: clamp(1.8rem, 3vw, 2.75rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.025em;
}

.cm-home-reels-heading p {
    margin: 10px 0 0;
    color: #526174;
    font-size: 0.95rem;
    line-height: 1.5;
}

.cm-home-reels-actions,
.cm-home-reels-navigation {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cm-home-reels-actions { flex-wrap: wrap; justify-content: flex-end; }

.cm-home-reels-profile {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 9px 14px;
    border: 1px solid #c8d0db;
    border-radius: 24px !important;
    color: #172438;
    background: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
}

.cm-home-reels-navigation button {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid #c8d0db;
    border-radius: 50% !important;
    background: #fff;
    color: #172438;
    font-size: 1.25rem;
    cursor: pointer;
}

.cm-home-reels-navigation button:disabled { opacity: 0.4; cursor: default; }
.cm-home-reels-navigation button:enabled:hover { border-color: #b20c17; color: #b20c17; }

.cm-home-reels-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 112px) / 8);
    gap: 16px;
    margin: 0;
    padding: 4px 0 12px;
    list-style: none;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: #bac2cc transparent;
}

.cm-home-reel { position: relative; min-width: 0; scroll-snap-align: start; }

.cm-home-reel-link {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 12px;
    color: #fff;
    text-decoration: none;
    background: #172438;
    isolation: isolate;
}

.cm-home-reel-cover {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 9 / 16;
    overflow: hidden;
    background: linear-gradient(145deg, #34465c, #111b2a);
}

.cm-home-reel-cover::after {
    position: absolute;
    inset: 0;
    content: '';
    background: linear-gradient(180deg, #08101c22 0%, transparent 25%, #08101cdd 55%, #08101c 100%);
    pointer-events: none;
}

.cm-home-reel-placeholder {
    font-family: var(--font-serif, Georgia, serif);
    font-size: 3rem;
    font-weight: 700;
    color: #ffffff38;
}

.cm-home-reel-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.cm-home-reel-play {
    position: absolute;
    z-index: 1;
    top: 14px;
    right: 12px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding-left: 2px;
    border: 1px solid #ffffff99;
    border-radius: 50% !important;
    background: #101a28a6;
    color: #fff;
    font-size: 0.8rem;
}

.cm-home-reel-label {
    position: absolute;
    z-index: 1;
    top: 20px;
    left: 12px;
    padding: 4px 6px;
    background: #101a28cc;
    color: #fff;
    font-family: var(--font-sans, sans-serif);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.cm-home-reel-title {
    position: absolute;
    z-index: 1;
    right: 14px;
    bottom: 34px;
    left: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #fff;
    font-family: var(--font-serif, Georgia, serif);
    font-size: clamp(1rem, 1.3vw, 1.25rem);
    font-weight: 700;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.cm-home-reel-date {
    position: absolute;
    z-index: 1;
    right: 14px;
    bottom: 14px;
    left: 14px;
    color: #e0e6ed;
    font-family: var(--font-sans, sans-serif);
    font-size: 0.68rem;
}

.cm-home-reel-link:is(:hover, :focus-visible) .cm-home-reel-play { background: #b20c17; }
.cm-home-reels :is(a, button, ul):focus-visible { outline: 3px solid #b20c17; outline-offset: 3px; }
.cm-home-reels-caption { margin: 8px 0 0; color: #526174; font-size: 0.75rem; }
.cm-home-reels-editor, .cm-home-reels-edit-slot { position: relative; margin-bottom: 12px; }
.cm-home-reels-edit-slot { min-height: 72px; padding-top: 48px; }

.cm-home-reels-player {
    position: fixed;
    inset: 0;
    box-sizing: border-box;
    width: min(460px, calc(100% - 24px));
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    margin: auto;
    padding: 14px;
    overflow: auto;
    overscroll-behavior: contain;
    border: 0;
    border-radius: 12px;
    background: #fff;
    color: #172438;
}
.cm-home-reels-player::backdrop { background: #101a28c9; }
.cm-home-reels-player-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.cm-home-reels-player-head h3 { margin: 0; color: #172438; font-size: 1rem; overflow-wrap: anywhere; }
.cm-home-reels-player-head button { flex: 0 0 44px; height: 44px; border: 1px solid #dfe4eb; border-radius: 6px; background: #fff; color: #172438; cursor: pointer; }
.cm-home-reels-player iframe {
    display: block;
    width: 100%;
    height: clamp(160px, calc(100vh - 168px), 650px);
    height: clamp(160px, calc(100dvh - 168px), 650px);
    border: 0;
}
.cm-home-reels-external { display: inline-block; margin-top: 10px; }

@media (max-width: 1399px) {
    .cm-home-reels-grid { grid-auto-columns: calc((100% - 48px) / 4); }
}
@media (max-width: 768px) {
    .cm-home-reels { width: calc(100% - var(--cm-mobile-gutter-total, 24px)); margin: 32px auto; padding: 24px 14px 20px; }
    .cm-home-reels-heading { align-items: start; flex-direction: column; gap: 16px; margin-bottom: 16px; }
    .cm-home-reels-actions { width: 100%; justify-content: space-between; }
    .cm-home-reels-heading p { font-size: 0.875rem; }
    .cm-home-reels-grid { grid-auto-columns: min(72%, 280px); gap: 12px; }
    .cm-home-reel-title { font-size: 1.25rem; }
}
