@charset "UTF-8";

:root {
  --col-verde: #00CE81;
  --col-azul: #0079B9;
  --col-verdelogo: #00935C;
  --col-azullogo: #0169B4;
  --transition-base: all 0.3s ease;
}

.dark {
  --background: #141414;
  --primary: #222;
  --secondary: #DDD;
  --tableodd: #222;
  --bannerback: #000;
  --matchheadtext: rgba(255, 255, 255, 0.8);
  --matchheadback: linear-gradient(90deg, #002c4b 0%, #00192c 100%);
  --matchback: #222;
  --matchtext: #DDD;
  --matchresutlback: #000;
  --matchboxshadow: 0 0 8px rgba(0,0,0,0.3);
  --tablepos: #68CBFF;
  --noticiaback: #222;
  --menuback: linear-gradient(90deg, #000 15%, rgba(0,0,0,0.85) 100%);
  --menuitemback: linear-gradient(90deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
  --detailback: linear-gradient(90deg, rgba(0, 206, 129, 0) 0%, rgba(0, 206, 129, 0.2) 50%, rgba(0, 121, 185, 0.65) 100%);
}

.light {
  --background: #F7F7F7;
  --primary: #FFF;
  --secondary: #333;
  --tableodd: #F5F5F5;
  --bannerback: #333;
  --matchheadtext: #FFF;
  --matchheadback: linear-gradient(90deg, var(--col-azullogo) 0%, #002c4b 100%);
  --matchback: #FFF;
  --matchtext: #333;
  --matchresutlback: #333;
  --matchboxshadow: 0 0 8px rgba(0,0,0,0.1);
  --tablepos: var(--col-azul);
  --noticiaback: #EEE;
  --menuback: linear-gradient(90deg, #FFF 15%, rgba(255,255,255,0.85) 100%);
  --menuitemback: linear-gradient(90deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0) 100%);
  --detailback: linear-gradient(90deg, rgba(0, 206, 129, 0) 0%, rgba(0, 206, 129, 0.7) 40%, rgba(0, 105, 180, 0.9) 100%);
}

/* RESET */
html, body, div, span, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, code, del, em, img, ins, kbd, q, s, samp, small, strong, sub, sup, var, b, u, i, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
  margin: 0; padding: 0; border: 0; outline: 0; font-weight: 300; font-style: normal; font-family: 'Nunito', sans-serif;
}
body { font-size: 16px; line-height: 1; }
ol, ul { list-style: none; }
:focus { outline: 0; }
table { border-collapse: collapse; border-spacing: 0; }
a img { border: none !important; }
* { margin: 0; }
body { color: #333; padding: 0; }
a:link, a:visited, a:hover, a:active { color: #333; text-decoration: none; }
*, *::after, *::before { box-sizing: border-box; }
input, select { border-radius: 0; }
html { -webkit-text-size-adjust: 100%; }
strong { font-weight: bold; }

/* GENERAL */
body { font-size: 0.85em; padding: 130px 0 50px 0; background: var(--background); }
.wrapper { width: 100%; max-width: 1000px; display: block; margin: auto; position: relative; }

@media only screen and (min-width: 768px) {
  body { font-size: 0.9em; }
}
@media only screen and (min-width: 1200px) {
  .wrapper { padding: 0; }
}

/* HEADER */
.header-container { position: fixed; top: 0; left: 0; width: 100%; z-index: 10; }
header { position: relative; width: 100%; border-radius: 0 0 2em 2em; background: #012C4C url('/images/header-back.jpg') no-repeat; background-size: cover; background-position: center center; box-shadow: 0 0 5px rgba(0,0,0,0.5); }
header::before, header::after { content: ""; width: 100%; height: 100px; position: absolute; left: 0; background: rgb(0, 105, 180, 0.2); border-radius: 0 0 2em 2em; z-index: -1; }
header::before { bottom: -8px; }
header::after { bottom: -16px; }

header .logo { display: block; width: 105px; height: 52px; text-indent: -9999px; top: -2px; position: relative; background: url('/images/logo-white.png') no-repeat; background-size: 100% 100%; }
header .navbar { height: 60px; display: flex; width: 100%; justify-content: center; align-items: center; }
header .panel { height: 70px; padding: 30px 2em 10px 2em; }

header::before, header::after, header .logo, header .navbar, header .panel, header .menutoggle, header .torneos { transition: var(--transition-base); }

.header-btn { display: flex; align-items: center; justify-content: center; position: absolute; top: 10px; width: 40px; height: 40px; text-indent: -9999px; cursor: pointer; background: rgba(0,0,0,0.4); border-radius: 10px; }
.scroll-up .header-btn { top: 5px; }
.scroll-up header .navbar { height: 50px; }
.scroll-up header .panel { height: 50px; padding: 10px 2em; }
.scroll-up header::before, .scroll-up header::after { bottom: 0; }
.scroll-up header .logo { width: 85px; height: 42px; }


header .header-btn.torneos { left: 10px; }
.menu-wrap .header-btn.login { right: 10px; }

.header-btn i { display: block; background-repeat: no-repeat; background-size: 100% 100%; width: 22px; height: 22px; }
.header-btn.torneos i { background-image: url('/images/ico-cup.png'); }
.header-btn.login i { background-image: url('/images/ico-user.png'); }

/* Menu toggle hamburger animation */
.menutoggle { right: 10px; overflow: hidden; font-size: 0; }
.menutoggle span { display: block; position: absolute; top: 18px; left: 10px; right: 10px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.6); transition: background 0s 0.3s; }
.menutoggle span::before, .menutoggle span::after { position: absolute; display: block; left: 0; width: 100%; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.6); content: ""; transition-duration: 0.3s, 0.3s; transition-delay: 0.3s, 0s; }
.menutoggle span::before { top: -7px; transition-property: top, transform; }
.menutoggle span::after { bottom: -7px; transition-property: bottom, transform; }
.show-menu .menutoggle { background-color: var(--col-verde); }
.show-menu .menutoggle span { background: none; }
.show-menu .menutoggle span::before { top: 0; transform: rotate(45deg); }
.show-menu .menutoggle span::after { bottom: 0; transform: rotate(-45deg); }
.show-menu .menutoggle span::before, .show-menu .menutoggle span::after { transition-delay: 0s, 0.3s; background: #FFF; }

/* Slide-out menu */
.show-menu .menu-wrap { transform: translate3d(0,0,0); transition: transform 0.8s; transition-timing-function: cubic-bezier(0.7,0,0.3,1); box-shadow: 0 0 15px 10px rgba(0,0,0,0.4); }
.menu-wrap { position: fixed; z-index: 2000; top: 0; width: calc(100% - 60px); max-width: 500px; height: 100%; display: flex; flex-direction: column; background: var(--menuback); transform: translate3d(-100%,0,0); transition: transform 0.4s; transition-timing-function: cubic-bezier(0.7,0,0.3,1); overflow: hidden; }
.menu-wrap nav li { margin-bottom: 0.3em; }
.menu-wrap nav li a { display: block; color: var(--matchtext); font-size: 1.5em; padding: 1rem; font-weight: normal; background: var(--menuitemback); }
.menu-wrap nav li a.active { color: #009891; font-weight: bold; }

.menu-wrap .head { position: relative; height: 90px; background: #012C4C url('/images/menu-back.jpg') no-repeat; background-size: cover; background-position: center center; display: flex; justify-content: space-between; align-items: center; }
.menu-wrap .head::after { content: ""; position: absolute; bottom: 0; left: 0; width: 100%; height: 5px; background: linear-gradient(to right, #0079B9 0%, #00935C 50%, #8185E6 100%); }
.menu-wrap .head .logo { display: block; width: 105px; height: 52px; position: relative; left: 1rem; top: -5px; background: url('/images/logo-white.png') no-repeat; background-size: 100% 100%; text-indent: -9999px; }
.menu-wrap .menu-content { flex: 1; display: flex; flex-direction: column; padding-top: 1em; justify-content: space-between; }
.menu-wrap .footer .copy { padding: 0.75em 1rem; background: #222; color: #CCC; }
.menu-wrap .footer .copy p { font-size: 0.9em; line-height: 1.2em; }
.menu-wrap .footer .copy a { color: var(--col-verde); }

/* Header tabs */
.header-tabs { display: flex; gap: 1.5em; }
.header-tabs ul { display: flex; width: 100%; gap: 0.8em; }
.header-tabs ul li { flex: 1; }
.header-tabs ul a { display: flex; align-items: center; justify-content: center; height: 28px; color: var(--secondary); background: var(--primary); border-radius: 6px; font-weight: bold; text-align: center; font-size: 0.9em; }
.header-tabs .active a { color: #FFF; background: var(--col-verde); box-shadow: 0 0 10px 0 var(--col-verde); text-shadow: 1px 1px 2px rgba(0,0,0,0.3); }

/* Mask behind header */
.mask { position: fixed; top: 0px; width: 100%; height: 135px; background: var(--background); z-index: 5; }
.scroll-up .mask { height: 105px; }

/* Main content */
main { padding-top: 3em; }
main h2 { padding: 0 1rem; font-weight: bold; font-size: 2em; margin-bottom: 1em; color: var(--secondary); }

/* TORNEOS GRID */
main .torneos { margin: auto; display: grid; grid-template-columns: repeat(1, 1fr); grid-gap: 0.75em; padding: 0 1em; margin-bottom: 2em; }
main .torneos li { border-radius: 0.5em; overflow: hidden; display: flex; box-shadow: var(--matchboxshadow); flex-direction: column; }
main .torneos .img { position: relative; flex: 1; }
main .torneos h3 { color: #FFF; font-size: 1.6em; line-height: 1.2em; padding: 0.5em; background: linear-gradient(90deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 100%) !important; position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: flex; align-items: center; text-shadow: 2px 2px 2px rgba(0,0,0,0.6); }
main .torneos img { display: block; width: 100%; height: 6em; object-fit: cover; }
main .torneos .btns { display: flex; flex-direction: row; }
main .torneos .btns a { flex: 1; padding: 0.6em; text-shadow: 1px 1px 2px rgba(0,0,0,0.3); color: #FFF; font-size: 1.1em; box-shadow: inset 8px 0 8px rgba(0,0,0,0.1); text-align: center; }
main .torneos .btns .pos { background: var(--col-verde); }
main .torneos .btns .fix { background: var(--col-verdelogo); }

.dark main .torneos .btns .pos { background: rgb(0, 147, 92, 0.6); }
.dark main .torneos .btns .fix { background: rgb(0, 206, 129, 0.6); }

@media (min-width: 768px) {
  main .torneos { max-width: 660px; grid-template-columns: repeat(2, 1fr); }
}

/* MATCHES */
.matches-head { position: sticky; top: 135px; z-index: 5; transition: var(--transition-base); }
.matches-head a, .matches-head span { display: flex; font-size: 1.4em; padding: 0.5em 1rem; background: var(--matchheadback) !important; justify-content: space-between; align-items: center; }
.matches-head h3 { font-weight: bold; color: var(--matchheadtext); font-size: 0.9em; }
.matches-head i { color: var(--col-verde); font-size: 0.8em; font-style: normal; }
.matches { padding: 1rem 1rem 2rem 1rem; }

.scroll-up .matches-head { top: 105px; }

.torneo:last-child { margin: 0; }

.match { position: relative; padding: 1em 0.75em 0 0.75em; background: var(--matchback); border-radius: 1em; margin-bottom: 1em; box-shadow: var(--matchboxshadow); display: flex; gap: 0.3rem; }
.match:last-child { margin-bottom: 0; }
.matches .match .team { flex: 1; display: flex; margin-bottom: 1.6em; }
.matches .match .team img { display: block; max-height: 2em; }
.matches .match .team span { display: block; flex: 1; font-size: 1em; line-height: 1.2em; font-weight: bold; padding: 0.4rem 0 0 0.4rem; color: var(--matchtext); }
.matches .match .team:last-child { flex-direction: row-reverse; text-align: right; }
.matches .match .team:last-child span { padding: 0.4rem 0.4rem 0 0; }
.matches .match .data { width: 4.4rem; display: flex; flex-direction: column; justify-content: space-between; margin-bottom: 1em; }
.matches .match .data .res { display: none; gap: 0.2rem; font-size: 0.9em; margin-bottom: 1em; width: 100%; }
.matches .match .data .res span { flex: 1; display: flex; align-items: center; width: 2.2rem; height: 1.7rem; font-size: 1.1em; font-weight: bold; background: var(--matchresutlback); color: #FFF; border-radius: 0.5em; justify-content: center; align-self: center; }
.matches .match .data time { font-size: 1.1em; color: var(--col-verde); width: 100%; display: flex; flex-direction: column; justify-content: center; align-self: center; border-radius: 0.5em; padding-top: 0.45rem; text-align: center; font-weight: bold; }

.matches .match.playing .data, .matches .match.played .data { padding-top: 0; margin: 0; }
.matches .match.playing .data .res, .matches .match.played .data .res { display: flex; }
.matches .match.playing .data time, .matches .match.played .data time { border-radius: 0.5em 0.5em 0 0; font-weight: bold; color: #FFF; padding: 0.4em 0 0.3em 0; font-size: 0.85em; }
.matches .match.played .data time { background: var(--col-verde); opacity: 0.7; }
.dark .matches .match.played .data time { opacity: 1; }
.matches .match.playing .data time { background: #E10000; }
.matches .match .data time em { font-size: 0.8em; margin-top: 0.3em; color: #333; }

.matches .match a { flex: 1; display: flex; gap: 0.3rem; margin: -1em -0.75em 0 -0.75em; padding: 1em 0.75em 0 0.75em; border-radius: 1em; }
.matches .match a::after { content: '+ Cronologia'; text-transform: uppercase; position: absolute; right: 0; bottom: 0; background: var(--detailback); color: rgba(255, 255, 255, 0.8); border-radius: 0 0 0.5em 0; font-weight: bold; padding: 0.55em 1em 0.4em 3.5em; font-size: 0.85em; display: flex; align-items: center; justify-content: center; text-shadow: 0 0 3px rgba(0,0,0,0.2); }

/* POSICIONES TABLE */
.posiciones table { font-size: 0.85em; width: 100%; }
.posiciones table th, .posiciones table td { font-weight: normal; text-align: right; vertical-align: middle; }
.posiciones table .left { text-align: left; }
.posiciones table th { padding: 0.5rem 0.5rem 0.5rem 0; font-weight: bold; }
.posiciones table th.first { padding-left: 1em; }
.posiciones table td { padding: 0.5rem 0.5rem 0.5rem 0; color: var(--secondary); }
.posiciones table td.team { font-size: 1.1em; }
.posiciones table td.team, .posiciones table td.team a { font-weight: bold; color: var(--secondary); }
.posiciones table th.pos { color: var(--tablepos); font-size: 1em; }
.posiciones table tr:nth-child(odd) { background: var(--tableodd); }
.posiciones table thead tr { color: #FFF; background: linear-gradient(90deg, var(--col-verde) 0%, var(--col-verdelogo) 100%) !important; }
.posiciones table abbr { text-decoration: none; font-weight: bold; }
.posiciones table img { display: block; height: 20px; width: auto; margin: auto; }

.sticky { position: sticky; top: 135px; z-index: 5; transition: var(--transition-base); }
.scroll-up .sticky { top: 105px; }

/* EQUIPOS */
.equipos { margin: auto; display: grid; grid-template-columns: repeat(2, 1fr); grid-gap: 1em; padding: 0 1em; margin-bottom: 2em; }
.equipos li { padding: 0.75em; background: var(--matchback); border-radius: 1em; box-shadow: var(--matchboxshadow); display: flex; flex-direction: column; justify-content: space-between; align-items: center; }
.equipos li img { display: block; width: 50px; height: auto; margin: 0 auto 0.75em auto; }
.equipos li h3 { text-align: center; font-size: 1.1em; line-height: 1.2em; font-weight: bold; margin-bottom: 1em; color: var(--matchtext); }
.equipos li .btns { display: flex; flex-direction: column; gap: 0.2rem; width: 100%; align-self: flex-end; }
.equipos li a { display: flex; align-items: center; justify-content: center; color: var(--primary); background: var(--secondary); border-radius: 6px; padding: 0.3em 1em; text-align: center; width: 100%; }
.equipos li a:hover { color: #FFF; background: var(--col-verde); box-shadow: 0 0 10px 0 var(--col-verde); text-shadow: 1px 1px 2px rgba(0,0,0,0.3); }

@media (min-width: 480px) {
  .equipos { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 768px) {
  .equipos { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1200px) {
  .equipos { grid-template-columns: repeat(5, 1fr); }
}

/* NOTICIAS */
.noticias ul { display: grid; grid-template-columns: repeat(1, 1fr); grid-gap: 0.75em; padding: 0 1rem; }
.noticias ul li a { display: flex; background: var(--noticiaback); padding: 0.75em; border-radius: 1em; }
.noticias ul li img { display: block; width: 8em; height: auto; border-radius: 0.5em; align-self: flex-start; }
.noticias ul li .data { padding-left: 1em; flex: 1; }
.noticias ul li .head { width: 100%; display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5em; }
.noticias ul li time { opacity: 0.6; }
.noticias ul li p { font-size: 1.2em; line-height: 1.2em; font-weight: bold; }
.noticias ul li .head span { display: inline-block; border-radius: 0.5em; font-weight: bold; color: #FFF; padding: 0.4em 1em 0.3em 1em; font-size: 0.85em; background: var(--col-verde); opacity: 0.7; }

.dark .noticias ul li a { color: #FFF; }
.dark .noticias ul li .head span { opacity: 1; }

@media (min-width: 768px) {
  main.noticias ul { grid-template-columns: repeat(2, 1fr); }
}

/* MATCH DETAIL / SCORE */
.match-detail { padding-left: 1rem; padding-right: 1rem; }

.score { background: #333 url('/images/score-back.jpg'); background-size: 8px auto; color: #FFF; margin-bottom: 2em; border-radius: 1rem; border: 2px solid #333; font-family: 'Roboto Condensed', sans-serif; text-transform: uppercase; font-size: 0.9em; overflow: hidden; }
.score .estado { border-top-left-radius: 0.85rem; border-top-right-radius: 0.85rem; padding: 0.5em 1em; display: flex; flex-direction: row; justify-content: space-between; align-items: center; gap: 0.2em; font-family: 'Roboto Condensed', sans-serif; text-transform: uppercase; font-size: 1.3em; }
.score .estado.nocomenzado { background: #666; }
.score .estado.juego { background: #00935C; }
.score .estado.descanso { background: #BBB; }
.score .estado.finalizado { background: #c82902; }
.score .teams { display: flex; padding: 0.5em 0; }
.score .team, .score .match-score { text-align: center; display: flex; font-family: 'Roboto Condensed', sans-serif; text-transform: uppercase; align-items: center; }
.score .team { flex: 1; flex-direction: column; padding: 0.5em; font-size: 1.2em; gap: 0.3em; }
.score .team img { display: block; width: 2em; height: auto; margin-bottom: 0.5em; }
.score .match-score { width: 3em; font-size: 1.8em; justify-content: center; }
.score .data { padding: 0.4em 1em; background: #333; display: flex; justify-content: space-between; border-top: 1px solid #666; line-height: 1.3em; }
.score .data strong { font-weight: normal; }
.score .data span { white-space: nowrap; opacity: 0.7; }

/* HITO TIMELINE */
.match-data { position: relative; background: var(--matchback); border-radius: 1em; margin-bottom: 1.5em; box-shadow: var(--matchboxshadow); display: flex; flex-direction: column; overflow: hidden; }
.match-data li { border-bottom: 1px solid #DDD; }
.match-data li:first-child { border-top-left-radius: 1em; border-top-right-radius: 1em; }
.match-data li:last-child { border-bottom-left-radius: 1em; border-bottom-right-radius: 1em; }
.match-data li article { display: flex; align-items: center; gap: 0.5em; padding: 0.75em 0.5em 0.5em 0.5em; }
.match-data li article::after { content: ""; display: block; flex: 1; }
.match-data li.mat { text-align: center; justify-content: center; padding: 0.75em; color: #FFF; background: var(--col-azul); }
.match-data li .hit { display: flex; justify-content: flex-end; gap: 0.4em; flex: 1; align-items: center; }
.match-data li .hit span { opacity: 0.7; }
.match-data li time { display: block; text-align: center; width: 2em; order: 2; font-weight: bold; color: var(--col-verdelogo); }

.match-data li.loc article::after { order: 3; }
.match-data li.loc .hit { order: 1; }
.match-data li.loc strong { text-align: right; }

.match-data li.vis article::after { order: 1; }
.match-data li.vis .hit { order: 3; flex-direction: row-reverse; }

/* Hito icons (sprite) */
.match-data li i { display: inline-block; background: url('/images/hitos-icons.png') no-repeat; background-size: 300% 200%; width: 1.4em; height: 1.4em; }
.match-data li.try i { background-position: 0 0; }
.match-data li.con i { background-position: 0 0; }
.match-data li.pen i { background-position: 0 0; }
.match-data li.ama i { background-position: 0 100%; }
.match-data li.amf i { background-position: 50% 100%; }
.match-data li.roj i { background-position: 100% 100%; }

.match-data li .player { background: #F6F6F6; padding: 0.25em 0.75em; }
.match-data li.loc .player { text-align: left; background: linear-gradient(90deg, rgba(0,0,0,0.1) 20%, rgba(0,0,0,0.03) 100%); }
.match-data li.vis .player { text-align: right; background: linear-gradient(90deg, rgba(0,0,0,0.03) 0, rgba(0,0,0,0.1) 80%); }

/* LIVE BADGE */
.live-badge { display: inline-block; background: #E10000; color: #FFF; font-size: 0.7em; font-weight: bold; padding: 0.2em 0.5em; border-radius: 4px; text-transform: uppercase; animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Theme toggle buttons */
.btn-tabs { display: flex; width: 100%; gap: 0.8em; padding: 0 1rem; }
.btn-tabs li { flex: 1; }
.btn-tabs a { display: flex; align-items: center; justify-content: center; padding: 0.75em 1em; color: #000; background: #FFF; border-radius: 6px; font-weight: bold; text-align: center; cursor: pointer; }
.dark .btn-tabs [data-theme="dark"], .light .btn-tabs [data-theme="light"] { color: #FFF; background: var(--col-verde); box-shadow: 0 0 10px 0 var(--col-verde); text-shadow: 1px 1px 2px rgba(0,0,0,0.3); }
