/* 1. VARIABLES Y RESET PROFESIONAL */
:root {
    --gold: #c5a059;
    --gold-dark: #b08d4b;
    --dark: #1a1a1a;
    --white: #ffffff;
    --light-bg: #f9f9f9;
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
}

html { scroll-behavior: smooth; }
body { 
    margin: 0; 
    font-family: 'Lato', sans-serif; 
    color: var(--dark); 
    line-height: 1.6; 
    background-color: var(--white);
}

/* 2. TIPOGRAFÍA Y BOTONES */
h1, h2, h3 { font-family: 'Playfair Display', serif; }
h1 { font-size: clamp(2.2rem, 7vw, 4rem); letter-spacing: 1px; margin-bottom: 15px; border-bottom: 3px solid var(--gold); display: inline-block; }

.btn-cta, .btn-gold {
    display: inline-block;
    padding: 18px 30px;
    background-color: var(--gold);
    color: var(--white);
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 3px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
}
.btn-cta:hover, .btn-gold:hover { background-color: var(--gold-dark); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.2); }

/* 3. ESTRUCTURAS HERO (HOME Y LANDING) */
.hero, .local-hero {
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding: 60px 20px;
}
.hero { height: 80vh; background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('https://images.unsplash.com'); }
.local-hero { min-height: 45vh; } /* Más alto para que el texto respire */

.subtitle, .hero-sub { font-size: clamp(1.1rem, 3vw, 1.5rem); font-weight: 300; font-style: italic; margin-top: 10px; }
.badge { background: var(--gold); padding: 5px 12px; font-weight: bold; font-size: 0.75rem; letter-spacing: 1px; }

/* 4. CONTENEDORES Y GRID */
.container { max-width: 1100px; margin: 0 auto; padding: 0 25px; box-sizing: border-box; }

/* Home: Formulario Solapado */
.home-layout #contacto { margin-top: -100px; margin-bottom: 60px; position: relative; z-index: 10; }

/* Landings: Flexbox Lateral */
.landing-flex { display: flex; gap: 50px; margin-top: 40px; align-items: flex-start; }
.propuesta-valor { flex: 2; }
.sidebar-form { flex: 1; min-width: 340px; position: sticky; top: 20px; } /* El formulario te sigue al bajar */

/* 5. DISEÑO DEL FORMULARIO (FORM-CARD) */
.form-card {
    background: var(--white);
    padding: 35px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    border-top: 5px solid var(--gold);
    text-align: center;
}
.form-group { margin-bottom: 20px; text-align: left; }
.form-group label { display: block; font-weight: 700; margin-bottom: 5px; font-size: 0.85rem; color: #555; }
.form-group input, .form-group select { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 5px; font-size: 1rem; box-sizing: border-box; }

/* 6. LISTAS Y SEO */
.seo-text { font-size: 1.15rem; color: #444; margin: 40px 0; text-align: justify; }
.beneficios-lista { list-style: none; padding: 0; }
.beneficios-lista li { padding: 12px 0; border-bottom: 1px solid #eee; display: flex; align-items: center; }

/* 7. SITEMAP Y FOOTER */
.sitemap-section.centered { text-align: center; padding: 50px 20px; background: var(--light-bg); margin-top: 60px; }
.landing-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; margin: 20px 0; }
.landing-list a { color: var(--gold); font-weight: 700; text-decoration: none; }

/* 8. RESPONSIVE */
@media (max-width: 850px) {
    .landing-flex { flex-direction: column; }
    .sidebar-form { width: 100%; position: static; }
    .home-layout #contacto { margin-top: -50px; }
    h1 { font-size: 2.2rem; }
}

/* --- FOOTER SEÑORIAL --- */
.main-footer {
    background-color: var(--dark);
    color: var(--white);
    padding: 60px 0 20px;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
}

.gold-text { color: var(--gold); margin-top: 0; }

.main-footer h4 {
    color: var(--gold);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li { margin-bottom: 10px; }

.footer-links a {
    color: #bbb;
    text-decoration: none;
    transition: 0.3s;
    font-size: 0.95rem;
}

.footer-links a:hover { color: var(--gold); padding-left: 5px; }

.footer-bottom {
    text-align: center;
    border-top: 1px solid #333;
    margin-top: 40px;
    padding-top: 20px;
    font-size: 0.8rem;
    color: #666;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr; gap: 30px; text-align: center; }
}

/* --- NAVEGACIÓN DE ZONAS Y SILOS --- */

/* Grid de pueblos en las páginas de Comarca */
.lista-pueblos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    padding: 0;
    list-style: none;
    margin: 40px 0;
}

.btn-pueblo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-color: var(--light-bg);
    border: 1px solid #e0e0e0;
    color: var(--dark);
    text-decoration: none;
    font-weight: 700;
    text-align: center;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.btn-pueblo:hover {
    background-color: var(--white);
    border-color: var(--gold);
    border-bottom-color: var(--gold);
    color: var(--gold-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

/* Enlaces de retroceso (Breadcrumbs internos) */
.back-link {
    display: inline-flex;
    align-items: center;
    margin-top: 30px;
    color: #888;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    transition: 0.3s;
}

.back-link:hover {
    color: var(--gold);
}

.back-link::before {
    content: "←";
    margin-right: 8px;
}

/* Ajuste específico para el Footer dinámico */
.footer-nav h4 {
    margin-bottom: 25px;
}

.footer-links li {
    position: relative;
    padding-left: 0;
    transition: 0.3s;
}

.footer-links li a:hover {
    color: var(--gold);
    transform: translateX(5px);
    display: inline-block;
}

/* Ajuste para el texto SEO en páginas de Comarca */
.contenido-hub {
    border-left: 4px solid var(--gold);
    padding-left: 25px;
    margin: 30px 0;
    font-style: italic;
    color: #666;
}

/* RESPONSIVE */
@media (max-width: 600px) {
    .lista-pueblos-grid {
        grid-template-columns: 1fr; /* En móvil, un pueblo por fila para facilitar el toque */
    }
}

/* --- ESTILO HUB ELEGANTE --- */
.hub-hero { height: 50vh !important; }
.italic-title { font-style: italic; font-weight: 400 !important; }

.hub-intro {
    max-width: 800px;
    margin: -40px auto 60px;
    background: var(--white);
    padding: 40px;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 20;
    border-left: 5px solid var(--gold);
}

.section-title {
    text-align: center;
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    margin-bottom: 40px;
    color: var(--dark);
}

.pueblos-grid-elegant {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
}

.card-pueblo {
    background: var(--light-bg);
    padding: 40px 20px;
    text-decoration: none;
    border: 1px solid #eee;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.card-pueblo-name {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    color: var(--dark);
    margin-bottom: 10px;
}

.card-pueblo-action {
    display: block;
    font-size: 0.8rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
}

.card-pueblo:hover {
    background: var(--white);
    border-color: var(--gold);
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .hub-intro { margin: 20px auto; padding: 25px; }
}

/* --- COMARCA PREMIUM --- */
.hub-hero-premium { height: 65vh; display: flex; align-items: center; justify-content: center; text-align: center; color: white; background-size: cover; background-position: center; position: relative; }
.premium-title { font-family: 'Playfair Display', serif; font-size: 5rem; line-height: 1; border: none; }
.premium-title span { font-style: italic; font-weight: 400; color: var(--gold); }

.floating-intro { max-width: 900px; margin: -100px auto 80px; background: white; padding: 60px; box-shadow: var(--shadow); border-top: 6px solid var(--gold); position: relative; z-index: 50; }
.italic-gold { font-family: 'Playfair Display', serif; font-style: italic; color: var(--gold-dark); font-size: 2.2rem; margin-bottom: 30px; text-align: center; }

.pueblos-grid-premium { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 40px; margin-bottom: 100px; }
.premium-card { background: white; text-decoration: none; border-radius: 4px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.05); transition: 0.4s; border: 1px solid #eee; }
.card-img { height: 200px; background-size: cover; background-position: center; transition: 0.5s; }
.premium-card:hover .card-img { transform: scale(1.1); }
.card-info { padding: 30px; text-align: center; }
.card-info h3 { font-family: 'Playfair Display', serif; font-size: 1.8rem; margin: 0 0 10px; color: var(--dark); }
.card-info span { color: var(--gold); font-weight: 700; font-size: 0.8rem; letter-spacing: 2px; text-transform: uppercase; }

@media (max-width: 768px) {
    .premium-title { font-size: 3rem; }
    .floating-intro { margin: -50px 20px 40px; padding: 30px; }
}

/* --- BOTÓN HUB & SCROLL --- */
html {
    scroll-behavior: smooth;
}

.btn-cta-hub {
    display: inline-block;
    margin-top: 30px;
    padding: 18px 40px;
    background-color: var(--gold);
    color: var(--white);
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 2px;
    border-radius: 3px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.btn-cta-hub:hover {
    background-color: var(--gold-dark);
    transform: translateY(-3px);
}

/* Ajuste para que el formulario no quede pegado al techo tras el salto */
#contacto {
    scroll-margin-top: 50px; 
}
