/* --- EDITORIAL & MODERN THEME --- */

:root {
    --font-primary: 'Poppins', sans-serif;
    --color-text-dark: #212529;
    --color-text-muted: #6c757d;
    --color-primary: #0d6efd; 
    --color-light: #f8f9fa;
    --color-white: #ffffff;
    --color-border: #dee2e6;
}

body {
    font-family: var(--font-primary);
    color: var(--color-text-dark);
}

/* --- NAVBAR --- */
#navbar-principal {
    background-color: rgba(255, 255, 255, 1) !important; /* Fully opaque white */
    backdrop-filter: blur(10px);
    transition: background-color 0.3s;
}
#navbar-principal .navbar-brand {
    color: var(--color-text-dark) !important;
}
#navbar-principal .nav-link {
    color: var(--color-text-dark) !important; /* Always dark text for readability */
    font-weight: 600;
}
#navbar-principal .nav-link.active,
#navbar-principal .nav-link:hover {
    color: var(--color-primary) !important;
}
#navbar-principal .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(33, 37, 41, 0.75)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* --- HERO SECTION --- */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../img/pexels-lexovertoom-1109543.jpg'); /* Darker overlay */
    background-size: cover;
    background-position: center;
    min-height: 85vh; /* A bit taller */
    padding-top: 100px; /* Add some top padding to push content down from fixed nav */
    padding-bottom: 50px;
}
.hero-section h1 {
    font-size: clamp(2.8rem, 6vw, 4.5rem); /* Larger font size for impact */
    font-weight: 700;
    text-shadow: 0 4px 8px rgba(0,0,0,0.5); /* Stronger shadow */
}
.hero-section .lead {
    font-size: clamp(1.2rem, 2vw, 1.5rem); /* Larger lead text */
    margin-bottom: 2.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* --- GUIA SECTION --- */
#guia .card {
    border: none;
    transition: transform 0.3s, box-shadow 0.3s;
}
#guia .card:hover {
    transform: translateY(-10px);
    box-shadow: 0 1rem 3rem rgba(0,0,0,.175) !important;
}
#guia .card-img-top {
    height: 200px;
    object-fit: cover;
    border-radius: 0.25rem 0.25rem 0 0;
}
#guia .card-body {
    text-align: left; /* Align text left for readability */
    padding: 1.5rem;
}
#guia .card-title {
    font-weight: 700;
}


/* --- RECURSOS SECTION --- */
#recursos {
    background-color: var(--color-light);
}
#recursos .card {
    border: none;
    transition: transform 0.3s, box-shadow 0.3s;
}
#recursos .card:hover {
    transform: translateY(-10px);
    box-shadow: 0 1rem 3rem rgba(0,0,0,.175) !important;
}
#recursos .card-img-top {
    height: 200px;
    object-fit: cover;
    border-radius: 0.25rem 0.25rem 0 0;
}
#recursos .card-body {
    text-align: left;
    padding: 1.5rem;
}
#recursos .card-title {
    font-weight: 700;
}


/* --- OPINIONES SECTION --- */
#opiniones {
    background-color: var(--color-white);
}
#opiniones .opinion-card {
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
}
#opiniones .opinion-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.1) !important;
}
#opiniones .stars i {
    color: #ffc107; /* Yellow stars */
    font-size: 1.2rem;
}

/* --- FAQ SECTION --- */
#faq {
     background-color: var(--color-light); /* Make FAQ section background light */
}
#faq img { /* New rule for FAQ image */
    max-height: 300px; /* Limit height */
    object-fit: cover; /* Maintain aspect ratio */
    width: 100%; /* Ensure it takes full width */
    margin-bottom: 1rem; /* Add some space below the image */
}
#faq .accordion-button:not(.collapsed) {
    color: var(--color-primary);
    background-color: #e7f1ff;
    box-shadow: inset 0 -1px 0 rgba(0,0,0,.125);
}
#faq .accordion-item {
    border: 1px solid var(--color-border);
    margin-bottom: 0.5rem;
    border-radius: 0.25rem;
}
#faq .accordion-item:first-of-type {
    border-top-left-radius: 0.25rem;
    border-top-right-radius: 0.25rem;
}
#faq .accordion-item:last-of-type {
    border-bottom-left-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
}
#faq .accordion-body {
    color: var(--color-text-muted);
}


/* --- FOOTER --- */
footer {
    background-color: #212529 !important;
    padding-top: 3rem;
    padding-bottom: 3rem;
    color: rgba(255,255,255,0.7); /* Base text color for footer */
}
footer h5 {
    color: var(--color-white);
    font-weight: 700;
    margin-bottom: 1.5rem;
}
footer ul {
    padding-left: 0;
}
footer ul li {
    margin-bottom: 0.5rem;
}
footer .list-unstyled a {
    color: rgba(255,255,255,0.7) !important;
    text-decoration: none;
    transition: color 0.2s;
}
footer .list-unstyled a:hover {
    color: var(--color-primary) !important;
}
footer hr {
    border-color: rgba(255,255,255,0.1);
}
footer .text-center p {
    color: rgba(255,255,255,0.5);
    margin-top: 1rem;
}

/* --- NORMATIVA SECTION --- */
#normativa {
    background-color: var(--color-white); /* White background for this section */
}
#normativa .list-group-item {
    background-color: transparent;
    border-color: var(--color-border);
    padding: 1rem 1.25rem;
}
#normativa .list-group-item a {
    color: var(--color-text-dark);
    text-decoration: none;
    font-weight: 500;
}
#normativa .list-group-item a:hover {
    color: var(--color-primary);
}


/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .hero-section {
        min-height: 60vh;
        padding-top: 80px;
    }
    .hero-section h1 {
        font-size: 2.5rem;
    }
    .hero-section .lead {
        font-size: 1rem;
    }
    #navbar-principal .navbar-brand {
        font-size: 1.2rem;
    }
    #recursos .card-body, #guia .card-body {
        text-align: center;
    }
    #opiniones .opinion-card .stars {
        justify-content: center;
    }
    footer .col-lg-4 {
        text-align: center;
    }
    footer .list-unstyled {
        display: inline-block; /* Center list items */
        text-align: left;
    }
}

/* --- BLOG SECTION --- */
#blog {
    background-color: var(--color-white);
}
#blog .blog-card {
    border: none;
    transition: transform 0.3s, box-shadow 0.3s;
}
#blog .blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.1) !important;
}
#blog .blog-card-img {
    height: 200px;
    object-fit: cover;
    border-radius: 0.25rem 0.25rem 0 0;
}
#blog .blog-card-body {
    padding: 1.5rem;
}
#blog .blog-card-title {
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}
#blog .blog-card-text {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}
#blog .blog-card-link {
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    display: inline-block;
    margin-top: 1rem;
}
#blog .blog-card-link:hover {
    text-decoration: underline;
}

/* ── SEO 2026: bloques de localidad, provincias y migas ───────────── */
.breadcrumb { font-size: .85rem; }
.breadcrumb a { text-decoration: none; }
.local-bloque h2 { color: #0f172a; }
.local-lista { padding-left: 1.1rem; margin-bottom: .75rem; }
.local-lista li { margin-bottom: .35rem; }
.local-caja { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 14px; padding: 1.25rem; }
.local-caja a { word-break: break-word; }
.local-vecinas { columns: 2; column-gap: 1rem; }
.local-vecinas li { break-inside: avoid; margin-bottom: .25rem; }
.card-provincia { border: none; border-radius: 14px; transition: transform .15s, box-shadow .15s; }
.card-provincia:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(15,23,42,.12) !important; }
.hub-localidades { columns: 4 200px; column-gap: 1.5rem; }
.hub-localidades li { break-inside: avoid; margin-bottom: .3rem; font-size: .92rem; }
.article-body img { max-width: 100%; height: auto; }
.article-body table { width: 100%; margin-bottom: 1rem; }
.article-faq .accordion-button { font-weight: 600; }

/* Tarjetas de tipos de multa (también fuera del inicio) */
.card-tipo-multa, .card-guia { border: none; border-radius: 18px; overflow: hidden; transition: transform .15s, box-shadow .15s; }
.card-tipo-multa:hover, .card-guia:hover { transform: translateY(-4px); box-shadow: 0 14px 35px rgba(15,23,42,.16) !important; }
.card-tipo-multa i { display: block; font-size: 2.2rem; margin-bottom: .75rem; color: #2563eb; }

/* ── Fotos (SEO 2026) ─────────────────────────────────────────────── */
/* Franja de foto bajo el menú fijo de las páginas internas */
.banner-foto { position: relative; margin-top: 56px; height: clamp(160px, 26vw, 300px); overflow: hidden; background: #0b1120; }
.banner-foto img { width: 100%; height: 100%; object-fit: cover; object-position: center 55%; display: block; }
.banner-foto::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,17,32,.35) 0%, rgba(11,17,32,0) 45%, rgba(245,247,251,.25) 100%); }
.banner-foto + main.mt-5 { margin-top: 0 !important; }
/* Foto de fondo en la portada (debajo del degradé azul, que sigue dando contraste al texto) */
.hero-section { overflow: hidden; }
.hero-foto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .32; z-index: 0; }
/* Tarjetas con foto arriba */
.card-foto { width: 100%; height: 190px; object-fit: cover; display: block; }
.card-tipo-multa .card-foto + .card-body i { display: none; }
.foto-redonda { border-radius: 18px; box-shadow: 0 14px 35px rgba(15,23,42,.14); width: 100%; height: auto; }
.local-caja .card-foto { border-radius: 12px; margin-bottom: 1rem; height: 170px; }
.card-icono { height: 190px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #2563eb 0%, #0b1120 100%); }
.card-tipo-multa .card-icono i { display: block; font-size: 4rem; color: #fff; margin: 0; }
.card-tipo-multa .card-icono + .card-body > i { display: none; }
