/* ==========================================================
   dimosTV Homepage v2
   Clean layout layer
========================================================== */

body {
    background: var(--dtv-color-background, #F5F7FB);
}

/* ==========================================================
   Page Layout
========================================================== */

.dtv-front-section,
.dtv-carousel-section {
    margin: var(--dtv-space-3xl, 72px) 0;
}

/* ==========================================================
   Homepage Presentation Add-ons — Municipalities / Popular / Newsletter
   Keeps the EPIC07.4A visual language: dark panels, red accents,
   compact video-portal rhythm.
========================================================== */

.dtv-home-after-highlights {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(320px, .82fr);
    gap: 28px;
    align-items: stretch;
    margin: 38px 0 0;
}

.dtv-home-discover-municipalities,
.dtv-home-popular-videos {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background:
        radial-gradient(circle at 12% 0%, rgba(204,0,0,.18), transparent 30%),
        linear-gradient(135deg, #05070B 0%, #101827 58%, #07111F 100%);
    color: #fff;
    box-shadow: 0 22px 54px rgba(15,23,42,.18);
}

.dtv-home-discover-municipalities {
    padding: 28px 28px 24px;
}

.dtv-home-popular-videos {
    padding: 24px;
}

.dtv-home-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.dtv-home-block-head h2 {
    margin: 0;
    color: #fff;
    font-family: Oswald, sans-serif;
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.dtv-home-block-head h2::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 20px;
    margin-right: 10px;
    border-radius: 999px;
    vertical-align: -3px;
    background: #CC0000;
}

.dtv-home-block-head a {
    color: rgba(255,255,255,.82);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
    text-decoration: none;
    white-space: nowrap;
}

.dtv-home-block-head a::after {
    content: " ›";
    color: #CC0000;
    font-size: 16px;
    line-height: 0;
}

.dtv-home-municipality-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(86px, 1fr));
    gap: 18px;
}

.dtv-home-municipality-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: #fff;
    text-decoration: none;
}

.dtv-home-municipality-logo {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(74px, 7vw, 116px);
    height: clamp(74px, 7vw, 116px);
    border-radius: 50%;
    background: #fff;
    border: 4px solid rgba(255,255,255,.94);
    box-shadow: 0 18px 36px rgba(0,0,0,.28);
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease;
}

.dtv-home-municipality-chip:hover .dtv-home-municipality-logo {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 22px 44px rgba(0,0,0,.34);
}

.dtv-home-municipality-logo img {
    display: block;
    width: 76%;
    height: 76%;
    max-width: 76%;
    max-height: 76%;
    object-fit: contain;
    border-radius: 0;
}

.dtv-home-municipality-logo > span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #F5F7FB, #DCE6F4);
    color: #1A2E4A;
    font-family: Oswald, sans-serif;
    font-size: 30px;
    font-weight: 900;
}

.dtv-home-municipality-logo em {
    position: absolute;
    right: -6px;
    top: 8px;
    padding: 4px 7px;
    border-radius: 999px;
    background: #CC0000;
    color: #fff;
    font-size: 9px;
    font-style: normal;
    font-weight: 900;
    letter-spacing: .08em;
    box-shadow: 0 8px 18px rgba(204,0,0,.32);
}

.dtv-home-municipality-chip strong {
    max-width: 100%;
    color: #fff;
    font-family: Oswald, sans-serif;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.1;
    text-align: center;
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dtv-home-popular-list {
    display: grid;
    gap: 13px;
}

.dtv-home-popular-item {
    display: grid;
    grid-template-columns: 42px 84px 1fr;
    gap: 14px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    color: #fff;
    text-decoration: none;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    transition: background .22s ease, transform .22s ease, border-color .22s ease;
}

.dtv-home-popular-item:hover {
    transform: translateX(3px);
    background: rgba(255,255,255,.10);
    border-color: rgba(204,0,0,.35);
}

.dtv-home-popular-rank {
    color: #CC0000;
    font-family: Oswald, sans-serif;
    font-size: 24px;
    font-weight: 900;
    text-align: center;
}

.dtv-home-popular-thumb {
    position: relative;
    display: block;
    height: 54px;
    border-radius: 12px;
    overflow: hidden;
    background: #0F172A;
}

.dtv-home-popular-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dtv-home-popular-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.42), transparent);
}

.dtv-home-popular-thumb i {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: rgba(255,255,255,.22);
    border: 1px solid rgba(255,255,255,.38);
    color: #fff;
    font-size: 10px;
    font-style: normal;
}

.dtv-home-popular-copy {
    min-width: 0;
}

.dtv-home-popular-copy strong {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.2;
}

.dtv-home-popular-copy small {
    display: block;
    margin-top: 6px;
    color: rgba(255,255,255,.58);
    font-size: 12px;
    font-weight: 700;
}

.dtv-home-newsletter-strip {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
    gap: 28px;
    align-items: center;
    margin: 28px 0 72px;
    padding: 28px 32px;
    border-radius: 24px;
    background: linear-gradient(135deg, #1A2E4A 0%, #10213A 62%, #CC0000 160%);
    color: #fff;
    box-shadow: 0 20px 48px rgba(15,23,42,.18);
}

.dtv-home-newsletter-copy span {
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(204,0,0,.22);
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.dtv-home-newsletter-copy h2 {
    margin: 14px 0 0;
    color: #fff;
    font-family: Oswald, sans-serif;
    font-size: clamp(20px, 2vw, 30px);
    font-weight: 900;
    line-height: 1.05;
}

.dtv-home-newsletter-copy p {
    margin: 9px 0 0;
    max-width: 720px;
    color: rgba(255,255,255,.72);
    font-size: 15px;
    line-height: 1.5;
}

.dtv-home-newsletter-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 8px;
    border-radius: 999px;
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.14);
}

.dtv-home-newsletter-form input[type="email"] {
    min-height: 48px;
    border: 0;
    outline: 0;
    border-radius: 999px;
    padding: 0 18px;
    background: rgba(255,255,255,.94);
    color: #0F172A;
    font-size: 15px;
    font-weight: 700;
}

.dtv-home-newsletter-form button {
    min-height: 48px;
    border: 0;
    border-radius: 999px;
    padding: 0 22px;
    background: #CC0000;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .06em;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(204,0,0,.28);
}

@media (max-width: 1180px) {
    .dtv-home-after-highlights {
        grid-template-columns: 1fr;
    }

    .dtv-home-municipality-grid {
        grid-template-columns: repeat(5, minmax(76px, 1fr));
    }
}

@media (max-width: 820px) {
    .dtv-home-municipality-grid {
        grid-template-columns: repeat(3, minmax(82px, 1fr));
    }

    .dtv-home-newsletter-strip {
        grid-template-columns: 1fr;
        padding: 24px;
    }
}

@media (max-width: 560px) {
    .dtv-home-municipality-grid {
        grid-template-columns: repeat(2, minmax(92px, 1fr));
    }

    .dtv-home-popular-item {
        grid-template-columns: 34px 72px 1fr;
        gap: 10px;
    }

    .dtv-home-newsletter-form {
        grid-template-columns: 1fr;
        border-radius: 20px;
    }

    .dtv-home-newsletter-form input[type="email"],
    .dtv-home-newsletter-form button {
        border-radius: 16px;
    }
}

/* EPIC07.4A municipality chips: use existing ACF dimos_logo and premium hover action. */
.dtv-home-municipality-chip:hover .dtv-home-municipality-logo,
.dtv-home-municipality-chip:focus-visible .dtv-home-municipality-logo {
    border-color: #CC0000;
    box-shadow: 0 22px 48px rgba(204,0,0,.28), 0 18px 36px rgba(0,0,0,.34);
}

.dtv-home-municipality-logo::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(10, 16, 28, .72);
    opacity: 0;
    transition: opacity .22s ease;
}

.dtv-home-municipality-logo b {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    color: #fff;
    font-family: Oswald, sans-serif;
    font-size: 10px;
    font-weight: 900;
    font-style: normal;
    line-height: 1.15;
    letter-spacing: .08em;
    text-align: center;
    text-transform: uppercase;
    opacity: 0;
    transform: scale(.94);
    transition: opacity .22s ease, transform .22s ease;
}

.dtv-home-municipality-chip:hover .dtv-home-municipality-logo::after,
.dtv-home-municipality-chip:focus-visible .dtv-home-municipality-logo::after,
.dtv-home-municipality-chip:hover .dtv-home-municipality-logo b,
.dtv-home-municipality-chip:focus-visible .dtv-home-municipality-logo b {
    opacity: 1;
}

.dtv-home-municipality-chip:hover .dtv-home-municipality-logo b,
.dtv-home-municipality-chip:focus-visible .dtv-home-municipality-logo b {
    transform: scale(1);
}

.dtv-home-municipality-chip:hover .dtv-home-municipality-logo img,
.dtv-home-municipality-chip:focus-visible .dtv-home-municipality-logo img {
    transform: scale(1.06);
}

.dtv-home-municipality-logo img {
    transition: transform .25s ease;
    position: relative;
    z-index: 1;
}
