:root {
    --primary-color: #2c3e50;
    --secondary-color: #981A32;
    --bg-color: #f4f6f8;
    --text-color: #333;
    --white: #ffffff;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Open Sans', sans-serif;
    --border-radius: 8px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body {
    background-color: var(--bg-color);
    font-family: var(--font-body);
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-body);
    color: var(--primary-color);
    margin-top: 0;
    font-weight: 700;
}

a {
    transition: all 0.3s ease;
    text-decoration: none;
}

/* Header Overhaul */
.site-header {
    background: var(--white);
    box-shadow: var(--shadow);
    padding: 0;
    position: relative;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.site- branding {
    display: flex;
    align-items: center;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary-color);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.site-title span {
    color: var(--secondary-color);
}

.menu-toggle {
    display: none;
    background: none;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background: var(--primary-color);
    color: white;
}


/* Navigation */
.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    padding: 0.5rem 0;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--secondary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Hero / Content Sections */
.hero-section {
    background: white;
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 2rem auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: flex;
    gap: 3rem;
    align-items: center;
}

.hero-image {
    flex: 1;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.hero-image:hover img {
    transform: scale(1.05);
}

.hero-content {
    flex: 1;
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.btn-primary {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-top: 1rem;
    border: 2px solid var(--secondary-color);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--secondary-color);
}

/* Footer */
/* Footer */
.site-footer {
    background-color: #1a252f;
    color: #ecf0f1;
    padding: 3rem 0;
    text-align: center;
    margin-top: 4rem;
    border-top: 4px solid var(--secondary-color);
    position: relative;
}

.footer-content {
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.footer-branding strong {
    color: var(--white);
    font-size: 1.25em;
    display: block;
    margin-bottom: 0.5rem;
    font-family: var(--font-body);
    letter-spacing: 1px;
}

.footer-info p {
    margin: 0.5rem 0;
    font-size: 0.9em;
    opacity: 0.7;
    color: #bdc3c7;
}

.admin-link {
    display: inline-block;
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.85em;
    transition: color 0.3s;
}

.admin-link:hover {
    color: var(--secondary-color);
}

/* Stats Row - Card Style */
.stats-row {
    display: flex;
    justify-content: center;
    gap: 2rem;
    background-color: var(--white);
    padding: 3rem 1rem;
    border-radius: var(--border-radius);
    margin-top: 2rem;
    color: var(--primary-color);
    flex-wrap: wrap;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.stats-item {
    text-align: center;
    flex: 1;
    min-width: 150px;
    padding: 1rem;
    transition: transform 0.3s ease;
}

.stats-item:hover {
    transform: translateY(-5px);
}

.stats-item i {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.stats-item p {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    color: var(--text-color);
}

.stats-item a {
    color: var(--text-color);
    text-decoration: none;
    display: block;
}

.stats-item a:hover {
    color: var(--primary-color);
}

/* Page Content */
.page-section {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 2rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 1rem;
    display: inline-block;
}

/* Forms */
.contact-container {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.map-container {
    flex: 1;
    min-width: 300px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.form-container {
    flex: 1;
    min-width: 300px;
    background: var(--bg-color);
    padding: 2rem;
    border-radius: var(--border-radius);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
    box-sizing: border-box;
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(44, 62, 80, 0.1);
}

.btn-submit {
    background-color: var(--primary-color);
    color: white;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 1rem;
}

.btn-submit:hover {
    background-color: #34495e;
}

/* Gallery / Esquelas */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    background: white;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(44, 62, 80, 0.9);
    color: white;
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay a {
    color: var(--secondary-color);
    font-weight: bold;
}

/* Feature Cards */
.quick-links-section {
    max-width: 1200px;
    margin: 3rem auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
    color: var(--text-color);
    border-top: 4px solid var(--secondary-color);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.feature-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin: 0.5rem 0;
    color: var(--primary-color);
}

.feature-card p {
    font-size: 0.95rem;
    color: #666;
    margin: 0;
}

/* Vertical Grid Cards */
.v-cards-section {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.v-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
}

.v-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    border-top: 4px solid var(--secondary-color);
    position: relative;
}

.v-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.v-card-img {
    height: 240px;
    overflow: hidden;
    position: relative;
}

.v-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.v-card:hover .v-card-img img {
    transform: scale(1.1);
}

.v-card-icon-blob {
    position: absolute;
    bottom: -25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50% 50% 50% 10%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 3px solid var(--white);
    z-index: 2;
    transition: transform 0.3s ease;
}

.v-card:hover .v-card-icon-blob {
    transform: rotate(15deg) scale(1.1);
}

/* Styles for cards without images */
.v-card.no-img {
    border-top: 5px solid var(--secondary-color);
}

.v-card-icon-static {
    width: 70px;
    height: 70px;
    background: var(--bg-color);
    color: var(--primary-color);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.v-card.no-img:hover .v-card-icon-static {
    background: var(--secondary-color);
    color: white;
}

.v-card.no-img .v-card-content {
    padding: 2.5rem;
}

.v-card-content {
    padding: 3rem 2rem 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.v-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.v-card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.v-card-footer {
    padding-top: 1rem;
    border-top: 1px solid #eee;
    color: var(--secondary-color);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* New Stats Display: Icon Ribbon */
.stats-banner {
    background: white;
    padding: 6rem 2rem;
    margin: 4rem 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.stats-banner-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 4rem;
}

.stat-box {
    text-align: center;
    min-width: 180px;
}

.stat-icon-wrapper {
    width: 80px;
    height: 80px;
    background: var(--bg-color);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--primary-color);
    font-size: 2rem;
    transition: all 0.3s ease;
}

/* No permitimos cambios de color en hover si no hay enlace */
.stat-box:hover .stat-number {
    transform: translateY(-8px);
}

.stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 0.5rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Premium Lists */
.premium-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.premium-list li {
    background: #fff;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 15px;
    border-left: 4px solid var(--secondary-color);
    transition: transform 0.2s ease;
}

.premium-list li:hover {
    transform: translateX(10px);
}

.premium-list li::before {
    content: '\f058';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: var(--secondary-color);
}

/* Guide Download Box */
.guide-download-box {
    background: var(--primary-color);
    color: white;
    padding: 2.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    margin-top: 3rem;
    box-shadow: var(--shadow);
}

.guide-download-box p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.stat-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    font-weight: 600;
}

/* Servicios: Estilo de Botones Flotantes (Pills) - Más prominentes */
.services-container {
    display: flex;
    justify-content: center;
    gap: 3rem;
    padding: 4rem 1rem;
    flex-wrap: wrap;
    max-width: 1000px;
    margin: 0 auto;
}

.pill-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 1.5rem 3rem;
    background: white;
    border: 2px solid #eee;
    border-radius: 100px;
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1.1rem;
    letter-spacing: 1px;
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    min-width: 320px;
    flex: 1;
}

.pill-btn i {
    font-size: 1.8rem;
    color: var(--secondary-color);
}

.pill-btn:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--secondary-color);
}


/* Footer Adjustments */
.footer-content {
    position: relative;
    padding-bottom: 2rem;
}

.footer-admin {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    opacity: 0.3;
}

.footer-admin a {
    color: #555;
}

.footer-admin a:hover {
    color: var(--secondary-color);
    opacity: 1;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap;
        padding: 1rem;
    }

    .site-branding {
        flex: 1;
    }

    .menu-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        width: 100%;
        padding-top: 1rem;
    }

    .main-nav.active {
        display: block;
        animation: fadeInDown 0.3s ease forwards;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0.5rem;
        background: #fdfdfd;
        padding: 1rem;
        border-radius: var(--border-radius);
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    }

    .nav-link {
        display: block;
        padding: 0.8rem 1rem;
        border-radius: 4px;
    }

    .nav-link.active,
    .nav-link:hover {
        background: rgba(152, 26, 50, 0.1);
    }

    @keyframes fadeInDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .hero-section {
        flex-direction: column;
        padding: 2rem 1rem;
        gap: 2rem;
    }

    .hero-image,
    .hero-content {
        width: 100%;
    }

    .hero-title {
        font-size: 2rem;
    }

    .stats-banner-grid {
        gap: 3rem;
    }

    .v-cards-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-container {
        flex-direction: column;
    }

    .map-container iframe {
        min-height: 300px;
    }
}
/* Localizador: formulario y resultados (adaptado a móvil) */
.localizador-container {
    align-items: stretch;
}

.localizador-mapa {
    display: flex;
}

.localizador-mapa iframe {
    flex: 1;
    min-height: 450px;
}

.localizador-form #contact-form {
    padding: 0;
    height: auto;
}

.resultados-cabecera {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tabla-resultados {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.tabla-resultados th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    text-align: left;
    padding: 0.75rem;
}

.tabla-resultados td {
    padding: 0.75rem;
    border-bottom: 1px solid #e5e8eb;
    vertical-align: middle;
}

.tabla-resultados tbody tr:nth-child(even) {
    background-color: #f9fafb;
}

.tabla-resultados .col-ue {
    font-weight: bold;
    color: #2980b9;
    text-align: center;
}

.tabla-resultados .col-tipo {
    text-align: center;
}

@media (max-width: 768px) {
    .page-section {
        margin: 1rem auto;
        padding: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .map-container,
    .form-container {
        min-width: 0;
    }

    /* En móvil, primero el buscador y después el mapa */
    .localizador-form {
        order: -1;
        padding: 1.25rem;
    }

    .localizador-mapa iframe {
        min-height: 280px;
    }

    .resultados-cabecera .btn-submit {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }

    /* La tabla de resultados se convierte en una ficha por difunto */
    .tabla-resultados thead {
        display: none;
    }

    .tabla-resultados,
    .tabla-resultados tbody,
    .tabla-resultados tr,
    .tabla-resultados td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .tabla-resultados tr {
        background: white;
        border: 1px solid #e5e8eb;
        border-left: 4px solid var(--secondary-color);
        border-radius: var(--border-radius);
        box-shadow: var(--shadow);
        margin-bottom: 1rem;
        padding: 0.5rem 0.75rem;
    }

    .tabla-resultados tbody tr:nth-child(even) {
        background: white;
    }

    .tabla-resultados td,
    .tabla-resultados .col-ue,
    .tabla-resultados .col-tipo {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        text-align: right;
        padding: 0.4rem 0;
        overflow-wrap: anywhere;
    }

    .tabla-resultados td:last-child {
        border-bottom: none;
    }

    .tabla-resultados td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--primary-color);
        text-align: left;
        flex-shrink: 0;
    }

    .tabla-resultados .col-vacia {
        display: none;
    }
}

/* Cinco cifras en el banner de estadísticas (2026-10-14) */
.stats-banner-grid {
    gap: 3rem 2rem;
}

.stat-box {
    min-width: 150px;
}
