/* ===================================================
   ECF LIVE — TEMA OFICIAL ECF
   Basado en ECF_Tabla_Master diseño gráfico oficial
   =================================================== */

/* Fuentes Roboto Condensed (almacenadas en wwwroot) */
@font-face {
    font-family: 'Roboto Condensed';
    src: url('/ECF_Examples/Fuentes/Fuentes/Roboto_Condensed/static/RobotoCondensed-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto Condensed';
    src: url('/ECF_Examples/Fuentes/Fuentes/Roboto_Condensed/static/RobotoCondensed-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto Condensed';
    src: url('/ECF_Examples/Fuentes/Fuentes/Roboto_Condensed/static/RobotoCondensed-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    src: url('/ECF_Examples/Fuentes/Fuentes/Roboto/static/Roboto-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    src: url('/ECF_Examples/Fuentes/Fuentes/Roboto/static/Roboto-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ===================================================
   VARIABLES DE COLOR ECF
   =================================================== */
:root {
    /* Colores principales ECF */
    --ecf-navy:       #0C1A3A;   /* Azul marino oscuro (barras título) */
    --ecf-red:        #C8102E;   /* Rojo ECF (barras subtítulo / acento) */
    --ecf-white:      #FFFFFF;
    --ecf-light-gray: #F2F2F2;   /* Fondo filas tabla pares */
    --ecf-mid-gray:   #D9D9D9;   /* Separadores */
    --ecf-dark-gray:  #333333;   /* Texto cuerpo */
    --ecf-gold:       #F5A623;   /* Acento dorado (medallas) */

    /* Header/navbar ECF */
    --ecf-header-bg:  #0C1A3A;
    --ecf-header-h:   70px;

    /* Tipografía ECF */
    --ecf-font-title:  'Roboto Condensed', 'Arial Narrow', sans-serif;
    --ecf-font-body:   'Roboto', 'Arial', sans-serif;
}

/* ===================================================
   CLASES DE UTILIDAD ECF
   =================================================== */

.ecf-font-title  { font-family: var(--ecf-font-title); }
.ecf-font-body   { font-family: var(--ecf-font-body); }

/* Barras de sección estilo tabla ECF */
.ecf-bar-title {
    background-color: var(--ecf-navy);
    color: var(--ecf-white);
    font-family: var(--ecf-font-title);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 8px 16px;
}

.ecf-bar-subtitle {
    background-color: var(--ecf-red);
    color: var(--ecf-white);
    font-family: var(--ecf-font-title);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 5px 16px;
}

/* Tabla ECF */
.ecf-table {
    font-family: var(--ecf-font-body);
    font-size: 13px;
    border-collapse: collapse;
    width: 100%;
}

    .ecf-table thead th {
        background-color: var(--ecf-navy);
        color: var(--ecf-white);
        font-family: var(--ecf-font-title);
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        padding: 8px 10px;
        border: none;
        font-size: 12px;
    }

    .ecf-table tbody tr:nth-child(even) {
        background-color: var(--ecf-light-gray);
    }

    .ecf-table tbody tr:hover {
        background-color: rgba(200, 16, 46, 0.08);
    }

    .ecf-table tbody td {
        padding: 6px 10px;
        border-bottom: 1px solid var(--ecf-mid-gray);
        color: var(--ecf-dark-gray);
    }

/* ===================================================
   ECF LAYOUT — ESTRUCTURA SIN SIDEBAR
   =================================================== */

.ecf-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--ecf-light-gray);
    font-family: var(--ecf-font-body);
}

/* Header ECF */
.ecf-header {
    height: var(--ecf-header-h);
    background-color: var(--ecf-navy);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    border-bottom: 3px solid var(--ecf-red);
}

.ecf-header-logos {
    display: flex;
    align-items: center;
    gap: 20px;
    height: 100%;
}

.ecf-header-logo-ecf {
    height: 44px;
    width: auto;
    max-width: 110px;
    object-fit: contain;
    display: block;
}

.ecf-header-logo-castellon {
    height: 44px;
    width: auto;
    max-width: 80px;
    object-fit: contain;
    display: block;
}

.ecf-header-separator {
    width: 1px;
    height: 40px;
    background-color: rgba(255,255,255,0.3);
}

.ecf-header-title {
    flex: 1;
    text-align: center;
    color: var(--ecf-white);
    font-family: var(--ecf-font-title);
    font-weight: 700;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.2;
}

.ecf-header-title .ecf-subtitle {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: rgba(255,255,255,0.7);
    text-transform: none;
    letter-spacing: 0.02em;
}

.ecf-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 120px;
    justify-content: flex-end;
}

/* Main content ECF */
.ecf-main {
    margin-top: var(--ecf-header-h);
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

    .ecf-main::-webkit-scrollbar {
        width: 6px;
    }

    .ecf-main::-webkit-scrollbar-thumb {
        background: var(--ecf-red);
        border-radius: 10px;
    }

/* Footer ECF */
.ecf-footer {
    background-color: var(--ecf-navy);
    border-top: 3px solid var(--ecf-red);
    color: rgba(255,255,255,0.6);
    font-family: var(--ecf-font-body);
    font-size: 12px;
    text-align: center;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.ecf-footer a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
}

.ecf-footer a:hover {
    color: var(--ecf-white);
}

/* ===================================================
   ECF HOME — Página principal del campeonato
   =================================================== */

.ecf-home-hero {
    background-color: var(--ecf-navy);
    color: var(--ecf-white);
    padding: 40px 24px 32px;
    text-align: center;
    border-bottom: 4px solid var(--ecf-red);
}

.ecf-home-hero h1 {
    font-family: var(--ecf-font-title);
    font-weight: 900;
    font-size: clamp(22px, 4vw, 38px);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 8px 0;
    line-height: 1.15;
}

.ecf-home-hero .ecf-hero-info {
    font-family: var(--ecf-font-body);
    font-size: 15px;
    color: rgba(255,255,255,0.75);
    margin: 0;
}

.ecf-home-nav {
    background-color: var(--ecf-navy);
    border-bottom: 3px solid var(--ecf-red);
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

    .ecf-home-nav::-webkit-scrollbar {
        display: none;
    }

.ecf-nav-tab {
    font-family: var(--ecf-font-title);
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(255,255,255,0.7);
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 14px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    margin-bottom: -3px;
}

    .ecf-nav-tab:hover {
        color: var(--ecf-white);
        background-color: rgba(255,255,255,0.05);
    }

    .ecf-nav-tab.active {
        color: var(--ecf-white);
        border-bottom-color: var(--ecf-red);
        background-color: rgba(255,255,255,0.05);
    }

.ecf-content-area {
    padding: 24px 16px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Badges de medalla ECF */
.ecf-medal-gold   { color: #C9A227; font-weight: 900; }
.ecf-medal-silver { color: #A8A8A8; font-weight: 900; }
.ecf-medal-bronze { color: #AD6F2A; font-weight: 900; }

/* Loading indicator ECF */
.ecf-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    color: var(--ecf-navy);
    font-family: var(--ecf-font-title);
    font-weight: 700;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    gap: 20px;
}

.ecf-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--ecf-mid-gray);
    border-top-color: var(--ecf-red);
    border-radius: 50%;
    animation: ecf-spin 0.8s linear infinite;
}

@keyframes ecf-spin {
    to { transform: rotate(360deg); }
}

/* Responsive ECF */
@media (max-width: 768px) {
    .ecf-header {
        padding: 0 12px;
    }

    .ecf-header-logo-ecf {
        height: 36px;
    }

    .ecf-header-logo-castellon {
        height: 32px;
    }

    .ecf-header-title {
        font-size: 13px;
    }

    .ecf-header-title .ecf-subtitle {
        font-size: 10px;
    }

    .ecf-home-nav {
        justify-content: flex-start;
    }

    .ecf-nav-tab {
        font-size: 12px;
        padding: 12px 14px;
    }

    .ecf-content-area {
        padding: 16px 8px;
    }
}
