/* =========================================================
   SIERRALOADed APPROVED HOMEPAGE
   Dedicated homepage design system.
   ========================================================= */

/* Sora is now loaded site-wide via header.php / inc/assets.php,
   not per-page here, so every template gets the real font. */

.sl-home-approved {
    --sl-blue: #0757a5;
    --sl-blue-dark: #06447f;
    --sl-red: #f5222d;
    --sl-text: #101828;
    --sl-muted: #667085;
    --sl-border: #dfe5ec;
    --sl-bg: #ffffff;
    --sl-panel: #ffffff;
    --sl-radius: 8px;
    --sl-shadow: 0 1px 3px rgba(16,24,40,.04);
    --sl-week-accent: #5b9130;
    font-family: "Sora", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--sl-text);
    background: #fff;
}

.sl-home-approved *,
.sl-home-approved *::before,
.sl-home-approved *::after {
    box-sizing: border-box;
}

.sl-home-approved a {
    color: inherit;
    text-decoration: none;
}

.sl-home-container {
    width: min(1180px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.sl-home-top-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.58fr) minmax(300px, 1.05fr) minmax(230px, .82fr);
    grid-template-rows: auto auto;
    grid-template-areas:
        "featured   latest     sidebar"
        "popvideos  topsongs   sidebar";
    gap: 16px;
    align-items: start;
    margin-top: 18px;
}

.sl-home-featured { grid-area: featured; }
.sl-home-latest { grid-area: latest; }
.sl-home-sidebar { grid-area: sidebar; }
.sl-home-popular-videos-panel { grid-area: popvideos; }
.sl-home-top-songs-panel { grid-area: topsongs; }

.sl-home-featured,
.sl-home-latest,
.sl-home-sidebar,
.sl-home-panel,
.sl-home-category-card {
    min-width: 0;
}

.sl-home-featured {
    border: 1px solid var(--sl-border);
    border-radius: var(--sl-radius);
    background: #f2f4f7;
    box-shadow: var(--sl-shadow);
    overflow: hidden;
}

.sl-home-featured-image {
    display: block;
    aspect-ratio: 16 / 8.1;
    overflow: hidden;
    background: #eef2f6;
}

.sl-home-featured-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sl-home-featured-body {
    padding: 13px 14px 15px;
}

.sl-home-featured-body h1 {
    margin: 0;
    font-size: clamp(25px, 2.25vw, 31px);
    line-height: 1.12;
    letter-spacing: -.035em;
    font-weight: 800;
}

.sl-home-featured-body h1 a:hover,
.sl-home-latest-content h3 a:hover,
.sl-home-three-card h3 a:hover,
.sl-home-recommended-item h3 a:hover,
.sl-home-category-card li a:hover {
    color: var(--sl-blue);
}

.sl-home-featured-excerpt {
    margin: 9px 0 10px;
    font-size: 14px;
    line-height: 1.48;
    color: #475467;
}

.sl-home-featured-time {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--sl-muted);
    font-size: 12px;
    line-height: 1.3;
}

.sl-home-section-heading,
.sl-home-side-heading {
    display: flex;
    align-items: center;
    gap: 9px;
}

.sl-home-section-heading {
    min-height: 32px;
    padding: 0 0 9px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--sl-border);
}

.sl-home-section-heading::before,
.sl-home-side-heading > span {
    content: "";
    display: block;
    flex: 0 0 auto;
    width: 6px;
    height: 16px;
    border-radius: 1px;
    background: var(--sl-red);
}

.sl-home-section-heading h2,
.sl-home-side-heading h2 {
    margin: 0;
    font-size: 16px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -.015em;
}

.sl-home-section-heading a {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
    font-size: 11px;
    font-weight: 500;
    color: #344054;
}

.sl-home-section-heading a:hover {
    color: var(--sl-blue);
}

/* Popular Videos / Top Songs headings use a play-circle marker
   instead of the standard red bar, matching the old theme's
   convention for media sections. */
.sl-home-section-heading--media::before {
    content: "▶";
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #111417;
    color: #fff;
    font-size: 8px;
    line-height: 18px;
    text-align: center;
    padding-left: 1px;
}

.sl-home-latest {
    padding: 0;
}

.sl-home-latest-list {
    display: flex;
    flex-direction: column;
}

.sl-home-latest-item {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--sl-border);
}

.sl-home-latest-item:first-child {
    padding-top: 0;
}

.sl-home-latest-item:last-child {
    border-bottom: 0;
}

.sl-home-latest-image {
    display: block;
    width: 82px;
    height: 61px;
    overflow: hidden;
    border-radius: 5px;
    background: #eef2f6;
}

.sl-home-latest-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sl-home-latest-content {
    min-width: 0;
}

.sl-home-latest-content h3 {
    margin: 0 0 4px;
    font-size: 13px;
    line-height: 1.24;
    font-weight: 700;
    letter-spacing: -.01em;
}

.sl-home-latest-content span {
    display: block;
    color: var(--sl-muted);
    font-size: 11px;
    line-height: 1.2;
}

.sl-home-sidebar {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sl-home-subscription,
.sl-home-ad {
    border: 1px solid var(--sl-border);
    border-radius: var(--sl-radius);
    background: var(--sl-panel);
    box-shadow: var(--sl-shadow);
    overflow: hidden;
}

.sl-home-subscription {
    padding: 13px;
}

.sl-home-side-heading {
    margin-bottom: 9px;
}

.sl-home-side-heading h2 {
    font-size: 15px;
}

.sl-home-subscription p {
    margin: 0 0 10px;
    font-size: 13px;
    line-height: 1.45;
    color: #344054;
}

.sl-home-subscription-form {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.sl-home-subscription-form input {
    width: 100%;
    min-height: 35px;
    padding: 7px 10px;
    border: 1px solid #d0d5dd;
    border-radius: 4px;
    background: #fff;
    color: var(--sl-text);
    font: inherit;
    font-size: 12px;
    outline: none;
}

.sl-home-subscription-form input:focus {
    border-color: var(--sl-blue);
}

.sl-home-subscription-form button {
    width: 100%;
    min-height: 35px;
    border: 0;
    border-radius: 4px;
    background: var(--sl-red);
    color: #fff;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.sl-home-subscription-form button:hover {
    filter: brightness(.94);
}

.sl-home-ad {
    padding: 0;
}

.sl-home-ad .sl-ad {
    margin: 0;
    width: 100%;
    overflow: hidden;
}

.sl-home-ad .sl-ad img,
.sl-home-ad .sl-ad iframe,
.sl-home-ad .sl-ad > * {
    max-width: 100%;
}

/* =========================================================
   MUSIC OF THE WEEK / VIDEO OF THE WEEK
   Black card: dark header bar, image with play icon,
   coloured caption bar with the title — matches old theme.
   ========================================================= */

.sl-home-week-card {
    border-radius: var(--sl-radius);
    background: #17181a;
    box-shadow: var(--sl-shadow);
    overflow: hidden;
}

.sl-home-week-heading {
    padding: 10px 12px;
    text-align: center;
}

.sl-home-week-heading h2 {
    margin: 0;
    color: #fff;
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.sl-home-week-image {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0c0d0e;
}

.sl-home-week-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sl-home-week-caption {
    padding: 10px 12px;
    text-align: center;
    background: var(--sl-week-accent, #3d9a4f);
}

.sl-home-week-caption a {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
}

.sl-home-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 32px;
    height: 32px;
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #16181b;
    color: #fff;
    font-size: 11px;
    line-height: 1;
    padding-left: 2px;
    border: none;
}

.sl-home-panel {
    border: 1px solid var(--sl-border);
    border-radius: var(--sl-radius);
    background: var(--sl-panel);
    box-shadow: var(--sl-shadow);
    padding: 12px;
}

.sl-home-three-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px;
}

.sl-home-three-card {
    min-width: 0;
}

.sl-home-three-image {
    position: relative;
    display: block;
    aspect-ratio: 1.38 / 1;
    overflow: hidden;
    border-radius: 5px;
    background: #eef2f6;
}

.sl-home-three-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sl-home-three-card h3 {
    margin: 7px 0 0;
    font-size: 13px;
    line-height: 1.28;
    font-weight: 700;
}

.sl-home-three-card p {
    margin: 3px 0 0;
    font-size: 11px;
    line-height: 1.25;
    color: var(--sl-muted);
}

.sl-home-three-card .sl-home-play {
    width: 32px;
    height: 32px;
}

/* =========================================================
   TOP SONGS — faded background image, title + icon overlay
   Matches the old theme's media-list treatment.
   ========================================================= */

.sl-home-song-rows {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.sl-home-song-row {
    position: relative;
    display: block;
    aspect-ratio: 5.4 / 1;
    border-radius: 6px;
    overflow: hidden;
    background: #1b1b1b;
}

.sl-home-song-row img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(.5);
}

.sl-home-song-row::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,.15) 60%);
}

.sl-home-song-row-title {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.22;
}

.sl-home-media-icon {
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #111417;
    color: #fff;
    font-size: 8px;
    padding-left: 1px;
    border: 1px solid rgba(255,255,255,.35);
}

.sl-home-recommended {
    margin-top: 16px;
}

.sl-home-recommended-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.sl-home-recommended-item {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-width: 0;
}

.sl-home-recommended-item > a {
    display: block;
    width: 88px;
    height: 65px;
    overflow: hidden;
    border-radius: 5px;
    background: #eef2f6;
}

.sl-home-recommended-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sl-home-recommended-item h3 {
    margin: 0;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 600;
}

.sl-home-category-section {
    margin-top: 16px;
    margin-bottom: 22px;
}

.sl-home-category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.sl-home-category-card {
    border: 1px solid var(--sl-border);
    border-radius: var(--sl-radius);
    background: #fff;
    padding: 11px;
    box-shadow: var(--sl-shadow);
}

.sl-home-category-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 9px;
}

.sl-home-category-heading h2 {
    margin: 0;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
}

.sl-home-category-heading h2::before {
    content: "";
    display: inline-block;
    vertical-align: -2px;
    width: 6px;
    height: 15px;
    margin-right: 7px;
    border-radius: 1px;
    background: var(--sl-red);
}

.sl-home-category-heading::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--sl-border);
}

.sl-home-category-image {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 2.05 / 1;
    overflow: hidden;
    border-radius: 4px;
    background: #eef2f6;
}

.sl-home-category-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sl-home-category-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.82), rgba(0,0,0,0) 65%);
}

.sl-home-category-image-title {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 22px 10px 10px;
    color: #fff;
    font-size: 13px;
    line-height: 1.28;
    font-weight: 700;
    z-index: 1;
}

.sl-home-category-card ul {
    margin: 8px 0 0;
    padding-left: 16px;
}

.sl-home-category-card li {
    margin: 0 0 5px;
    padding-left: 1px;
    font-size: 11.5px;
    line-height: 1.28;
}

.sl-home-category-card li:last-child {
    margin-bottom: 0;
}

.sl-home-category-more {
    display: block;
    width: fit-content;
    margin: 12px auto 0;
    padding: 7px 18px;
    border-radius: 999px;
    background: #fde8e8;
    color: var(--sl-red);
    font-size: 11.5px;
    font-weight: 700;
    text-align: center;
}

.sl-home-category-more:hover {
    background: #fbd3d3;
}

/* Remove legacy homepage presentation if older classes are still
   emitted by cached fragments. */
.sl-home-approved .sl-home-block-title,
.sl-home-approved .sl-home-section-heading > span:not(.sl-home-play) {
    /* intentional neutralization; actual red marker is generated above */
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1050px) {
    .sl-home-top-grid {
        grid-template-columns: minmax(0, 1.5fr) minmax(270px, 1fr);
        grid-template-areas:
            "featured   latest"
            "popvideos  topsongs"
            "sidebar    sidebar";
    }

    .sl-home-sidebar {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 10px;
    }

    .sl-home-subscription,
    .sl-home-ad,
    .sl-home-week-card {
        min-width: 0;
    }
}

@media (max-width: 780px) {
    .sl-home-container {
        width: min(100% - 20px, 620px);
    }

    .sl-home-top-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "featured"
            "latest"
            "popvideos"
            "topsongs"
            "sidebar";
    }

    .sl-home-sidebar {
        grid-column: auto;
        display: flex;
    }

    .sl-home-recommended-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sl-home-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .sl-home-container {
        width: calc(100% - 16px);
    }

    .sl-home-top-grid {
        margin-top: 10px;
    }

    .sl-home-featured-body h1 {
        font-size: 24px;
    }

    .sl-home-three-cards {
        grid-template-columns: 1fr;
    }

    .sl-home-three-card {
        display: grid;
        grid-template-columns: 115px minmax(0, 1fr);
        gap: 10px;
        align-items: center;
    }

    .sl-home-three-card .sl-home-three-image {
        grid-row: span 2;
        aspect-ratio: 1.35 / 1;
    }

    .sl-home-three-card h3 {
        margin: 0;
    }

    .sl-home-recommended-grid,
    .sl-home-category-grid {
        grid-template-columns: 1fr;
    }

    .sl-home-recommended-item {
        grid-template-columns: 100px minmax(0, 1fr);
    }

    .sl-home-recommended-item > a {
        width: 100px;
        height: 74px;
    }
}

/* =========================================================
   MID-PAGE LEADERBOARD AD
   Keeps the second Group 1 advertisement in its own
   horizontal block before Recommended for You.
   ========================================================= */

.sl-home-mid-ad {
    width: 100%;
    margin: 20px auto 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 0;
}

.sl-home-mid-ad .sl-ad {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.sl-home-mid-ad .sl-ad > * {
    max-width: 100%;
}

.sl-home-mid-ad img,
.sl-home-mid-ad iframe {
    max-width: 100%;
    height: auto;
}

@media (max-width: 767px) {
    .sl-home-mid-ad {
        margin: 16px auto;
    }
}

