/* ================================
   VARIABLES Y RESET BÁSICO
=================================== */

:root {
    --color-bg: #f3f4f6;
    --color-text: #1f2937;
    --color-primary: #2563eb;
    --color-primary-soft: #60a5fa;
    --color-dark: #111827;
    --color-muted: #6b7280;
    --color-card-bg: #ffffff;
    --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 3px 10px rgba(0, 0, 0, 0.1);
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --transition-fast: 0.15s ease-in-out;
}

/* Pequeño reset para consistencia */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg);
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--color-text);
    line-height: 1.5;
    margin: 0;
}

/* Quita subrayado azul intenso por defecto */
a {
    text-decoration: none;
    color: inherit;
}

a:hover {
    text-decoration: none;
}

/* ================================
   NAVBAR
=================================== */

.navbar {
    padding: 0.75rem 1rem;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
    background-color: #ffffff;
}

.navbar-brand {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1.05rem;
}

.navbar-brand span {
    color: var(--color-primary);
}

.nav-link {
    font-weight: 500;
    font-size: 0.94rem;
    color: #efefef !important;
    padding-inline: 0.75rem !important;
}

.nav-link:hover {
    color: var(--color-primary-soft) !important;
}

.navbar-toggler {
    border: none;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* Nav activa */
.nav-link.active {
    color: var(--color-primary) !important;
    font-weight: 600;
}

/* ================================
   CONTENEDORES Y ESPACIADOS
=================================== */

main {
    padding-block: 1.5rem 2.5rem;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

/* ================================
   SECCIÓN HERO
=================================== */

.hero {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #ffffff;
    padding: 2.5rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-medium);
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(96, 165, 250, 0.25), transparent 55%);
    pointer-events: none;
}

.hero h1 {
    font-size: 2.1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.hero p {
    opacity: 0.9;
    margin-bottom: 0.5rem;
    max-width: 480px;
}

.hero .badge {
    background-color: rgba(15, 23, 42, 0.9);
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    letter-spacing: 0.03em;
}

/* Botón dentro del hero si existe */
.hero .btn-primary {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    font-weight: 600;
}

.hero .btn-primary:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
}

/* ================================
   SIDEBAR IZQUIERDO
=================================== */

.sidebar-box {
    background-color: var(--color-card-bg);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1.2rem;
    box-shadow: var(--shadow-soft);
}

.sidebar-box h5 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    border-left: 4px solid var(--color-primary);
    padding-left: 0.5rem;
}

/* Lista de próximas fechas o enlaces */
.sidebar-box ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.sidebar-box li {
    font-size: 0.9rem;
    padding: 0.25rem 0;
}

/* enlaces sidebar */
.sidebar-box a {
    color: var(--color-text);
    font-weight: 500;
}

.sidebar-box a:hover {
    color: var(--color-primary);
}

/* Etiquetas pequeñas en sidebar */
.sidebar-box small {
    color: var(--color-muted);
}

/* ================================
   RESULTADOS (TABLA)
=================================== */

.table-results {
    background-color: #ffffff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    font-size: 0.9rem;
}

.table-results thead {
    background-color: var(--color-dark);
    color: #ffffff;
}

.table-results thead th {
    border: none;
    font-weight: 600;
    padding-block: 0.6rem;
}

.table-results tbody tr {
    transition: background-color var(--transition-fast);
}

.table-results tbody tr:nth-child(even) {
    background-color: #f9fafb;
}

.table-results tbody tr:hover {
    background-color: #e5e7eb;
}

.table-results td {
    vertical-align: middle;
}

/* Badges de estado */
.badge-ganado,
.badge-empatado,
.badge-perdido {
    border-radius: 999px;
    font-size: 0.75rem;
    padding: 0.3rem 0.7rem;
    font-weight: 600;
}

.badge-ganado {
    background-color: #16a34a;
}

.badge-empatado {
    background-color: #6b7280;
}

.badge-perdido {
    background-color: #dc2626;
}

/* ================================
   CARD ÚLTIMO RESULTADO
=================================== */

#card-ultimo-resultado .card {
    border-radius: var(--radius-md);
    overflow: hidden;
    border: none;
    box-shadow: var(--shadow-soft);
}

#card-ultimo-resultado .card-header {
    background-color: #0f172a;
    color: #ffffff;
    font-size: 0.85rem;
}

#card-ultimo-resultado .card-body {
    padding: 1.25rem 1.5rem;
}

#card-ultimo-resultado .card-footer {
    background-color: #f9fafb;
}

/* ================================
   NOVEDADES (CARDS)
=================================== */

.post-card {
    border: none;
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    background-color: #ffffff;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
}

.post-card img {
    height: 170px;
    width: 100%;
    object-fit: cover;
}

.post-card .card-body {
    padding: 1rem 1.1rem;
}

.post-card .card-title {
    margin-bottom: 0.35rem;
}

.post-meta {
    font-size: 0.85rem;
    color: var(--color-muted);
}

/* tags en el footer de la card */
.card-footer .badge {
    padding: 0.45rem 0.6rem;
    font-size: 0.75rem;
    border-radius: 999px;
}

/* Botón "Leer más" si lo usas */
.btn-outline-primary.btn-sm {
    font-size: 0.78rem;
    padding-inline: 0.75rem;
}

/* ================================
   MODAL NOVEDADES
=================================== */

#modalNovedad .modal-content {
    border-radius: var(--radius-md);
    border: none;
    box-shadow: var(--shadow-medium);
}

#modalNovedad .modal-header {
    border-bottom-color: #e5e7eb;
}

#modalNovedad .modal-footer {
    border-top-color: #e5e7eb;
}

#modalNovedadImagen {
    max-height: 260px;
    object-fit: cover;
}

/* ================================
   FOOTER
=================================== */

footer {
    background-color: #ffffff;
    padding: 1rem;
    color: var(--color-muted);
    font-size: 0.9rem;
    border-top: 1px solid #e5e7eb;
    margin-top: 1rem;
}

footer a {
    color: var(--color-primary);
}

footer a:hover {
    color: var(--color-primary-soft);
}

/* ================================
   UTILIDADES EXTRA
=================================== */

img {
    user-select: none;
}

h2,
h3,
h4,
h5 {
    font-weight: 700;
    color: #000000;
}

small {
    color: var(--color-muted);
}

/* Bordes redondeados genéricos */
.rounded-md {
    border-radius: var(--radius-md);
}

/* Separadores suaves */
.hr-soft {
    border: 0;
    border-top: 1px solid #e5e7eb;
    margin: 0.75rem 0;
}

/* ================================
   RESPONSIVE
=================================== */

@media (max-width: 991.98px) {
    .hero {
        padding: 2rem 1.25rem;
    }

    .hero h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 767.98px) {
    main {
        padding-top: 1rem;
    }

    .navbar {
        padding-inline: 0.75rem;
    }

    .post-card img {
        height: 190px;
    }
}