/*
Theme Name: PartidosHoy
Theme URI: https://partidoshoy.futbol/
Author: CANOSYS
Author URI: https://canosys.com/
Description: Theme liviano para partidos, livescores, predicciones y contenido SEO deportivo.
Version: 0.1.0
Requires at least: 6.3
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: partidoshoy
*/

:root {
    color-scheme: dark;
    --ph-bg: #061017;
    --ph-bg-soft: #0a1722;
    --ph-surface: rgba(15, 28, 41, 0.88);
    --ph-surface-strong: #132231;
    --ph-line: rgba(196, 214, 228, 0.12);
    --ph-line-strong: rgba(196, 214, 228, 0.2);
    --ph-text: #f5f8fb;
    --ph-muted: #a8b6c4;
    --ph-dim: #728294;
    --ph-green: #22c957;
    --ph-green-strong: #16a848;
    --ph-yellow: #f4c34d;
    --ph-red: #f05252;
    --ph-blue: #48a7ff;
    --ph-radius: 8px;
    --ph-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
    --ph-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    scroll-behavior: smooth;
}

body {
    background:
        radial-gradient(circle at 20% 0%, rgba(34, 201, 87, 0.08), transparent 32rem),
        linear-gradient(180deg, #07111a 0%, var(--ph-bg) 38%, #050b11 100%);
    color: var(--ph-text);
    font-family: var(--ph-font);
    margin: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    color: inherit;
}

img {
    height: auto;
    max-width: 100%;
}

.skip-link {
    background: var(--ph-green);
    color: #031008;
    left: 12px;
    padding: 10px 14px;
    position: fixed;
    top: 12px;
    transform: translateY(-150%);
    z-index: 30;
}

.skip-link:focus {
    transform: translateY(0);
}

.shell {
    margin: 0 auto;
    max-width: 1240px;
    padding: 0 24px;
    width: 100%;
}

.surface,
.ph-widget,
.widget {
    background: var(--ph-surface);
    border: 1px solid var(--ph-line);
    border-radius: var(--ph-radius);
    box-shadow: var(--ph-shadow);
}

.site-header {
    backdrop-filter: blur(18px);
    background: rgba(5, 13, 20, 0.82);
    border-bottom: 1px solid var(--ph-line);
    position: sticky;
    top: 0;
    z-index: 20;
}

.site-header__inner {
    align-items: center;
    display: grid;
    gap: 22px;
    grid-template-columns: auto 1fr auto;
    min-height: 76px;
}

.brand {
    align-items: center;
    display: inline-flex;
    gap: 10px;
    min-width: 0;
}

.brand__mark {
    background:
        linear-gradient(45deg, transparent 42%, #07111a 0 58%, transparent 0),
        radial-gradient(circle at 50% 50%, #ffffff 0 30%, transparent 31%),
        radial-gradient(circle at 50% 50%, var(--ph-green) 0 60%, #ffffff 61%);
    border-radius: 50%;
    display: block;
    flex: 0 0 30px;
    height: 30px;
    width: 30px;
}

.brand__text {
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0;
    white-space: nowrap;
}

.brand__text span {
    color: var(--ph-green);
}

.primary-nav ul,
.primary-nav {
    align-items: center;
    display: flex;
    gap: 6px;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.primary-nav a {
    border-radius: 6px;
    color: var(--ph-muted);
    display: block;
    font-size: 0.94rem;
    font-weight: 650;
    padding: 28px 12px 24px;
    position: relative;
}

.primary-nav a:hover,
.primary-nav .current-menu-item > a,
.primary-nav a.is-active {
    color: var(--ph-text);
}

.primary-nav .current-menu-item > a::after,
.primary-nav a.is-active::after {
    background: var(--ph-green);
    border-radius: 999px;
    bottom: 18px;
    content: "";
    height: 2px;
    left: 12px;
    position: absolute;
    right: 12px;
}

.header-actions {
    align-items: center;
    display: flex;
    gap: 10px;
}

.icon-button,
.ghost-icon,
.filter-button,
.select-button,
.login-button,
.watch-button,
.date-card,
.league-tab,
.pick-row button,
.mini-tabs button,
.button,
.wp-block-button__link {
    align-items: center;
    border: 1px solid var(--ph-line);
    border-radius: 7px;
    display: inline-flex;
    justify-content: center;
}

.icon-button,
.ghost-icon {
    background: transparent;
    height: 42px;
    width: 42px;
}

.icon-button:hover,
.ghost-icon:hover,
.date-card:hover,
.league-tab:hover {
    border-color: var(--ph-line-strong);
    background: rgba(255, 255, 255, 0.04);
}

.login-button {
    border-color: rgba(34, 201, 87, 0.62);
    color: var(--ph-text);
    gap: 8px;
    min-height: 42px;
    padding: 0 14px;
}

.page-grid {
    display: grid;
    gap: 28px;
    grid-template-columns: minmax(0, 1fr) 348px;
    padding-bottom: 48px;
    padding-top: 28px;
}

.content-flow,
.sidebar {
    display: grid;
    gap: 24px;
}

.sidebar {
    align-content: start;
    position: sticky;
    top: 104px;
}

.toolbar {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: 52px repeat(5, minmax(82px, 1fr)) 52px auto;
    padding: 14px;
}

.date-card {
    background: rgba(255, 255, 255, 0.035);
    flex-direction: column;
    gap: 3px;
    min-height: 58px;
    padding: 8px 10px;
}

.date-card strong {
    font-size: 0.9rem;
}

.date-card span {
    color: var(--ph-muted);
    font-size: 0.82rem;
}

.date-card.is-selected {
    background: linear-gradient(180deg, #24c95a, #169d42);
    border-color: transparent;
    color: #ffffff;
}

.date-card.is-selected span {
    color: rgba(255, 255, 255, 0.88);
}

.date-card--arrow {
    min-width: 52px;
}

.filter-button {
    background: rgba(255, 255, 255, 0.035);
    gap: 8px;
    min-height: 52px;
    padding: 0 18px;
}

.league-tabs {
    border-bottom: 1px solid var(--ph-line);
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(6, minmax(88px, 1fr));
    overflow-x: auto;
    padding-bottom: 14px;
    scrollbar-width: none;
}

.league-tabs::-webkit-scrollbar {
    display: none;
}

.league-tab {
    background: transparent;
    border-color: transparent;
    color: var(--ph-muted);
    flex-direction: column;
    gap: 8px;
    min-height: 72px;
    min-width: 88px;
    padding: 8px;
    position: relative;
}

.league-tab.is-active {
    color: var(--ph-text);
}

.league-tab.is-active::after {
    background: var(--ph-green);
    border-radius: 999px;
    bottom: -15px;
    content: "";
    height: 3px;
    left: 24px;
    position: absolute;
    right: 24px;
}

.league-tab__icon {
    align-items: center;
    background: rgba(34, 201, 87, 0.15);
    border: 1px solid rgba(34, 201, 87, 0.28);
    border-radius: 50%;
    color: var(--ph-green);
    display: inline-flex;
    font-weight: 850;
    height: 28px;
    justify-content: center;
    width: 28px;
}

.section-block {
    display: grid;
    gap: 14px;
}

.section-heading {
    align-items: end;
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.section-heading h1,
.section-heading h2,
.widget h2,
.ph-widget h2 {
    line-height: 1.08;
    margin: 0;
}

.section-heading h1 {
    font-size: 1.46rem;
}

.section-heading h2,
.widget h2,
.ph-widget h2 {
    font-size: 1.12rem;
}

.eyebrow {
    color: var(--ph-green);
    font-size: 0.78rem;
    font-weight: 800;
    margin: 0 0 6px;
    text-transform: uppercase;
}

.live-pill {
    align-items: center;
    color: var(--ph-muted);
    display: inline-flex;
    gap: 7px;
    white-space: nowrap;
}

.live-pill span {
    background: var(--ph-green);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(34, 201, 87, 0.16);
    height: 8px;
    width: 8px;
}

.match-panel {
    overflow: hidden;
}

.match-row {
    align-items: center;
    border-bottom: 1px solid var(--ph-line);
    display: grid;
    gap: 18px;
    grid-template-columns: 92px minmax(0, 1fr) minmax(140px, auto) 104px;
    min-height: 86px;
    padding: 14px 22px;
}

.match-row.is-live {
    border-left: 3px solid var(--ph-green);
    grid-template-columns: 89px minmax(0, 1fr) 42px 112px;
}

.match-row__time {
    display: grid;
    gap: 4px;
}

.match-row__time strong {
    font-size: 1rem;
}

.match-row__time span {
    color: var(--ph-muted);
    font-size: 0.78rem;
}

.is-live .match-row__time strong,
.is-live .match-row__time span {
    color: var(--ph-green);
}

.match-row__teams {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.team-line {
    align-items: center;
    display: flex;
    gap: 10px;
    min-width: 0;
}

.team-line strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.team-badge,
.avatar {
    align-items: center;
    border-radius: 50%;
    color: #ffffff;
    display: inline-flex;
    flex: 0 0 32px;
    font-size: 0.68rem;
    font-weight: 900;
    height: 32px;
    justify-content: center;
    width: 32px;
}

.team-badge--city { background: linear-gradient(135deg, #7bc7ff, #155da8); }
.team-badge--west { background: linear-gradient(135deg, #8a1538, #57b6d7); }
.team-badge--real { background: linear-gradient(135deg, #ffffff, #f4c34d); color: #132231; }
.team-badge--sociedad { background: linear-gradient(135deg, #1463c5, #ffffff); color: #132231; }
.team-badge--barca { background: linear-gradient(135deg, #b51336, #244aaa); }
.team-badge--villa { background: linear-gradient(135deg, #f6d94f, #2360a5); color: #102033; }
.team-badge--arsenal { background: linear-gradient(135deg, #d71920, #ffffff); color: #132231; }
.team-badge--everton { background: linear-gradient(135deg, #123fa3, #0b1d4e); }
.team-badge--juve { background: linear-gradient(135deg, #ffffff, #111111); color: #132231; }
.team-badge--milan { background: linear-gradient(135deg, #d71920, #111111); }

.score-stack {
    display: grid;
    gap: 8px;
    justify-items: center;
}

.score-stack strong,
.score-stack span,
.odds-grid span {
    align-items: center;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 5px;
    display: inline-flex;
    font-weight: 850;
    justify-content: center;
    min-height: 32px;
    min-width: 32px;
}

.score-stack strong {
    background: rgba(34, 201, 87, 0.18);
    color: var(--ph-green);
}

.watch-button {
    border-color: rgba(34, 201, 87, 0.7);
    font-size: 0.86rem;
    font-weight: 800;
    min-height: 42px;
    padding: 0 14px;
}

.odds-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(3, 48px);
}

.odds-grid span {
    flex-direction: column;
    gap: 2px;
    min-height: 42px;
}

.odds-grid small {
    color: var(--ph-muted);
    font-size: 0.68rem;
}

.panel-link,
.text-link {
    align-items: center;
    color: var(--ph-text);
    display: inline-flex;
    font-size: 0.9rem;
    font-weight: 750;
    gap: 8px;
}

.panel-link {
    justify-content: center;
    min-height: 48px;
    width: 100%;
}

.text-link {
    color: var(--ph-muted);
}

.prediction-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.prediction-card {
    display: grid;
    gap: 12px;
    min-height: 176px;
    padding: 18px;
}

.prediction-card__teams {
    align-items: center;
    display: flex;
    gap: 12px;
}

.prediction-card h3,
.prediction-card p {
    margin: 0;
}

.prediction-card h3 {
    font-size: 1rem;
    line-height: 1.25;
}

.prediction-card p {
    color: var(--ph-muted);
    font-size: 0.86rem;
}

.pick-row {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(3, 1fr);
}

.pick-row button {
    background: rgba(255, 255, 255, 0.055);
    min-height: 34px;
}

.pick-row button:hover,
.pick-row button.is-selected {
    background: rgba(34, 201, 87, 0.18);
    border-color: rgba(34, 201, 87, 0.44);
    color: var(--ph-green);
}

.widget,
.ph-widget {
    overflow: hidden;
    padding: 18px;
}

.widget__header {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 14px;
}

.select-button {
    background: rgba(255, 255, 255, 0.055);
    color: var(--ph-muted);
    gap: 6px;
    min-height: 38px;
    padding: 0 10px;
}

.standings-list {
    margin: 0 -18px;
}

.standing-row,
.leader-row,
.tournament-row {
    align-items: center;
    border-top: 1px solid var(--ph-line);
    display: grid;
    gap: 12px;
}

.standing-row {
    grid-template-columns: 28px minmax(0, 1fr) 34px;
    min-height: 46px;
    padding: 0 18px;
}

.standing-row.is-leading span {
    color: var(--ph-green);
}

.standing-row strong,
.leader-row strong,
.tournament-row strong {
    font-size: 0.9rem;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.standing-row span,
.standing-row b,
.leader-row b,
.tournament-row span {
    color: var(--ph-muted);
    font-size: 0.84rem;
}

.mini-tabs {
    border-bottom: 1px solid var(--ph-line);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 0 -18px 10px;
    padding: 0 18px;
}

.mini-tabs button {
    background: transparent;
    border-color: transparent;
    border-radius: 0;
    color: var(--ph-muted);
    min-height: 40px;
}

.mini-tabs button.is-active {
    border-bottom: 2px solid var(--ph-green);
    color: var(--ph-green);
}

.leader-row {
    grid-template-columns: 38px minmax(0, 1fr) 36px;
    min-height: 58px;
}

.avatar {
    background: linear-gradient(135deg, var(--ph-red), var(--ph-yellow));
}

.leader-row small,
.tournament-row small {
    color: var(--ph-muted);
    display: block;
    font-size: 0.78rem;
    font-weight: 500;
    margin-top: 3px;
}

.promo-widget {
    background:
        linear-gradient(135deg, rgba(34, 201, 87, 0.18), rgba(72, 167, 255, 0.13)),
        #142033;
    border: 1px solid rgba(34, 201, 87, 0.18);
    border-radius: var(--ph-radius);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 92px;
    min-height: 178px;
    overflow: hidden;
    padding: 22px 18px;
    position: relative;
}

.promo-widget p,
.promo-widget h2 {
    margin: 0;
}

.promo-widget p {
    font-size: 1.25rem;
    font-weight: 850;
}

.promo-widget h2 {
    color: var(--ph-green);
    font-size: 1.7rem;
}

.promo-widget span {
    color: var(--ph-muted);
    display: block;
    font-size: 0.9rem;
    margin: 10px 0 18px;
}

.promo-widget a,
.button,
.wp-block-button__link {
    align-items: center;
    background: linear-gradient(180deg, #24c95a, #169d42);
    border-radius: 7px;
    color: #ffffff;
    display: inline-flex;
    font-weight: 850;
    justify-content: center;
    min-height: 42px;
    padding: 0 22px;
}

.ad-slot {
    align-items: stretch;
    background: rgba(15, 28, 41, 0.48);
    border: 1px solid var(--ph-line);
    border-radius: var(--ph-radius);
    display: grid;
    gap: 8px;
    overflow: hidden;
    padding: 10px;
}

.ad-slot__label {
    color: var(--ph-dim);
    font-size: 0.68rem;
    font-weight: 750;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
}

.ad-slot__inner,
.ad-slot__placeholder {
    align-items: center;
    display: grid;
    justify-items: center;
    min-width: 0;
}

.ad-slot__placeholder {
    background: rgba(255, 255, 255, 0.035);
    border: 1px dashed var(--ph-line-strong);
    border-radius: 6px;
    color: var(--ph-dim);
    font-size: 0.86rem;
    min-height: inherit;
    width: 100%;
}

.ad-slot--leaderboard,
.ad-slot--in-feed,
.ad-slot--content {
    min-height: 112px;
}

.ad-slot--sidebar {
    min-height: 280px;
}

.ad-slot ins,
.ad-slot iframe {
    max-width: 100%;
}

.promo-ball {
    background:
        radial-gradient(circle at 50% 50%, transparent 0 34%, #101820 35% 45%, transparent 46%),
        radial-gradient(circle at 50% 50%, #ffffff 0 62%, #d8e0e8 63%);
    border-radius: 50%;
    bottom: -18px;
    height: 124px;
    position: absolute;
    right: -20px;
    width: 124px;
}

.tournament-row {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 58px;
}

.entry-content {
    color: var(--ph-muted);
    line-height: 1.7;
}

.entry-content a {
    color: var(--ph-green);
}

.wp-block-latest-posts {
    display: grid;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.wp-block-latest-posts li {
    margin: 0;
}

.wp-block-latest-posts a,
.wp-block-categories a,
.wp-block-archives a,
.wp-block-page-list a {
    align-items: center;
    border-radius: 6px;
    color: var(--ph-text);
    display: flex;
    min-height: 44px;
    padding: 8px 10px;
}

.wp-block-latest-posts a:hover,
.wp-block-categories a:hover,
.wp-block-archives a:hover,
.wp-block-page-list a:hover {
    background: rgba(255, 255, 255, 0.055);
    color: var(--ph-green);
}

.site-footer {
    border-top: 1px solid var(--ph-line);
    color: var(--ph-muted);
    padding: 28px 0;
}

.site-footer__inner {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.site-footer p {
    margin: 0;
}

.icon {
    display: inline-block;
    height: 18px;
    position: relative;
    width: 18px;
}

.icon-search::before {
    border: 2px solid currentColor;
    border-radius: 50%;
    content: "";
    height: 10px;
    left: 1px;
    position: absolute;
    top: 1px;
    width: 10px;
}

.icon-search::after {
    background: currentColor;
    content: "";
    height: 8px;
    position: absolute;
    right: 2px;
    top: 11px;
    transform: rotate(-45deg);
    width: 2px;
}

.icon-sun::before {
    border: 2px solid currentColor;
    border-radius: 50%;
    content: "";
    height: 8px;
    left: 3px;
    position: absolute;
    top: 3px;
    width: 8px;
}

.icon-user::before {
    border: 2px solid currentColor;
    border-radius: 50%;
    content: "";
    height: 5px;
    left: 5px;
    position: absolute;
    top: 2px;
    width: 5px;
}

.icon-user::after {
    border: 2px solid currentColor;
    border-radius: 9px 9px 0 0;
    content: "";
    height: 7px;
    left: 3px;
    position: absolute;
    top: 10px;
    width: 9px;
}

.icon-filter::before {
    border: 2px solid currentColor;
    border-bottom: 0;
    border-radius: 2px 2px 0 0;
    content: "";
    height: 7px;
    left: 2px;
    position: absolute;
    top: 2px;
    transform: skewX(-18deg);
    width: 14px;
}

.icon-filter::after {
    background: currentColor;
    content: "";
    height: 7px;
    left: 8px;
    position: absolute;
    top: 9px;
    width: 2px;
}

.icon-chevron-left::before,
.icon-chevron-right::before,
.icon-chevron-down::before,
.icon-arrow-right::before {
    border: solid currentColor;
    border-width: 0 2px 2px 0;
    content: "";
    height: 8px;
    position: absolute;
    width: 8px;
}

.icon-chevron-left::before {
    left: 6px;
    top: 4px;
    transform: rotate(135deg);
}

.icon-chevron-right::before,
.icon-arrow-right::before {
    left: 4px;
    top: 4px;
    transform: rotate(-45deg);
}

.icon-chevron-down::before {
    left: 5px;
    top: 3px;
    transform: rotate(45deg);
}

.icon-bell::before {
    border: 2px solid currentColor;
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    content: "";
    height: 10px;
    left: 4px;
    position: absolute;
    top: 3px;
    width: 8px;
}

.icon-bell::after {
    background: currentColor;
    border-radius: 999px;
    content: "";
    height: 2px;
    left: 3px;
    position: absolute;
    top: 14px;
    width: 12px;
}

@media (max-width: 1060px) {
    .site-header__inner {
        grid-template-columns: 1fr auto;
    }

    .primary-nav {
        grid-column: 1 / -1;
        justify-content: flex-start;
        overflow-x: auto;
        order: 3;
        scrollbar-width: none;
    }

    .primary-nav::-webkit-scrollbar {
        display: none;
    }

    .primary-nav a {
        padding: 12px;
        white-space: nowrap;
    }

    .primary-nav .current-menu-item > a::after,
    .primary-nav a.is-active::after {
        bottom: 5px;
    }

    .page-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        position: static;
    }
}

@media (max-width: 760px) {
    .shell {
        padding: 0 14px;
    }

    .site-header__inner {
        gap: 12px;
        min-height: 68px;
    }

    .brand__text {
        font-size: 0.88rem;
    }

    .header-actions .icon-button:nth-child(2) {
        display: none;
    }

    .login-button {
        font-size: 0;
        padding: 0;
        width: 42px;
    }

    .toolbar {
        display: flex;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .toolbar::-webkit-scrollbar {
        display: none;
    }

    .date-card {
        flex: 0 0 82px;
    }

    .date-card--arrow {
        flex-basis: 52px;
    }

    .filter-button {
        flex: 0 0 auto;
    }

    .section-heading {
        align-items: start;
    }

    .match-row,
    .match-row.is-live {
        grid-template-columns: 66px minmax(0, 1fr) auto;
        padding: 14px;
    }

    .match-row .watch-button,
    .match-row .ghost-icon {
        grid-column: 2 / -1;
        justify-self: start;
    }

    .odds-grid {
        grid-column: 2 / -1;
        grid-template-columns: repeat(3, minmax(54px, 1fr));
        width: 100%;
    }

    .prediction-grid,
    .sidebar {
        grid-template-columns: 1fr;
    }

    .ad-slot--leaderboard,
    .ad-slot--in-feed,
    .ad-slot--content {
        min-height: 100px;
    }

    .site-footer__inner {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
