:root {
    --fl-bg: #f5f7fb;
    --fl-surface: #ffffff;
    --fl-surface-soft: #eef8f6;
    --fl-text: #17212b;
    --fl-muted: #657384;
    --fl-primary: #00b89c;
    --fl-primary-dark: #008f7d;
    --fl-border: #dfe7ef;
    --fl-shadow: 0 10px 30px rgba(18, 32, 47, 0.09);
    --fl-radius: 8px;
}

html {
    background: var(--fl-bg);
}

body {
    background: linear-gradient(180deg, #eef8f6 0, #f7f9fc 240px, var(--fl-bg) 100%);
    color: var(--fl-text);
    font-family: Arial, "Helvetica Neue", sans-serif;
    line-height: 1.55;
}

.navbar.is-primary {
    background: #099f8d;
    box-shadow: 0 6px 18px rgba(12, 37, 52, 0.13);
}

.navbar .navbar-item {
    font-weight: 700;
}

.navbar .navbar-end .navbar-item {
    font-size: 0.94rem;
}

.navbar .navbar-end .navbar-item:hover,
.navbar .navbar-end .navbar-item:focus {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.section,
.hero,
.hero-body {
    padding: 1.75rem 1rem !important;
    margin: 0 !important;
}

body > section:first-of-type .box {
    border: 1px solid var(--fl-border);
    border-radius: var(--fl-radius);
    box-shadow: var(--fl-shadow);
    padding: 1.5rem;
    margin: 1.25rem auto;
    max-width: 980px;
}

body > section:first-of-type .title {
    color: var(--fl-text);
    font-size: clamp(1.55rem, 3vw, 2.2rem);
    line-height: 1.14;
    margin-bottom: 0.75rem;
}

body > section:first-of-type .subtitle,
body > section:first-of-type p {
    color: var(--fl-muted);
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
}

.agenda-box {
    padding-top: 0.75rem !important;
}

.agenda-box > .container:first-child .box {
    background: var(--fl-surface) !important;
    border: 1px solid var(--fl-border);
    border-radius: var(--fl-radius);
    box-shadow: var(--fl-shadow);
    padding: 1rem;
}

.input,
.select select {
    border-color: var(--fl-border);
    border-radius: var(--fl-radius);
    min-height: 44px;
    box-shadow: none;
}

.input:focus,
.select select:focus {
    border-color: var(--fl-primary);
    box-shadow: 0 0 0 3px rgba(0, 184, 156, 0.16);
}

#tituloAgenda {
    background: #0aa48f !important;
    color: #fff !important;
    border-radius: var(--fl-radius) var(--fl-radius) 0 0 !important;
    padding: 0.7rem 1rem !important;
    letter-spacing: 0;
}

.eventos-lista {
    display: flex;
    gap: 0;
    border: 1px solid var(--fl-border);
    border-radius: var(--fl-radius);
    overflow: hidden;
    background: var(--fl-surface);
    box-shadow: var(--fl-shadow);
}

.evento {
    border: 0;
    border-bottom: 1px solid var(--fl-border);
    border-radius: 0;
    box-shadow: none;
    padding: 0;
}

.evento:last-child {
    border-bottom: 0;
}

.evento-fila {
    min-height: 58px;
    padding: 0.75rem 0.9rem;
    gap: 0.75rem;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.evento-fila:hover {
    background: var(--fl-surface-soft);
}

.evento-hora {
    flex: 0 0 54px;
    color: #0a7568;
    font-size: 0.95rem;
    text-align: center;
}

.evento-logo-img {
    width: 30px;
    height: 30px;
    max-width: 30px;
    max-height: 30px;
}

.evento-nombre {
    min-width: 0;
    color: var(--fl-text);
    white-space: normal;
}

.canales-lista {
    background: #f8fafc;
    padding: 0.35rem 0.75rem 0.75rem;
}

.canal {
    display: block;
    padding: 0.55rem 0;
}

.canal p {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.canal a {
    margin-left: 0;
}

.canales-lista .button.is-link,
.button.is-primary {
    background: var(--fl-primary);
    border-color: var(--fl-primary);
    border-radius: var(--fl-radius);
    color: #fff;
    font-weight: 700;
}

.canales-lista .button.is-link:hover,
.button.is-primary:hover {
    background: var(--fl-primary-dark);
    border-color: var(--fl-primary-dark);
}

.container > section .subtitle,
.canales-lista > .subtitle {
    color: var(--fl-text);
    font-weight: 800;
    margin: 2rem 0 1rem;
}

#canalesLista.columns {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
}

#canalesLista .column,
.canal-item {
    padding: 0.5rem;
}

.card {
    height: 100%;
    border: 1px solid var(--fl-border);
    border-radius: var(--fl-radius);
    box-shadow: 0 6px 18px rgba(18, 32, 47, 0.07);
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 184, 156, 0.35);
    box-shadow: 0 12px 28px rgba(18, 32, 47, 0.12);
}

.card-image {
    background: #fff;
    padding: 0.85rem 0.85rem 0;
}

.card-image .image {
    background: #f5f7fb;
    border-radius: var(--fl-radius);
    overflow: hidden;
}

.card-image img {
    border-radius: 0;
    object-fit: contain;
    padding: 0.8rem;
}

.card-content {
    padding: 1rem;
}

.card-content h3.title {
    min-height: 2.6em;
    color: var(--fl-text);
    font-size: 1rem !important;
    line-height: 1.25;
    margin-bottom: 0.85rem;
}

.channels-page,
.player-page {
    padding-top: 1.5rem !important;
}

.channels-page > .container:first-child {
    max-width: 760px;
    margin-bottom: 1rem;
}

.pagination {
    padding: 1rem;
}

.pagination-link,
.pagination-previous,
.pagination-next {
    border-radius: var(--fl-radius);
}

.player-page > .container {
    max-width: 1120px;
}

.player-page .title {
    color: var(--fl-text);
    line-height: 1.12;
    margin-bottom: 1rem !important;
}

.player-page .button {
    border-radius: var(--fl-radius);
    font-weight: 700;
}

.tabs.is-toggle li a {
    border-color: var(--fl-border);
    color: var(--fl-text);
    font-weight: 700;
}

.tabs.is-toggle li.is-active a {
    background: var(--fl-primary);
    border-color: var(--fl-primary);
}

.player-page .card {
    background: #111820;
    border-color: #111820;
    box-shadow: 0 14px 36px rgba(12, 18, 25, 0.24);
}

.player-page .card:hover {
    transform: none;
}

.player-page .preframe {
    border-radius: var(--fl-radius);
    overflow: hidden;
}

.player-page .content {
    background: var(--fl-surface);
    border: 1px solid var(--fl-border);
    border-radius: var(--fl-radius);
    box-shadow: var(--fl-shadow);
    padding: 1.25rem;
}

.player-page .content h1,
.player-page .content h2,
.player-page .content h3 {
    color: var(--fl-text);
    line-height: 1.2;
}

.player-page .content p,
.player-page .content li {
    color: #334155;
}

footer.has-background-dark {
    margin-top: 2rem;
    padding: 1.5rem 1rem;
    background: #111820 !important;
}

footer .button.footer-link {
    border-radius: var(--fl-radius);
}

@media screen and (min-width: 1024px) {
    .custom-eventos-container {
        max-width: 860px;
    }

    #canalesLista.columns {
        align-items: stretch;
    }
}

@media screen and (max-width: 768px) {
    body {
        background: #f7f9fc;
    }

    .section,
    .hero,
    .hero-body {
        padding: 1rem 0.75rem !important;
    }

    .navbar-brand {
        min-height: 3.5rem;
    }

    .navbar-menu.is-active {
        box-shadow: 0 12px 22px rgba(18, 32, 47, 0.16);
    }

    body > section:first-of-type .box {
        margin: 0.75rem 0.75rem 1rem;
        padding: 1rem;
    }

    body > section:first-of-type .title {
        font-size: 1.45rem;
    }

    .agenda-box > .container:first-child .box {
        padding: 0.85rem;
    }

    .evento-fila {
        min-height: 62px;
        padding: 0.8rem;
        align-items: flex-start;
    }

    .evento-hora {
        flex-basis: 46px;
        font-size: 0.9rem;
        padding-top: 0.15rem;
    }

    .evento-nombre {
        font-size: 0.95rem;
        line-height: 1.3;
    }

    .canal p {
        align-items: flex-start;
    }

    #canalesLista .column,
    .canal-item {
        padding: 0.45rem 0.75rem;
    }

    .card:hover {
        transform: none;
    }

    .card-content {
        padding: 0.9rem;
    }

    .card-content h3.title {
        min-height: auto;
    }

    .player-page .title {
        font-size: 1.35rem !important;
    }

    .player-page .columns.is-mobile .column {
        padding: 0.25rem;
    }

    .player-page .columns.is-mobile .button span:not(.icon) {
        font-size: 0.82rem;
    }

    .tabs ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    .tabs.is-toggle li {
        margin: 0.2rem;
    }

    .tabs.is-toggle li a {
        border-radius: var(--fl-radius) !important;
    }

    .player-page .content {
        padding: 1rem;
        font-size: 0.95rem;
    }
}
