/* assets/styles.css */

/* Reset muy ligero */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f3f4f6;
    color: #111827;
}

/* CABECERA Y MENÚ */

header {
    background: #111827;
    color: #f9fafb;
    padding: 0.6rem 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.site-title {
    font-weight: 700;
    letter-spacing: 0.04em;
    font-size: 1rem;
    text-transform: uppercase;
}

nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
}

nav a {
    color: #e5e7eb;
    text-decoration: none;
    margin-left: 1rem;
    font-size: 0.93rem;
    padding-bottom: 0.25rem;
    border-bottom: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}

nav a:hover {
    color: #f9fafb;
    border-color: #4b5563;
}

nav a.active {
    border-color: #facc15;
    color: #facc15;
}

/* LAYOUT GENERAL */

main {
    max-width: 1200px;
    margin: 1.5rem auto 2.5rem auto;
    padding: 0 1rem;
}

.layout-two-cols {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
}

/* TARJETAS / BLOQUES */

.card {
    background: #ffffff;
    border-radius: 0.8rem;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    margin-bottom: 1rem;
}

.card h1,
.card h2,
.card h3 {
    margin-top: 0;
    color: #111827;
}

.card p {
    margin-top: 0.35rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
    color: #374151;
}

/* TAGS / ETIQUETAS */

.tag {
    display: inline-block;
    padding: 0.18rem 0.6rem;
    border-radius: 999px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: #e5e7eb;
    color: #374151;
    margin-right: 0.5rem;
    margin-bottom: 0.4rem;
}

/* LISTAS dentro de tarjetas */

.card ul {
    padding-left: 1.1rem;
    margin: 0.25rem 0 0.75rem 0;
}

.card li {
    margin-bottom: 0.3rem;
}

/* ENLACES GENERALES */

a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* BANDOS */

.bando-item {
    margin-bottom: 1.5rem;
    padding: 0.75rem 0.9rem;
    border-radius: 0.6rem;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
}

.bando-meta {
    font-size: 0.82rem;
    color: #6b7280;
    margin-bottom: 0.2rem;
}

.bando-enlace-general {
    font-size: 0.8rem;
    margin-top: 0.25rem;
}


/* FOOTER */

footer {
    margin-top: 2rem;
    background: #111827;
    color: #9ca3af;
    font-size: 0.8rem;
    padding: 0.8rem 1rem;
    text-align: center;
    border-top: 1px solid #1f2937;
}

footer a {
    color: #e5e7eb;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}


/* RESPONSIVE */

@media (max-width: 800px) {
    .layout-two-cols {
        grid-template-columns: 1fr;
    }

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

    nav {
        justify-content: flex-start;
    }

    nav a {
        margin-left: 0;
        margin-right: 0.9rem;
        margin-top: 0.2rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 0.5rem 0.8rem;
    }

    main {
        padding: 0 0.8rem;
    }

    .card {
        padding: 1rem 1.1rem;
    }
}

/* Aviso especial en bandos */
.card-alerta-especial {
    border-left: 4px solid #dc2626;
}

.tag-alerta {
    background: #b91c1c;
    color: #fee2e2;
}
