/* ==========================================================
   Fábula Vivencia Rural — estilos generales
   ========================================================== */

:root {
    --primary-color: #4a6741;   /* verde monte */
    --primary-dark: #2f4429;
    --secondary-color: #8ba888;
    --accent-color: #e6b17e;    /* ocre */
    --accent-dark: #c98d50;
    --crema: #f8f4ec;
    --tierra: #3b3226;
    --texto: #33302b;
    --radio: 18px;
    --sombra: 0 10px 30px rgba(47, 68, 41, .12);
    --sombra-fuerte: 0 20px 45px rgba(47, 68, 41, .22);
    --fuente-titulos: 'Fraunces', Georgia, serif;
    --fuente-texto: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

html { scroll-behavior: smooth; scroll-padding-top: 80px; overflow-x: hidden; overflow-x: clip; }
body {
    font-family: var(--fuente-texto);
    color: var(--texto);
    background: #fff;
    font-size: 1.05rem;
    line-height: 1.7;
    overflow-x: hidden;
}
h1, h2, h3, h4, .navbar-brand { font-family: var(--fuente-titulos); color: var(--primary-dark); }
h1, h2 { font-weight: 600; letter-spacing: -.01em; }
a { color: var(--primary-color); }
a:hover { color: var(--primary-dark); }
::selection { background: var(--accent-color); color: #fff; }

.section-padding { padding: 6rem 0; }
.bg-crema { background: var(--crema); }
.text-primary { color: var(--primary-color) !important; }

/* Títulos de sección con antetítulo y filete */
.titulo-seccion { text-align: center; margin-bottom: 3.5rem; }
.titulo-seccion .antetitulo {
    display: inline-block;
    font-family: var(--fuente-texto);
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--accent-dark);
    margin-bottom: .6rem;
}
.titulo-seccion h2 { font-size: clamp(2rem, 4vw, 2.8rem); margin: 0; }
.titulo-seccion h2::after {
    content: '';
    display: block;
    width: 70px;
    height: 3px;
    margin: 1.1rem auto 0;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
}

/* ---------- Botones ---------- */
.btn { border-radius: 50px; font-weight: 700; padding: .7rem 1.6rem; transition: all .3s ease; }
.btn-lg { padding: .9rem 2.1rem; }
.btn-primary { background: var(--primary-color); border-color: var(--primary-color); }
.btn-primary:hover, .btn-primary:focus {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(47, 68, 41, .3);
}
.btn-acento { background: var(--accent-color); border-color: var(--accent-color); color: var(--tierra); }
.btn-acento:hover, .btn-acento:focus {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(201, 141, 80, .35);
}
.btn-whatsapp { background: #25D366; border-color: #25D366; color: #fff; }
.btn-whatsapp:hover, .btn-whatsapp:focus { background: #128C7E; border-color: #128C7E; color: #fff; transform: translateY(-2px); }
.btn-outline-light:hover { transform: translateY(-2px); }

/* ---------- Navbar ---------- */
.navbar {
    padding: 1.1rem 0;
    background: transparent;
    transition: background-color .35s ease, padding .35s ease, box-shadow .35s ease;
}
.navbar.scrolled,
.navbar.menu-abierto {
    padding: .45rem 0;
    background: rgba(47, 68, 41, .94);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .15);
}
.navbar-brand img { height: 56px; width: auto; transition: height .35s ease; }
.navbar.scrolled .navbar-brand img { height: 44px; }
.navbar .nav-link {
    position: relative;
    color: #fff !important;
    font-weight: 700;
    font-size: .95rem;
    padding: .5rem .9rem !important;
}
.navbar .nav-link::after {
    content: '';
    position: absolute;
    left: .9rem;
    right: .9rem;
    bottom: .25rem;
    height: 2px;
    background: var(--accent-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s ease;
}
.navbar .nav-link:hover::after,
.navbar .nav-link.active::after { transform: scaleX(1); }
.navbar .nav-alojamiento {
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 50px;
    margin-left: .5rem;
}
.navbar .nav-alojamiento::after { display: none; }
.navbar .nav-alojamiento:hover { background: var(--accent-color); border-color: var(--accent-color); color: var(--tierra) !important; }
.navbar-toggler { border: 0; box-shadow: none !important; }

/* Acceso a Alojamiento junto a la hamburguesa: solo móvil y solo con la cabecera fija verde */
.aloja-movil {
    margin-left: auto;
    margin-right: .4rem;
    padding: .35rem .85rem;
    border-radius: 50px;
    font-size: .85rem;
    font-weight: 700;
    text-decoration: none;
    color: #fff;
    border: 1px solid #fff;
    background: transparent;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .3s ease, transform .3s ease, visibility .3s;
}
.aloja-movil i { margin-right: .2rem; }
.aloja-movil:hover, .aloja-movil:focus { color: #fff; background: rgba(255, 255, 255, .15); }
.navbar.scrolled .aloja-movil { opacity: 1; visibility: visible; transform: none; }
@media (max-width: 379.98px) {
    .aloja-movil { font-size: .75rem; padding: .3rem .6rem; margin-right: .2rem; }
    .navbar.scrolled .navbar-brand img { height: 38px; }
    .navbar-toggler { padding: .25rem .4rem; }
}
@media (max-width: 991.98px) {
    .navbar-collapse { padding: .5rem 0 1rem; }
    .navbar .nav-link::after { display: none; }
    .navbar .nav-alojamiento { margin: .5rem 0 0; text-align: center; }
}

/* ---------- Hero ---------- */
.hero-section {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    overflow: hidden;
    isolation: isolate;
}
.hero-section::before {               /* foto con zoom lento (efecto Ken Burns) */
    content: '';
    position: absolute;
    inset: 0;
    z-index: -2;
    background: var(--hero) center / cover no-repeat;
    animation: kenburns 22s ease-out both;
}
.hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(20, 30, 18, .55) 0%, rgba(20, 30, 18, .35) 45%, rgba(20, 30, 18, .75) 100%);
}
@keyframes kenburns { from { transform: scale(1.15); } to { transform: scale(1); } }
.hero-section .container { max-width: 900px; padding-top: 4rem; }
.hero-section .antetitulo {
    display: inline-block;
    padding: .4rem 1.1rem;
    margin-bottom: 1.4rem;
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 50px;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, .08);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}
.hero-section h1 {
    color: #fff;
    font-size: clamp(2.3rem, 6vw, 4.4rem);
    line-height: 1.1;
    text-shadow: 0 4px 24px rgba(0, 0, 0, .35);
    margin-bottom: 1.3rem;
}
.hero-section .lead { font-size: clamp(1.05rem, 2vw, 1.3rem); opacity: .95; margin-bottom: 2.2rem; }
.hero-botones { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; }
.hero-scroll {
    position: absolute;
    left: 50%;
    bottom: 1.8rem;
    width: 30px;
    height: 50px;
    margin-left: -15px;
    border: 2px solid rgba(255, 255, 255, .7);
    border-radius: 20px;
}
.hero-scroll::before {
    content: '';
    position: absolute;
    top: 9px;
    left: 50%;
    width: 4px;
    height: 9px;
    margin-left: -2px;
    border-radius: 2px;
    background: #fff;
    animation: rueda 1.8s ease-in-out infinite;
}
@keyframes rueda { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(16px); } }
@media (max-height: 640px) { .hero-scroll { display: none; } }

/* ---------- Tarjetas de servicios ---------- */
.service-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    aspect-ratio: 1 / 1;              /* cuadrada; si el texto no cabe, crece en alto */
    padding: 1.8rem;
    border-radius: var(--radio);
    overflow: hidden;
    color: #fff;
    text-decoration: none;
    box-shadow: var(--sombra);
    isolation: isolate;
    transition: transform .4s ease, box-shadow .4s ease;
}
.service-card .foto {
    position: absolute;
    inset: 0;
    z-index: -2;
    background-size: cover;
    background-position: center;
    transition: transform .8s ease;
}
.service-card::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(20, 30, 18, .05) 20%, rgba(20, 30, 18, .88) 75%);
    transition: background .4s ease;
}
.servicios-grid { max-width: 920px; margin: 0 auto; }
.service-card h3 { color: #fff; font-size: 1.45rem; margin-bottom: .6rem; }
.service-card p {
    font-size: .95rem;
    line-height: 1.55;
    margin-bottom: 1rem;
    opacity: .94;
}
.service-card .mas { font-weight: 800; font-size: .9rem; color: var(--accent-color); letter-spacing: .03em; }
.service-card .mas i { display: inline-block; transition: transform .3s ease; }
.service-card:hover { color: #fff; transform: translateY(-8px); box-shadow: var(--sombra-fuerte); }
.service-card:hover .foto { transform: scale(1.1); }
.service-card:hover::after { background: linear-gradient(180deg, rgba(20, 30, 18, .15) 0%, rgba(47, 68, 41, .95) 70%); }
.service-card:hover .mas i { transform: translateX(6px); }
.service-card.actual { outline: 3px solid var(--accent-color); outline-offset: 4px; }

/* ---------- Quiénes somos ---------- */
.nosotros-fotos { position: relative; max-width: 520px; margin: 0 auto 3rem; }
.nosotros-fotos .principal {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: var(--radio);
    box-shadow: var(--sombra-fuerte);
}
.nosotros-fotos .logo {
    position: absolute;
    right: -14px;
    bottom: -34px;
    width: 42%;
    max-width: 210px;
    padding: 10px;
    border-radius: 50%;
    background: #fff;
    box-shadow: var(--sombra);
    animation: flotar 6s ease-in-out infinite;
}
@keyframes flotar { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.datos-clave { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2rem; }
.dato {
    padding: 1.1rem .8rem;
    border-radius: 14px;
    background: var(--crema);
    text-align: center;
    transition: transform .3s ease;
}
.dato:hover { transform: translateY(-4px); }
.dato i { font-size: 1.6rem; color: var(--accent-dark); }
.dato strong { display: block; font-family: var(--fuente-titulos); font-size: 1.15rem; color: var(--primary-dark); margin-top: .3rem; }
.dato span { font-size: .82rem; line-height: 1.3; display: block; }
@media (max-width: 575.98px) {
    .datos-clave { gap: .5rem; }
    .dato { padding: .9rem .4rem; }
    .dato strong { font-size: .95rem; }
    .dato span { font-size: .72rem; }
    .nosotros-fotos .logo { right: 8px; }
}

/* ---------- Contenido de las páginas de servicio ---------- */
.contenido { max-width: 860px; margin: 0 auto; }
.contenido h2 {
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    margin: 3.2rem 0 1.1rem;
    padding-bottom: .7rem;
    border-bottom: 1px solid rgba(74, 103, 65, .15);
}
.contenido > h2:first-child { margin-top: 0; }
.contenido h2.intro {
    text-align: center;
    font-size: clamp(1.8rem, 3.6vw, 2.5rem);
    border: 0;
    margin-bottom: 2.5rem;
}
.contenido h2.intro::after {
    content: '';
    display: block;
    width: 70px;
    height: 3px;
    margin: 1.1rem auto 0;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
}
.contenido h2.intro + h2 { margin-top: 0; }
.contenido h3 { font-size: 1.3rem; margin: 2rem 0 .7rem; color: var(--primary-color); }
.contenido p { margin-bottom: 1.1rem; }
.contenido ul { list-style: none; padding: 0; margin: 1.2rem 0 1.5rem; display: grid; gap: .8rem; }
.contenido ul li {
    position: relative;
    padding: 1rem 1.2rem 1rem 3.2rem;
    border-radius: 14px;
    background: var(--crema);
    border-left: 4px solid var(--secondary-color);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.contenido ul li::before {
    content: '\F26A';                 /* bi-check-circle-fill */
    font-family: 'bootstrap-icons';
    position: absolute;
    left: 1.1rem;
    top: 1.05rem;
    font-size: 1.15rem;
    color: var(--primary-color);
}
.contenido ul li:hover { transform: translateX(6px); box-shadow: var(--sombra); border-left-color: var(--accent-color); }
.contenido .folletos img { transition: transform .4s ease; }
.contenido .folletos img:hover { transform: scale(1.02); }
.reserva {
    margin-top: 3.5rem;
    padding: 2.6rem 2rem;
    border-radius: var(--radio);
    text-align: center;
    color: #fff;
    background:
        radial-gradient(circle at 15% 20%, rgba(230, 177, 126, .25), transparent 45%),
        linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    box-shadow: var(--sombra-fuerte);
}
.reserva h2 { color: #fff; border: 0; margin: 0 0 .8rem; padding: 0; }
.reserva p { opacity: .92; }
.reserva .hero-botones { margin-top: 1.4rem; }

/* ---------- Galería ---------- */
.galeria-grid { columns: 3 280px; column-gap: 1rem; }
.galeria-item {
    position: relative;
    display: block;
    margin-bottom: 1rem;
    border-radius: 14px;
    overflow: hidden;
    break-inside: avoid;
    background: #e9e4d8;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .08);
}
.galeria-item img { width: 100%; height: auto; display: block; transition: transform .6s ease, filter .6s ease; }
.galeria-item::after {
    content: '\F52A';                 /* bi-search */
    font-family: 'bootstrap-icons';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #fff;
    background: rgba(47, 68, 41, .45);
    opacity: 0;
    transition: opacity .4s ease;
}
.galeria-item:hover img { transform: scale(1.07); }
.galeria-item:hover::after { opacity: 1; }
.galeria-item.oculta { display: none; }
.galeria-mas { text-align: center; margin-top: 1.5rem; }

/* ---------- Franja de llamada a la acción ---------- */
.franja-cta {
    position: relative;
    padding: 5rem 0;
    color: #fff;
    text-align: center;
    isolation: isolate;
    overflow: hidden;
}
.franja-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -2;
    background: url('/img/ruta-fabula-rural.jpg') center / cover fixed;
}
.franja-cta::after { content: ''; position: absolute; inset: 0; z-index: -1; background: rgba(35, 50, 30, .78); }
.franja-cta h2 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.franja-cta p { font-size: 1.15rem; opacity: .92; max-width: 640px; margin: 0 auto 2rem; }
@media (hover: none) { .franja-cta::before { background-attachment: scroll; } }

/* ---------- Contacto ---------- */
.contacto-info { display: grid; gap: 1rem; }
.contacto-dato {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.2rem;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .05);
    transition: transform .3s ease, box-shadow .3s ease;
}
.contacto-dato:hover { transform: translateY(-3px); box-shadow: var(--sombra); }
.contacto-dato .icono {
    flex: 0 0 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.3rem;
    color: #fff;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}
.contacto-dato h4 { font-family: var(--fuente-texto); font-size: .8rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-dark); margin: 0 0 .25rem; }
.contacto-dato p { margin: 0; line-height: 1.5; }
.contacto-dato a { color: var(--texto); text-decoration: none; font-weight: 700; }
.contacto-dato a:hover { color: var(--primary-color); }
.contacto-form { padding: 2.2rem; border-radius: var(--radio); background: #fff; box-shadow: var(--sombra); height: 100%; }
.contacto-form h3 { font-size: 1.6rem; margin-bottom: 1.5rem; }
.form-control { border-radius: 12px; border-color: #e3ddd0; }
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label { color: var(--primary-color); }
.form-control:focus { border-color: var(--primary-color); box-shadow: 0 0 0 .25rem rgba(74, 103, 65, .2); }
.mapa { border-radius: var(--radio); overflow: hidden; box-shadow: var(--sombra); }
.mapa iframe { border: 0; filter: saturate(.85); }

/* ---------- Footer ---------- */
.pie {
    position: relative;
    padding: 4.5rem 0 1.5rem;
    color: rgba(255, 255, 255, .78);
    background: var(--primary-dark);
}
.pie::before {                         /* borde ondulado superior */
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: -1px;
    height: 40px;
    background: var(--crema);
    -webkit-mask: radial-gradient(circle at 50% 0, #000 70%, transparent 71%) 0 0 / 80px 40px repeat-x;
    mask: radial-gradient(circle at 50% 0, #000 70%, transparent 71%) 0 0 / 80px 40px repeat-x;
}
.pie h5 { font-family: var(--fuente-titulos); color: #fff; font-size: 1.2rem; margin-bottom: 1rem; }
.pie a { color: rgba(255, 255, 255, .78); text-decoration: none; transition: color .2s ease, padding .2s ease; }
.pie a:hover { color: var(--accent-color); }
.pie ul li { margin-bottom: .45rem; }
.pie ul li a:hover { padding-left: 4px; }
.pie .logo-pie { width: 110px; border-radius: 50%; background: #fff; padding: 6px; margin-bottom: 1rem; }
.pie .legal { margin-top: 3rem; padding-top: 1.3rem; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .85rem; text-align: center; }

/* ---------- Botones flotantes ---------- */
.whatsapp-burbuja {
    display: none;
    position: fixed;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    z-index: 1050;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    font-size: 31px;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .3);
    text-decoration: none;
    animation: entrada-burbuja .6s 1s ease-out both;
}
.whatsapp-burbuja::before {            /* onda que late para llamar la atención */
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #25D366;
    z-index: -1;
    animation: latido 2.4s ease-out infinite;
}
.whatsapp-burbuja:hover, .whatsapp-burbuja:focus { background: #128C7E; color: #fff; }
@keyframes latido { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes entrada-burbuja { from { transform: scale(0); } to { transform: scale(1); } }
@media (max-width: 767.98px) { .whatsapp-burbuja { display: flex; } }

.volver-arriba {
    position: fixed;
    left: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    z-index: 1040;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    font-size: 1.2rem;
    background: var(--primary-color);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all .35s ease;
}
.volver-arriba.visible { opacity: 1; visibility: visible; transform: none; }
.volver-arriba:hover { background: var(--accent-dark); }
@media (min-width: 768px) { .volver-arriba { left: auto; right: 24px; bottom: 24px; } }

@media (max-width: 767.98px) {
    .section-padding { padding: 4.5rem 0; }
    .hero-section .antetitulo { font-size: .66rem; letter-spacing: .08em; padding: .35rem .9rem; }
    .service-card { padding: 1.4rem; }
    .service-card h3 { font-size: 1.3rem; }
    .service-card p { font-size: .9rem; }
    .contacto-form { padding: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
}
