/* Estilos globales */
:root {
    --color-primario: #8B4513; /* Marrón tierra */
    --color-secundario: #D2B48C; /* Beige */
    --color-texto: #333;
    --color-fondo: #FFF;
    --fuente-titulos: 'Playfair Display', serif;
    --fuente-texto: 'Montserrat', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--fuente-texto);
    color: var(--color-texto);
    line-height: 1.6;
    background-color: var(--color-fondo);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    background-image: linear-gradient(rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.6)), url('https://images.unsplash.com/photo-1513635269975-59663e0ac1ad?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
}

/* Estilos para el contenido principal */
.contenido {
    max-width: 800px;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.logo {
    width: 120px;
    margin-bottom: 2rem;
}

h1 {
    font-family: var(--fuente-titulos);
    font-size: 3rem;
    color: var(--color-primario);
    margin-bottom: 1rem;
}

p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
}

.textarea {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: 100%;
    max-width: 400px;
    margin: 0.5rem 0;
    font-size: 1rem;

}

.boton {
    display: inline-block;
    background-color: var(--color-primario);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    transition: background-color 0.3s;
    margin: 0.5rem;
}

.boton:hover {
    background-color: #6B3E0E;
}

.redes {
    margin-top: 2rem;
}

.redes a {
    display: inline-block;
    margin: 0 1rem;
    color: var(--color-primario);
    font-size: 1.5rem;
    transition: color 0.3s;
}

.redes a:hover {
    color: var(--color-secundario);
}

/* Animación para el texto */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

h1, p, .boton, .redes, #contador {
    animation: fadeIn 1s ease-out;
}

/* Estilos para el pie de página */
footer {
    margin-top: 4rem;
    padding: 1rem;
    color: #999;
    font-size: 0.9rem;
}

#contador {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-primario);
    margin: 1rem 0;
}

.formulario {
    margin: 2rem 0;
}

.formularioConsulta {
    margin: 2rem 0;
    justify-content: center;
    align-items: center;
}

.formulario input {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: 100%;
    max-width: 400px;
    margin: 0.5rem 0;
    font-size: 1rem;
}

.formulario button {
    background-color: var(--color-primario);
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.formulario button:hover {
    background-color: #6B3E0E;
}

/* Estilos para el spinner (opcional) */
.spinner {
    border: 4px solid rgba(139, 69, 19, 0.2);
    border-radius: 50%;
    border-top: 4px solid var(--color-primario);
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.contenedor-mapa {
            max-width: 800px;
            margin: 20px auto;
            background: white;
            padding: 10px;
            border-radius: 8px;
}

.mapa {
    display: block;
    width: 100%;
    height: auto;
}

.zona {
    stroke: #222;
    stroke-width: 1.6;
    stroke-linejoin: round;
    stroke-linecap: round;
    cursor: pointer;

    transform-box: fill-box;
    transform-origin: center;
    transition:
        fill 0.2s ease,
        stroke-width 0.2s ease,
        transform 0.2s ease;

    position: relative;
}

#moratalla {
    fill: #b9f700;
}

#caravaca {
    fill: #65cc33;
}

#cehegin {
    fill: #99cc67;
}

#calasparra {
    fill: #ccff9a;
}

#bullas {
    fill: #ccff66;
}

/* Efecto hover */
.zona:hover {
    fill: #ff9800;
    stroke: #111;
    stroke-width: 3;
    transform: scale(1.1);
}

/* Nombres de los municipios */
.etiqueta {
    fill: #111;
    font-size: 19px;
    text-anchor: middle;
    dominant-baseline: middle;
    pointer-events: none;
    user-select: none;
}

.zona:focus {
    outline: none;
}

/* Accesibilidad con teclado */
.zona:focus-visible {
    outline: none;
    stroke: #005fcc;
    stroke-width: 4;
    transform: scale(1.1);
}