/* =====================================================================
   LISTADOS · asociacionsgalicia.com  ·  css/listado.css
   Páxinas /provincia, /municipio, /tipo e /comisions-de-festas.
   Cabeceira, tarxetas de provincia e pé copiados da portada (index.php).
   ===================================================================== */
:root {
    --p-navy:    #0a1628;
    --p-blue:    #1a3a6e;
    --p-mid:     #2563eb;
    --p-bright:  #3b82f6;
    --p-cyan:    #06b6d4;
    --p-gold:    #f59e0b;
    --p-gold2:   #fbbf24;
    --p-surface: #ffffff;
    --p-bg:      #f0f4fb;
    --p-text:    #0f172a;
    --p-muted:   #64748b;
    --p-border:  #e2e8f0;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Outfit', sans-serif;
    background: var(--p-bg);
    color: var(--p-text);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ── HEADER ── */
.site-header {
    background: transparent;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    transition: background 0.4s ease, box-shadow 0.4s ease;
}
.site-header.scrolled {
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}
.header-top { max-width: 1200px; margin: 0 auto; padding: 20px 32px; }
.header-row { display: flex; align-items: center; justify-content: space-between; }

.header-logo-img   { height: 54px; display: block !important; }
.header-logo-icon,
.header-logo-text,
.header-logo-sub   { display: none !important; }

.header-nav { display: flex; gap: 8px; align-items: center; }
.nav-link {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s;
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,0.1); }
.nav-link.nav-cta {
    background: var(--p-mid);
    color: white;
    font-weight: 600;
}
.nav-link.nav-cta:hover { background: var(--p-bright); }

/* Hamburguesa */
.nav-toggle {
    display: none;
    background: rgba(255,255,255,0.12);
    border: none; border-radius: 8px;
    width: 40px; height: 40px;
    align-items: center; justify-content: center;
    cursor: pointer; flex-shrink: 0;
}
.nav-toggle svg { width: 22px; height: 22px; color: white; }
.nav-close {
    display: none;
    position: absolute; top: 18px; right: 18px;
    background: rgba(255,255,255,0.12);
    border: none; border-radius: 8px;
    width: 40px; height: 40px;
    align-items: center; justify-content: center;
    cursor: pointer; color: white; z-index: 10;
}
.nav-close svg { width: 22px; height: 22px; }
body.nav-open { overflow: hidden; }

@media (max-width: 768px) {
    .header-top { padding: 16px 20px; }
    .header-logo-img { height: 34px !important; }
    .nav-toggle { display: flex !important; }
    .header-nav {
        display: none;
        position: fixed; inset: 0;
        background: rgba(10, 22, 40, 0.98);
        flex-direction: column;
        align-items: center; justify-content: center;
        gap: 28px; z-index: 999;
    }
    .header-nav.nav-open { display: flex !important; }
    .header-nav .nav-link { font-size: 1.4rem; font-weight: 600; color: white !important; opacity: 1 !important; padding: 10px 24px; }
    .header-nav .nav-link.nav-cta { background: var(--p-mid); border-radius: 12px; }
    .nav-close { display: flex !important; }
}
@media (min-width: 769px) { .nav-toggle { display: none !important; } }
/* Nos listados a cabeceira vai sempre sobre fondo escuro */
.site-header { background: rgba(10, 22, 40, 0.97); }

/* ── CABECEIRA DE PÁXINA ── */
.lst-hero {
    background: linear-gradient(135deg, var(--p-navy), var(--p-blue));
    color: #fff;
    padding: 128px 32px 48px;
}
.lst-hero-inner, .lst-main { max-width: 1100px; margin: 0 auto; }
.lst-crumbs { font-size: 0.8rem; color: rgba(255,255,255,0.6); margin-bottom: 18px; }
.lst-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.lst-crumbs li + li::before { content: '›'; margin-right: 6px; color: rgba(255,255,255,0.35); }
.lst-crumbs a { color: rgba(255,255,255,0.8); text-decoration: none; }
.lst-crumbs a:hover { color: #fff; text-decoration: underline; }
.lst-hero h1 {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 400; line-height: 1.15; margin-bottom: 14px;
}
.lst-intro { max-width: 760px; font-size: 1rem; line-height: 1.65; color: rgba(255,255,255,0.82); }
.lst-intro strong { color: #fff; font-weight: 600; }

/* ── CONTIDO ── */
.lst-wrap { padding: 40px 32px 72px; }
.lst-block { margin-bottom: 48px; }
.lst-h2 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.45rem; font-weight: 400; color: var(--p-navy);
    margin-bottom: 6px; line-height: 1.25;
}
.lst-sub { font-size: 0.88rem; color: var(--p-muted); margin-bottom: 20px; }

.lst-list {
    list-style: none;
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
}
.lst-item a {
    display: block; height: 100%;
    background: #fff; border: 1px solid var(--p-border); border-radius: 12px;
    padding: 14px 16px; text-decoration: none; color: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.lst-item a:hover { border-color: rgba(59,130,246,0.5); box-shadow: 0 4px 18px rgba(37,99,235,0.1); }
.lst-item--premium a { border-color: #fde68a; background: linear-gradient(135deg, #fffbeb, #fff 60%); }
.lst-name { display: block; font-size: 0.93rem; font-weight: 600; line-height: 1.35; color: var(--p-text); }
.lst-meta { display: block; margin-top: 4px; font-size: 0.76rem; color: var(--p-muted); }
.lst-star { color: var(--p-gold); font-weight: 700; }

.lst-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.lst-chips a, .lst-chips span {
    display: inline-block; background: #fff; border: 1px solid var(--p-border);
    border-radius: 999px; padding: 7px 14px; font-size: 0.83rem;
    color: var(--p-text); text-decoration: none; transition: border-color 0.2s, color 0.2s;
}
.lst-chips a:hover { border-color: var(--p-mid); color: var(--p-mid); }
.lst-chips b { font-weight: 600; color: var(--p-muted); margin-left: 4px; }

.lst-pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin-top: 28px; }
.lst-pager a, .lst-pager span {
    min-width: 40px; padding: 9px 12px; text-align: center;
    border-radius: 10px; font-size: 0.86rem; font-weight: 500; text-decoration: none;
    background: #fff; border: 1px solid var(--p-border); color: var(--p-text);
}
.lst-pager a:hover { border-color: var(--p-mid); color: var(--p-mid); }
.lst-pager .is-current { background: var(--p-mid); border-color: var(--p-mid); color: #fff; }
.lst-pager .is-gap { background: none; border: none; min-width: 0; padding: 9px 2px; color: var(--p-muted); }

.lst-note { font-size: 0.82rem; color: var(--p-muted); line-height: 1.6; margin-top: 16px; }
.lst-note a { color: var(--p-mid); }

/* ── TARXETAS DE PROVINCIA ── */
.provinces-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 16px;
}
.province-card {
    background: white;
    border: 1px solid var(--p-border);
    border-radius: 16px; padding: 28px 20px;
    text-align: center; text-decoration: none;
    transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
    position: relative; overflow: hidden;
}
.province-card::after {
    content: '';
    position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--p-mid), var(--p-cyan));
    transform: scaleX(0); transition: transform 0.3s; transform-origin: left;
}
.province-card:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(37,99,235,0.12); border-color: rgba(59,130,246,0.3); }
.province-card:hover::after { transform: scaleX(1); }
.province-name {
    display: block; font-family: 'DM Serif Display', serif;
    font-size: 1.15rem; font-weight: 400;
    color: var(--p-navy); margin-bottom: 6px;
}
.province-count { font-size: 0.78rem; color: var(--p-muted); font-weight: 500; }
.province-num {
    display: block; font-family: 'DM Serif Display', serif;
    font-size: 1.8rem; color: var(--p-mid); margin-bottom: 4px;
}


/* ── FOOTER ── */
.site-footer {
    background: var(--p-navy);
    border-top: none;
    padding: 0;
    text-align: left;          /* anula calquera centrado herdado de style.css */
}
.site-footer * { text-align: inherit; }

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 58px 32px 42px;
    display: grid;
    grid-template-columns: 1.9fr 1fr 1fr 1fr;
    gap: 44px 28px;
    align-items: start;
    text-align: left;
}

/* Columna de marca */
.footer-brand { max-width: 320px; }

.footer-logo {
    display: inline-block;
    margin-bottom: 15px;
    transition: opacity 0.2s ease;
}
.footer-logo:hover { opacity: 0.75; }
.footer-logo img {
    display: block;
    height: 38px;
    width: auto;
    max-width: 100%;
}

.footer-brand p {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.38);
    line-height: 1.75;
    margin-bottom: 18px;
}

.footer-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.16);
    color: rgba(255,255,255,0.85);
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    padding: 10px 16px;
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.footer-cta svg { width: 15px; height: 15px; flex-shrink: 0; }
.footer-cta:hover {
    background: rgba(255,255,255,0.13);
    border-color: rgba(255,255,255,0.3);
    color: #fff;
    transform: translateY(-2px);
}

/* Columnas de enlaces */
.footer-col-title {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
    margin-bottom: 15px;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 0.85rem;
    line-height: 1.4;
    transition: color 0.2s;
    width: fit-content;
}
.footer-links a:hover { color: white; }

/* Barra inferior */
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 22px 32px 28px;
}
.footer-bottom-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.25);
}
.footer-bottom-inner a {
    color: rgba(255,255,255,0.38);
    text-decoration: none;
    transition: color 0.2s;
}
.footer-bottom-inner a:hover { color: rgba(255,255,255,0.75); }
.footer-bottom-inner .sep { color: rgba(255,255,255,0.15); }

.footer-disclaimer {
    max-width: 1100px;
    margin: 10px auto 0;
    font-size: 0.72rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.2);
}

/* ── Responsive do footer ── */

/* Tablet: marca a ancho completo, tres columnas nunha fila */
@media (max-width: 980px) {
    .footer-inner {
        grid-template-columns: repeat(3, 1fr);
        gap: 36px 24px;
        padding: 48px 28px 38px;
    }
    .footer-brand {
        grid-column: 1 / -1;
        max-width: 520px;
    }
}

/* Móbil: marca + dúas columnas de enlaces (moito menos scroll) */
@media (max-width: 620px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 30px 20px;
        padding: 40px 24px 32px;
    }
    .footer-brand {
        grid-column: 1 / -1;
        max-width: 100%;
        padding-bottom: 4px;
        border-bottom: 1px solid rgba(255,255,255,0.07);
    }
    .footer-logo img { height: 32px; }
    .footer-brand p { font-size: 0.82rem; margin-bottom: 16px; }
    .footer-cta {
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
        margin-bottom: 20px;
    }
    .footer-col-title { margin-bottom: 12px; }
    .footer-links { gap: 11px; }
    .footer-links a { font-size: 0.83rem; }

    .footer-bottom { padding: 20px 24px 30px; }
    .footer-bottom-inner { font-size: 0.72rem; }
    .footer-disclaimer { font-size: 0.7rem; }
}

/* Pantallas moi estreitas: unha soa columna */
@media (max-width: 380px) {
    .footer-inner { grid-template-columns: 1fr; gap: 26px; }
}

@media (max-width: 900px) {
    .provinces-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
}
@media (max-width: 768px) {
    .lst-hero { padding: 96px 20px 36px; }
    .lst-wrap { padding: 28px 20px 56px; }
    .lst-list { grid-template-columns: 1fr; }
    .province-card { padding: 20px 14px; }
    .province-name { font-size: 0.95rem; }
}
