@font-face {
    font-family: 'TypoGraphica';
    src: url('./fonts/TypoGraphica.woff2') format('woff2'),
         url('./fonts/TypoGraphica.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --color-primary-blue: #2f79e2;
    --color-white: #ffffff;
    --color-dark-main: #191b1f;
    --color-light-gray: #d7d7d7;
    --color-medium-gray: #464646;
    --color-text-dark: #333;
    --color-border-light: #eee;
    --color-no-results-bg: #2f79e20f;
}

body {
    margin: 0;
    padding: 0;
    font-family: Sans-Serif;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    color: var(--color-text-dark);
}

a {
    color: var(--color-white);
    text-decoration: none;
}

p {
    padding: 0;
    margin: 0;
}

nav {
    background: linear-gradient(to bottom, var(--color-dark-main) 0%, var(--color-medium-gray) 100%) !important;
    height: 66px;
    width: 100%;
    color: var(--color-white);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    gap: 20px;
}
nav a {
    font-size: 1.8em;
    font-weight: bold;
    letter-spacing: 1px;
    color: var(--color-white);
    font-family: 'TypoGraphica', Sans-Serif;
    white-space: nowrap;
}
nav a .hoy-azul {
    color: var(--color-primary-blue);
}

.full-content {
    max-width: 1320px;
    width: 100%;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 10px;
    box-sizing: border-box;
}

.no-results-message {
    text-align: center; 
    font-size: 1.2em; 
    color: var(--color-text-dark);
    padding: 20px;
    background-color: var(--color-no-results-bg);
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
    margin-top: 10px;
    margin-bottom: 10px;
}

.content {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    box-sizing: border-box;
}

.box-post {
    background: var(--color-white);
    width: 280px;
    padding: 1px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 5px;
    box-sizing: border-box;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease-in-out;
    cursor: pointer;
}
.box-post:hover {
    transform: translateY(-5px);
    background-color: #2f79e20f;
}

.box-post-title {
    background: var(--color-medium-gray);
    width: 98%;
    height: 30px;
    text-align: center;
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border-radius: 7px 7px 0 0;
    font-weight: bold;
    font-size: 0.95em;
}

.box-post-logo {
    margin: 10px 0;
    max-width: 100px;
    height: auto;
}

.box-post-balota {
    margin: 5px 0 10px 0;
}

.score {
    font-weight: bold;
    color: #fff;
    line-height: 35px;
    font-size: 16px;
    width: 35px;
    display: inline-block;
    text-align: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #52b231 0%, #52b231 50%, #1d8c10 51%, #1d8c10 100%);
    margin: 0 2px;
}

.score-quinta {
    font-weight: bold;
    color: #fff;
    line-height: 35px;
    font-size: 16px;
    width: 35px;
    display: inline-block;
    text-align: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #3431b2 0%, #3141b2 50%, #12108c 51%, #10188c 100%);
    margin-left: 5px;
}

.page-info {
    width: 100%;
    margin-top: 20px;
    margin-bottom: 25px;
    padding: 0 10px;
    box-sizing: border-box;
    line-height: 1.6;
    color: var(--color-text-dark);
}

.page-info h1 {
    font-size: 1.8em;
    margin-top: 25px;
    margin-bottom: 10px;
    color: var(--color-primary-blue);
    border-bottom: 2px solid var(--color-border-light);
    padding-bottom: 5px;
}
.page-info h1:first-of-type {
    margin-top: 15px;
}

.page-info p {
    margin-bottom: 15px;
}
.page-info p:last-of-type {
    margin-bottom: 0;
}

.festivo-info {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    border-radius: 8px;
    padding: 15px;
    margin: 20px auto;
    text-align: center;
    max-width: 90%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    font-size: 0.95em;
    line-height: 1.5;
}

.festivo-info p {
    margin: 0;
    font-weight: 500;
}

.sorteo-main-title {
    font-size: 2.5em;
    color: var(--color-primary-blue);
    margin-top: 20px;
    margin-bottom: 10px;
    text-align: center;
}

.sorteo-big-logo {
    max-width: 180px;
    height: auto;
    margin: 15px auto 20px auto;
    display: block;
}

.sorteo-description, .sorteo-horario {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 15px auto;
    line-height: 1.6;
    color: var(--color-text-dark);
}
.sorteo-horario {
    font-weight: bold;
    color: var(--color-medium-gray);
    margin-bottom: 30px;
}

p.sorteo-horario.festivo {
    color: #cc0000;
    font-weight: bold;
    font-size: 1.1em;
}
p.sorteo-horario.festivo strong {
    text-decoration: underline;
}

.sorteos-list {
    margin-top: 20px;
    gap: 15px;
}

.sorteo-item-card {
    background: var(--color-white);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: var(--color-text-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    width: calc(33% - 30px);
    min-width: 280px;
}

.sorteo-item-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.sorteo-item-title {
    font-size: 1.5em;
    color: var(--color-primary-blue);
    margin-bottom: 10px;
}

.sorteo-item-logo {
    max-width: 100px;
    height: auto;
    margin: 10px 0;
}

.sorteo-item-horario {
    font-weight: bold;
    color: var(--color-medium-gray);
    margin-bottom: 10px;
}

.sorteo-item-desc {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 15px;
}

.sorteo-item-link {
    display: inline-block;
    background-color: var(--color-primary-blue);
    color: var(--color-white);
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9em;
    transition: background-color 0.2s ease-in-out;
}
.sorteo-item-link:hover {
    background-color: #2566c7;
}

.footer {
    background: var(--color-dark-main);
    width: 100%;
    padding: 20px 10px;
    box-sizing: border-box;
    color: var(--color-white);
    margin-top: 30px;
}

.footer-content {
    max-width: 1320px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--color-white);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease-in-out;
}
.footer-links a:hover {
    text-decoration: underline;
    color: var(--color-primary-blue);
}

.footer-social {
    display: flex;
    gap: 15px;
    align-items: center;
}

.footer-social img {
    width: 28px;
    height: 28px;
    transition: transform 0.2s ease-in-out;
}
.footer-social img:hover {
    transform: scale(1.1);
}

@media only screen and (max-width: 1200px) {
    .box-post {
        width: calc(33.33% - 10px);
    }
}

@media only screen and (max-width: 992px) {
    nav {
        gap: 10px;
    }
    nav a {
        font-size: 1.5em;
    }
    nav a[href="/sorteos.php"] {
        font-size: 1em;
        margin-left: 0;
    }

    .box-post {
        width: calc(50% - 10px);
    }
    .page-info h1 {
        font-size: 1.6em;
    }

    .sorteo-item-card {
        width: calc(50% - 30px);
    }
}

@media only screen and (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    .footer-links, .footer-social {
        justify-content: center;
        width: 100%;
    }
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
    .page-info h1 {
        font-size: 1.4em;
    }
    .page-info p {
        font-size: 0.9em;
    }
}

@media only screen and (max-width: 480px) {
    nav {
        flex-direction: column;
        height: auto;
        padding: 10px 0;
    }
    nav a {
        font-size: 1.5em;
    }
    nav a[href="/sorteos.php"] {
        font-size: 1em;
    }

    .box-post {
        width: calc(100% - 20px);
        margin: 10px auto;
    }
    .page-info {
        padding: 0 10px;
    }
    .page-info h1 {
        font-size: 1.2em;
    }
    .footer-links a {
        font-size: 12px;
    }
    .footer-social img {
        width: 24px;
        height: 24px;
    }
    .sorteo-main-title {
        font-size: 2em;
    }
    .sorteo-big-logo {
        max-width: 120px;
    }
    .sorteo-description, .sorteo-horario {
        font-size: 0.9em;
    }
    .sorteo-item-card {
        width: calc(100% - 30px);
    }
}

/* ESTILOS ESPECÍFICOS PARA LA TABLA DE ÚLTIMOS RESULTADOS EN sorteo.php */
.ultimos-resultados-section {
    width: 100%;
    margin-top: 20px;
}

.ultimos-resultados-title {
    font-size: 1.8em;
    color: var(--color-primary-blue);
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-border-light);
}

.resultados-table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
    padding: 0 10px;
}

.resultados-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px auto;
    background-color: var(--color-white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
    min-width: 300px;
}

.resultados-table th,
.resultados-table td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid var(--color-border-light);
}

.resultados-table thead th {
    background-color: var(--color-primary-blue);
    color: var(--color-white);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9em;
}

.resultados-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.resultados-table tbody tr:hover {
    background-color: #f0f8ff;
}

.numero-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3px;
}

.score-list-item-primary {
    font-weight: bold;
    color: #fff;
    line-height: 30px;
    font-size: 15px;
    width: 30px;
    height: 30px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #52b231 0%, #52b231 50%, #1d8c10 51%, #1d8c10 100%);
}

.score-list-item-secondary {
    font-weight: bold;
    color: #fff;
    line-height: 30px;
    font-size: 15px;
    width: 30px;
    height: 30px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #3431b2 0%, #3141b2 50%, #12108c 51%, #10188c 100%);
}

@media only screen and (max-width: 480px) {
  .resultados-table th,
  .resultados-table td {
        padding: 8px 10px;
        font-size: 0.8em;
    }
  .score-list-item-primary,
  .score-list-item-secondary {
        width: 25px;
        height: 25px;
        line-height: 25px;
        font-size: 13px;
    }
}


.date-main-div {
    background: #2f79e20f;
    width: 100%;
    border-radius: 25px;
    font-size: 20px;
    line-height: 35px;
    text-transform: uppercase;
    text-align: center;
    box-sizing: border-box;
    margin-bottom: 10px;
}

.resultados-hoy,
.resultados-ayer,
.resultados-anteayer {
    width: 100%;
    margin-bottom: 20px;
    box-sizing: border-box;
}

/* Estilos específicos para secciones de días anteriores */
.resultados-ayer .score,
.resultados-anteayer .score {
    background: linear-gradient(135deg, #f6f8f9 0%, #e5ebee 50%, #d7dee3 51%, #f5f7f9 100%);
    color: #333;
}
.resultados-ayer .score-quinta,
.resultados-anteayer .score-quinta {
    background: linear-gradient(135deg, #ebf1f6 0%, #abd3ee 50%, #89c3eb 51%, #d5ebfb 100%);
    color: #333;
}
.resultados-ayer .box-post-logo,
.resultados-anteayer .box-post-logo {
    filter: grayscale(100%);
    opacity: 0.7;
}

/* =======================
           MENÚ RESPONSIVE
        ======================= */
        .main-nav{
            background: #0b1733;
            padding: 12px 0;
            position: sticky;
            top: 0;
            z-index: 999;
        }
        .nav-inner{
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            position: relative;
        }
        .nav-brand{
            font-weight: 900;
            font-size: 20px;
            color: white;
            text-decoration: none;
            white-space: nowrap;
        }
        .nav-links{
            display: flex;
            gap: 18px;
            align-items: center;
        }
        .nav-links a{
            color: white;
            text-decoration: none;
            font-weight: 700;
            font-size: 15px;
            opacity: 0.95;
        }
        .nav-links a:hover{
            opacity: 1;
            text-decoration: underline;
        }
        .nav-toggle{
            display: none;
            background: rgba(255,255,255,0.08);
            border: 1px solid rgba(255,255,255,0.15);
            color: white;
            padding: 10px 12px;
            border-radius: 10px;
            font-size: 18px;
            cursor: pointer;
        }

        @media(max-width: 850px){
            .nav-toggle{
                display: block;
            }
            .nav-links{
                display: none;
                position: absolute;
                top: 52px;
                left: 12px;
                right: 12px;
                background: #0b1733;
                border: 1px solid rgba(255,255,255,0.15);
                border-radius: 14px;
                padding: 12px;
                flex-direction: column;
                gap: 12px;
                box-shadow: 0 12px 30px rgba(0,0,0,0.35);
            }
            .nav-links.active{
                display: flex;
            }
            .nav-links a{
                width: 100%;
                padding: 12px;
                border-radius: 12px;
                background: rgba(255,255,255,0.06);
                text-align: center;
            }
        }

        /* IMPORTANTE:
           NO TOCAMOS TU DISEÑO DEL .box-post
           Solo evitamos que el <a> se vea como link */
        .box-post{
            text-decoration: none;
            color: inherit;
        }
        .box-post:hover{
            text-decoration: none;
        }