/* =========================================================
   Tierras Atlas - Estilos base
   Paleta: tonos tierra y verde
   ========================================================= */

:root {
    --atlas-verde-oscuro: #2f3e2e;
    --atlas-verde: #4a6b3d;
    --atlas-verde-claro: #7ea172;
    --atlas-tierra: #a9784f;
    --atlas-tierra-claro: #d9b48f;
    --atlas-arena: #f4ede2;
    --atlas-navbar: var(--atlas-verde-oscuro);
    --atlas-navbar-texto: #fff;
    --atlas-texto: #2b2620;
    --bs-primary: var(--atlas-verde);
    --bs-primary-rgb: 74, 107, 61;
    --fuente-titulos: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --fuente-texto: 'Lato', 'Segoe UI', Roboto, Arial, sans-serif;
    --fuente-marca: 'Montserrat', 'Segoe UI', Roboto, Arial, sans-serif;
}

html {
    height: 100%;
}

body {
    font-family: var(--fuente-texto);
    color: var(--atlas-texto);
    background-color: var(--atlas-arena);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

/* El contenido mantiene su altura natural para evitar grandes espacios vacios
   entre el bloque principal y el pie de pagina. */
.contenido-principal {
    width: 100%;
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--atlas-verde);
}

a:hover {
    color: var(--atlas-verde-oscuro);
}

/* Navbar */
.navbar {
    background-color: var(--atlas-navbar);
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

.navbar-contenido {
    padding-left: clamp(1.25rem, 4vw, 5rem);
    padding-right: clamp(1.25rem, 4vw, 5rem);
}

.navbar .nav-link {
    color: var(--atlas-navbar-texto);
    position: relative;
    opacity: 0.88;
    font-size: 1.1rem;
    font-weight: 600;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.navbar .nav-link.active,
.navbar .nav-link:hover {
    opacity: 1;
}

.navbar .nav-link::after {
    content: '';
    position: absolute;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.15rem;
    height: 2px;
    background-color: var(--atlas-tierra);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
}

.navbar .nav-link:hover::after,
.navbar .nav-link.active::after {
    transform: scaleX(1);
}

.navbar .nav-email {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.9rem !important;
    border: 1px solid var(--atlas-tierra);
    border-radius: 999px;
    color: var(--atlas-navbar-texto);
    font-size: 0.95rem;
}

.navbar .nav-email::after {
    display: none;
}

.navbar .nav-email:hover,
.navbar .nav-email:focus-visible {
    color: #fff;
    background-color: var(--atlas-tierra);
}

.navbar-toggler {
    border-color: var(--atlas-navbar-texto);
    opacity: 0.6;
}

/* El icono de hamburguesa se pinta con el color de texto del navbar (para que
   se vea bien tanto en temas con navbar oscuro como en uno con navbar claro). */
.navbar-toggler-icon {
    background-image: none;
    background-color: var(--atlas-navbar-texto);
    -webkit-mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23000' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23000' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
}

.navbar-brand {
    color: var(--atlas-navbar-texto) !important;
    font-family: var(--fuente-marca);
    letter-spacing: 0.02em;
    font-size: 2.2rem;
    display: flex;
    align-items: center;
}

.marca-logo {
    height: 64px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    vertical-align: middle;
}

.navbar-brand .marca-logo {
    width: 64px;
    max-width: none;
    margin-right: 0.8rem !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Selector de idioma */
.selector-idioma .bandera {
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.selector-idioma .bandera-generica {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--atlas-tierra);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    flex-shrink: 0;
}

.selector-idioma .dropdown-toggle::after {
    margin-left: 0.3rem;
}

.selector-idioma .dropdown-menu {
    min-width: auto;
}

.selector-idioma .dropdown-item.active {
    background-color: var(--atlas-verde);
}

/* Botones */
.btn-primary {
    background-color: var(--atlas-verde);
    border-color: var(--atlas-verde);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--atlas-verde-oscuro);
    border-color: var(--atlas-verde-oscuro);
}

.btn-outline-primary {
    color: var(--atlas-verde);
    border-color: var(--atlas-verde);
}

.btn-outline-primary:hover {
    background-color: var(--atlas-verde);
    border-color: var(--atlas-verde);
}

.btn-tierra {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.8rem 1.45rem;
    background: var(--boton-tierra-color, #4f7655);
    border: 1px solid var(--boton-tierra-color, #4f7655);
    border-radius: 999px;
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: 0 8px 20px rgba(38, 56, 43, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn-tierra::after {
    content: '\2192';
    font-size: 1.15em;
    line-height: 1;
    transition: transform 0.2s ease;
}

.btn-tierra:hover,
.btn-tierra:focus-visible {
    background: var(--boton-tierra-color-hover, #3f6046);
    border-color: var(--boton-tierra-color-hover, #3f6046);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 11px 24px rgba(38, 56, 43, 0.3);
}

.btn-tierra:hover::after,
.btn-tierra:focus-visible::after {
    transform: translateX(4px);
}

/* Hero: carrusel de fotos de portada + un solo boton encima */
.hero-atlas {
    position: relative;
    min-height: 460px;
    flex: 1 0 460px;
    overflow: hidden;
}

.hero-carrusel,
.hero-carrusel-vacio {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-carrusel .carousel-inner,
.hero-carrusel .carousel-item {
    height: 100%;
}

.hero-carrusel .carousel-item {
    position: relative;
}

.hero-carrusel-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: var(--atlas-verde-oscuro);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
    animation: heroZoom 14s ease-in-out infinite alternate;
}

@keyframes heroZoom {
    from { transform: scale(1); }
    to { transform: scale(1.08); }
}

/* Fundido continuo: la foto siguiente queda debajo mientras la actual
   desaparece. Asi nunca queda visible el fondo entre ambas imagenes. */
.hero-carrusel .carousel-item {
    display: block;
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: none !important;
    transition: opacity 0.9s ease-in-out;
}

.hero-carrusel .carousel-item.active {
    z-index: 1;
    opacity: 1;
}

.hero-carrusel .carousel-item.hero-siguiente {
    z-index: 1;
    opacity: 1;
    transition: none;
}

.hero-carrusel .carousel-item.hero-saliendo {
    z-index: 2;
    opacity: 0;
}

.hero-carrusel-vacio {
    background-color: var(--atlas-verde-oscuro);
}

.hero-boton-ampliar {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1rem;
}

.hero-lightbox-imagen {
    max-width: 100vw;
    max-height: 100vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

.hero-lightbox-cerrar {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10;
}

/* El boton flota encima del carrusel, abajo a la izquierda (misma posicion
   que tenia antes). El resto del area deja pasar los clics para que las
   flechitas de prev/next del carrusel sigan funcionando. */
.hero-boton-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    padding-bottom: 3.5rem;
    pointer-events: none;
}

.hero-boton-overlay .btn {
    pointer-events: auto;
}

/* Seccion "Bienvenido" (Home): titulo centrado + texto centrado */
.bienvenida-titulo {
    font-family: var(--fuente-titulos);
    font-size: clamp(2rem, 3vw, 2.75rem);
    font-weight: 700;
    color: var(--atlas-verde-oscuro);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.bienvenida-texto {
    max-width: 850px;
    font-size: 1.08rem;
    line-height: 1.65;
}

.bienvenida-texto p {
    margin-bottom: 0.75rem;
}

.bienvenida-destacado {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--atlas-tierra);
    margin-bottom: 0.75rem;
}

.about-lista-icono {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background-color: var(--atlas-tierra);
    color: #fff;
    font-size: 1.2rem;
}

.about-galeria-panel {
    background-color: #fff;
    border-radius: 1rem;
    padding: 2rem 1.5rem;
    box-shadow: 0 4px 16px rgba(43, 38, 32, 0.08);
}

.contacto-container-ancho {
    max-width: 1600px;
    width: 92%;
    margin-left: auto;
    margin-right: auto;
}

.contacto-form-panel {
    border-radius: 1rem;
    padding: 2.5rem;
    box-shadow: 0 4px 16px rgba(43, 38, 32, 0.08);
    height: 100%;
}

.contacto-form-panel .form-contacto {
    max-width: 560px;
    margin-inline: auto;
}

.contacto-video-marco {
    padding: 1rem;
}

.contacto-video-columna {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 1rem;
    cursor: zoom-in;
    box-shadow: 0 4px 16px rgba(43, 38, 32, 0.08);
}

@media (min-width: 992px) {
    .contacto-video-columna {
        height: 480px;
    }
}

.contacto-imagen-marco {
    padding: 1rem;
}

.contacto-imagen-columna {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 1rem;
    box-shadow: 0 4px 16px rgba(43, 38, 32, 0.08);
}

@media (min-width: 992px) {
    .contacto-imagen-columna {
        height: 480px;
    }
}

@media (max-width: 767.98px) {
    .about-galeria-panel {
        padding: 1.5rem 1rem;
    }

    .contacto-form-panel {
        padding: 1.5rem 1.25rem;
    }
}

.about-galeria-titulo {
    font-family: var(--fuente-titulos);
    font-size: 1.3rem;
    color: var(--atlas-tierra);
}

.about-galeria-foto {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border: 3px solid var(--atlas-tierra);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-galeria-foto:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 16px rgba(43, 38, 32, 0.25);
}

video.about-galeria-foto {
    object-fit: contain;
    background-color: #1b1b1b;
}

@media (max-width: 767.98px) {
    .about-galeria-foto {
        height: 170px;
    }
}

.about-galeria-foto-grande {
    height: 520px;
}

@media (max-width: 767.98px) {
    .about-galeria-foto-grande {
        height: 280px;
    }
}

.about-seccion-flanqueada {
    display: flex;
    align-items: stretch;
}

.about-foto-borde-col {
    flex: 1 1 0;
    min-width: 0;
}

.about-foto-borde {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bienvenida-telefono {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--atlas-verde-oscuro);
    margin-top: 1.5rem;
}

.bienvenida-telefono a {
    color: var(--atlas-tierra);
    text-decoration: none;
}

.bienvenida-telefono a:hover {
    text-decoration: underline;
}

/* Tarjetas de terrenos */
.card-terreno {
    border: none;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(43, 38, 32, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}

.card-terreno:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(43, 38, 32, 0.15);
}

.card-terreno .card-img-top {
    height: 200px;
    object-fit: cover;
    background-color: var(--atlas-tierra-claro);
}

.badge-estado-disponible {
    background-color: var(--atlas-verde);
}

.badge-estado-alquilado {
    background-color: var(--atlas-tierra);
}

.badge-destacado {
    background-color: #c99a3c;
}

.precio-terreno {
    color: var(--atlas-verde-oscuro);
    font-weight: 700;
}

/* Seccion sobre nosotros */
.seccion-sobre-nosotros {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    background-color: var(--atlas-arena);
    padding: 3rem 1rem 3.25rem !important;
    border-top: 1px solid rgba(47, 62, 46, 0.08);
}

/* Mapa en contacto: seccion propia, en una sola fila, justo encima del footer */
.mapa-contacto {
    border: 3px solid var(--atlas-tierra);
}

.mapa-contacto iframe {
    display: block;
    min-height: 320px;
}

.contacto-mapa-seccion {
    padding: 2.5rem 0;
    border-top: 1px solid rgba(47, 62, 46, 0.08);
}

.contacto-mapa-titulo {
    font-family: var(--fuente-titulos);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.contacto-titulo {
    font-family: var(--fuente-titulos);
    font-weight: 700;
    color: var(--atlas-tierra);
}

.barra-contacto {
    background-color: var(--atlas-navbar);
    padding: 0 0 0.45rem;
    font-size: 1rem;
}

@media (min-width: 768px) {
    .barra-contacto .navbar-contenido {
        padding-right: calc(clamp(1.25rem, 4vw, 5rem) + 250px);
    }
}

.barra-divisor {
    width: 260px;
    max-width: 60%;
    margin: 0 0 0.15rem auto;
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.15);
}

@media (max-width: 767.98px) {
    body,
    .contenido-principal {
        display: block;
    }

    .barra-divisor {
        margin: 0 auto 0.15rem;
    }
}

.barra-contacto a {
    color: var(--atlas-navbar-texto);
    text-decoration: none;
    opacity: 0.85;
}

.barra-contacto a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Footer */
.footer-atlas {
    background-color: var(--atlas-navbar);
    color: var(--atlas-navbar-texto);
    margin-top: 0 !important;
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}

.footer-atlas a {
    color: var(--atlas-navbar-texto);
    text-decoration: none;
    opacity: 0.85;
}

.footer-atlas a:hover {
    opacity: 1;
    text-decoration: underline;
}

.footer-redes {
    display: flex;
    gap: 0.75rem;
}

.footer-redes a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.12);
    font-size: 1.05rem;
    transition: background-color 0.2s ease;
}

.footer-redes a:hover {
    background-color: var(--atlas-tierra);
}

/* Galeria de imagenes en ficha de terreno */
.galeria-principal img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    border-radius: 0.5rem;
}

.galeria-miniaturas img {
    height: 90px;
    width: 100%;
    object-fit: cover;
    border-radius: 0.4rem;
    cursor: pointer;
    opacity: 0.7;
}

.galeria-miniaturas img:hover,
.galeria-miniaturas img.activa {
    opacity: 1;
    outline: 2px solid var(--atlas-verde);
}

/* Flechas del lightbox */
.lightbox-flecha {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    opacity: 0.75;
}

.lightbox-flecha:hover {
    opacity: 1;
}

.lightbox-flecha-izq {
    left: 0.75rem;
}

.lightbox-flecha-der {
    right: 0.75rem;
}

/* Selector de tema de color (Configuracion > Tema del sitio) */
.tema-swatch-label {
    cursor: pointer;
}

.tema-swatch-input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.tema-swatch {
    display: block;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 3px solid transparent;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.tema-swatch-input:checked + .tema-swatch {
    border-color: var(--atlas-verde);
    transform: scale(1.08);
}

.tema-swatch-input:focus-visible + .tema-swatch {
    outline: 2px solid var(--atlas-verde);
    outline-offset: 2px;
}

/* Selector de fuentes (Configuracion > Fuentes del sitio) */
.fuente-swatch-label {
    cursor: pointer;
}

.fuente-swatch-input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.fuente-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 140px;
    padding: 1rem 0.5rem;
    border: 2px solid #dee2e6;
    border-radius: 0.5rem;
    background-color: #fff;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.fuente-swatch-titulo {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--atlas-verde-oscuro);
    line-height: 1.2;
}

.fuente-swatch-texto {
    font-size: 0.8rem;
    color: var(--atlas-texto);
    margin-top: 0.15rem;
}

.fuente-swatch-nombre {
    font-size: 0.75rem;
    font-weight: 700;
    color: #6c757d;
    margin-top: 0.5rem;
}

.fuente-swatch-input:checked + .fuente-swatch {
    border-color: var(--atlas-verde);
    transform: scale(1.04);
}

.fuente-swatch-input:focus-visible + .fuente-swatch {
    outline: 2px solid var(--atlas-verde);
    outline-offset: 2px;
}

/* Panel admin: usa el mismo color de navbar/footer del tema activo, para que
   cambie junto con el resto del sitio si se cambia el tema de color. */
.admin-sidebar {
    background-color: var(--atlas-navbar);
    color: var(--atlas-navbar-texto);
}

.admin-sidebar a {
    color: var(--atlas-navbar-texto);
    opacity: 0.75;
}

.admin-sidebar a.active,
.admin-sidebar a:hover {
    opacity: 1;
    color: var(--atlas-navbar-texto);
    background-color: rgba(127, 127, 127, 0.15);
}

/* En el sidebar (columna angosta de 240px) el logo/nombre agrandado del
   navbar publico no cabe -- aqui lo dejamos en un tamano compacto. */
.admin-sidebar h5 {
    font-size: 1rem;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.admin-sidebar .marca-logo {
    height: 28px;
    max-width: 60px;
    margin-right: 0.5rem !important;
}

@media (min-width: 992px) {
    .navbar .navbar-nav {
        margin-right: clamp(3rem, 5vw, 6.5rem);
    }

    .admin-sidebar {
        width: 240px;
        flex-shrink: 0;
        height: 100vh;
        position: sticky;
        top: 0;
        overflow-y: auto;
    }
}

/* El acordeon de "Diseno por seccion" usa azul por defecto de Bootstrap al
   expandirse/enfocarse -- lo cambiamos por el acento del sitio para que
   combine con el resto del panel. */
.accordion-button:not(.collapsed) {
    color: var(--atlas-verde-oscuro);
    background-color: rgba(var(--bs-primary-rgb), 0.08);
}

.accordion-button:focus {
    border-color: var(--atlas-verde);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

/* Panel admin: en pantallas chicas el menu se oculta detras de un boton de
   hamburguesa (igual que el sitio publico) en vez de amontonarse en fila. */
@media (max-width: 991.98px) {
    .admin-sidebar .navbar-toggler {
        border-color: var(--atlas-navbar-texto);
    }
}

@media (max-width: 767.98px) {
    .navbar-brand {
        font-size: 1.6rem;
    }

    .marca-logo {
        height: 50px;
    }

    .navbar-brand .marca-logo {
        width: 50px;
    }

    .hero-atlas {
        min-height: 360px;
        flex: none;
    }

    .seccion-sobre-nosotros {
        padding: 2.75rem 1.25rem 3.25rem !important;
    }

    .bienvenida-titulo {
        font-size: 1.8rem;
        overflow-wrap: anywhere;
    }

    .bienvenida-destacado {
        font-size: 1.12rem;
    }

    .bienvenida-texto {
        font-size: 1rem;
    }

    .hero-boton-overlay {
        padding-bottom: 2rem;
    }

    .hero-boton-overlay .btn-lg {
        width: 80%;
    }

    .galeria-principal img {
        height: 260px;
    }

    /* Footer: centrado y compacto en movil */
    .footer-atlas .row {
        --bs-gutter-y: 0.25rem;
    }

    .footer-atlas .row > div {
        text-align: center;
        margin-bottom: 0.75rem;
    }

    .footer-atlas .row > div:last-child {
        margin-bottom: 0;
    }

    .footer-atlas .footer-redes {
        justify-content: center;
    }

    .footer-atlas ul.list-unstyled {
        padding-left: 0;
        margin-bottom: 0;
    }

    .footer-atlas h5,
    .footer-atlas h6 {
        margin-bottom: 0.4rem;
    }

    .footer-atlas p.small {
        margin-bottom: 0.5rem;
    }
}

/* =========================================================
   Animaciones (paquete 1-6): quitar este bloque completo revierte
   todo sin afectar el resto del sitio.
   ========================================================= */

/* 4. Fade de entrada al cargar cualquier pagina */
.contenido-principal {
    animation: fadeInPagina 0.6s ease;
}

@keyframes fadeInPagina {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 2. Aparecer al hacer scroll */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-on-scroll.reveal-visible {
    opacity: 1;
    transform: none;
}

/* 3. Zoom suave al pasar el mouse (fotos de terrenos, ademas de la galeria de About) */
.card-terreno .card-img-top {
    transition: transform 0.4s ease;
}

.card-terreno:hover .card-img-top {
    transform: scale(1.05);
}

/* 6. Boton "Ver detalle" de terrenos: mismo hover (sombra + flecha) que el
   boton principal, y color editable desde el panel (Configuracion). */
.card-terreno .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: var(--terrenos-boton-color, #4f7655);
    border-color: var(--terrenos-boton-color, #4f7655);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.card-terreno .btn-primary::after {
    content: '\2192';
    font-size: 1.1em;
    line-height: 1;
    transition: transform 0.2s ease;
}

.card-terreno .btn-primary:hover,
.card-terreno .btn-primary:focus-visible {
    background-color: var(--terrenos-boton-color-hover, #3f6046);
    border-color: var(--terrenos-boton-color-hover, #3f6046);
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(43, 38, 32, 0.2);
}

.card-terreno .btn-primary:hover::after {
    transform: translateX(4px);
}

/* 1. Aparecer en cascada: cada elemento de estas listas se retrasa un poco
   mas que el anterior, para que no aparezcan todos de golpe. */
.about-lista-iconos .col.reveal-on-scroll:nth-child(1) { transition-delay: 0s; }
.about-lista-iconos .col.reveal-on-scroll:nth-child(2) { transition-delay: 0.12s; }
.about-lista-iconos .col.reveal-on-scroll:nth-child(3) { transition-delay: 0.24s; }
.about-lista-iconos .col.reveal-on-scroll:nth-child(4) { transition-delay: 0.36s; }
.about-lista-iconos .col.reveal-on-scroll:nth-child(5) { transition-delay: 0.48s; }

.bienvenida-texto .reveal-on-scroll:nth-child(1) { transition-delay: 0s; }
.bienvenida-texto .reveal-on-scroll:nth-child(2) { transition-delay: 0.12s; }
.bienvenida-texto .reveal-on-scroll:nth-child(3) { transition-delay: 0.24s; }
.bienvenida-texto .reveal-on-scroll:nth-child(4) { transition-delay: 0.36s; }
.bienvenida-texto .reveal-on-scroll:nth-child(5) { transition-delay: 0.48s; }

.about-galeria-panel .row .reveal-on-scroll {
    transition-duration: 1.1s;
}
.about-galeria-panel .row .reveal-on-scroll:nth-child(1) { transition-delay: 0s; }
.about-galeria-panel .row .reveal-on-scroll:nth-child(2) { transition-delay: 0.35s; }
.about-galeria-panel .row .reveal-on-scroll:nth-child(3) { transition-delay: 0.7s; }
.about-galeria-panel .row .reveal-on-scroll:nth-child(4) { transition-delay: 1.05s; }

/* 3. Brillo de marca al enfocar los campos de los formularios publicos */
.form-contacto .form-control:focus {
    border-color: var(--atlas-verde);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

@media (prefers-reduced-motion: reduce) {
    .contenido-principal {
        animation: none;
    }

    .reveal-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .hero-carrusel-img {
        animation: none;
    }
}
