/* ===== Variables y temas =====
   El sitio se dibuja con cuatro ternas RGB en lugar de colores fijos. Cada
   regla usa rgba(var(--algo-rgb), opacidad), así que cambiar el tema es
   cambiar esas ternas: no hace falta duplicar ninguna regla.
     --velo-rgb     bordes y fondos translúcidos superpuestos
     --fondo-rgb    barra de navegación y degradados de fondo
     --panel-rgb    tarjetas y paneles
     --cristal-rgb  efecto de vidrio esmerilado
*/
:root {
    /* Tema oscuro (el de siempre, y el que se usa por defecto) */
    --primary: #0f172a;
    --primary-light: #1e293b;
    --accent: #D4AF37;
    --accent-hover: #f1cd56;
    --text-main: #f8f9fa;
    --text-muted: #b0b0b0;
    --texto-fuerte: #ffffff;
    --bg-dark: #020617;

    --velo-rgb: 255, 255, 255;
    --fondo-rgb: 15, 10, 29;
    --panel-rgb: 15, 23, 42;
    --cristal-rgb: 39, 24, 78;

    --bg-card: rgba(var(--panel-rgb), 0.4);
    --sombra-tarjeta: rgba(0, 0, 0, 0.3);
    /* Campos de formulario y botones circulares sobre la tarjeta */
    --campo-bg: rgba(0, 0, 0, 0.3);
    --boton-circular-bg: rgba(0, 0, 0, 0.5);
    /* Ventana de confirmación del formulario */
    --confirm-bg-a: #1b1430;
    --confirm-bg-b: #120d22;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-slow: all 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Tema claro: se invierten las ternas y se oscurecen los textos.
   El dorado se mantiene, pero un poco más profundo para que contraste
   sobre fondo claro; el mismo tono de antes resultaba ilegible. */
:root[data-tema="claro"] {
    --primary: #e2e8f0;
    --primary-light: #f1f5f9;
    --accent: #A8842A;
    --accent-hover: #8d6d1f;
    --text-main: #1e293b;
    --text-muted: #5b6878;
    --texto-fuerte: #0f172a;
    --bg-dark: #f6f7f9;

    --velo-rgb: 15, 23, 42;
    --fondo-rgb: 255, 255, 255;
    --panel-rgb: 255, 255, 255;
    --cristal-rgb: 226, 232, 240;

    --bg-card: rgba(var(--panel-rgb), 0.85);
    --sombra-tarjeta: rgba(15, 23, 42, 0.12);
    --campo-bg: rgba(15, 23, 42, 0.04);
    --boton-circular-bg: rgba(15, 23, 42, 0.08);
    --confirm-bg-a: #ffffff;
    --confirm-bg-b: #eef1f6;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Utilities */
.text-gold { color: var(--accent); }
.section-padding { padding: 100px 0; }
.container { width: 90%; max-width: 1200px; margin: 0 auto; }
.container-fluid { width: 95%; margin: 0 auto; overflow: hidden; }
.text-center { text-align: center; }

.section-tag {
    display: inline-block;
    color: var(--accent);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 15px;
    position: relative;
    padding-left: 50px;
}
.section-tag::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 35px;
    height: 1px;
    background-color: var(--accent);
}

.section-title {
    font-size: 3rem;
    margin-bottom: 40px;
    color: var(--texto-fuerte);
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--bg-dark);
}
.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--texto-fuerte);
    border: 1px solid white;
}
.btn-secondary:hover {
    background-color: var(--texto-fuerte);
    color: var(--bg-dark);
}

.btn-outline {
    background-color: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}
.btn-outline:hover {
    background-color: var(--accent);
    color: var(--bg-dark);
}

/* Glassmorphism */
.glass-card {
    background: rgba(var(--cristal-rgb), 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(var(--velo-rgb), 0.05);
    border-radius: 12px;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease;
}
.loader-content {
    text-align: center;
}
.logo-text {
    font-family: var(--font-heading);
    font-size: 3rem;
    letter-spacing: 10px;
    color: var(--accent);
    margin-bottom: 20px;
}
.preloader-logo {
    display: block;
    width: 88px;
    height: auto;
    margin: 0 auto 18px;
    animation: preloaderPulse 1.8s ease-in-out infinite;
}
.preloader-brand {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 7px;
    text-indent: 7px; /* compensa el espaciado sobrante de la última letra */
    color: var(--texto-fuerte);
    margin-bottom: 22px;
    white-space: nowrap;
}
@keyframes preloaderPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.72; transform: scale(0.95); }
}
.line-loader {
    width: 0;
    height: 2px;
    margin: 0 auto; /* la línea crece centrada bajo el icono */
    background-color: var(--accent);
    animation: loadingLine 2s ease-in-out forwards;
}
@media (prefers-reduced-motion: reduce) {
    .preloader-logo { animation: none; }
}
@keyframes loadingLine {
    0% { width: 0; }
    50% { width: 100px; }
    100% { width: 200px; }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 1000;
    transition: var(--transition);
}
.navbar.scrolled {
    background: rgba(var(--fondo-rgb), 0.9);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    border-bottom: 1px solid rgba(var(--velo-rgb), 0.05);
}
.nav-container {
    width: 90%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.brand-logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--texto-fuerte);
}
.brand-logo span {
    color: var(--accent);
}
.navbar-logo {
    transition: all 0.3s ease;
}
.navbar:not(.scrolled) .navbar-logo {
    filter: brightness(0) invert(1);
}
.nav-links {
    display: flex;
    gap: 40px;
}
.nav-links a {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    position: relative;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent);
    transition: var(--transition);
}
.nav-links a:hover::after {
    width: 100%;
}
.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}
.hamburger {
    display: none;
    cursor: pointer;
}
.hamburger .bar {
    width: 25px;
    height: 2px;
    background-color: var(--texto-fuerte);
    margin: 5px 0;
    transition: var(--transition);
}

/* Hero */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}
.hero-bg picture {
    display: block;
    width: 100%;
    height: 100%;
}
.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.01);
    animation: pulseBg 20s infinite alternate;
}
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, var(--bg-dark) 0%, rgba(var(--cristal-rgb), 0.4) 100%);
}
@keyframes pulseBg {
    0% { transform: scale(1.01); }
    100% { transform: scale(1.06); }
}
.hero-content {
    text-align: center;
    max-width: 800px;
    padding: 0 20px;
    z-index: 1;
    transform: translateY(30px);
    opacity: 0;
    animation: fadeInUp 1s ease 1s forwards;
}
.hero-title {
    font-size: 5rem;
    line-height: 1.1;
    margin-bottom: 20px;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.hero-brand-name {
    font-size: 5.8rem;
    display: block;
    margin-top: 10px;
    letter-spacing: 1px;
}
.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Removed Scroll Indicator */

/* Animations */
@keyframes fadeInUp {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
.about-text {
    padding: 50px;
}
.about-text > p {
    color: var(--text-muted);
    margin-bottom: 40px;
    font-size: 1.1rem;
}
.mission-vision-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}
.mv-tab {
    padding: 10px 24px;
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--text-main);
    border-radius: 30px;
    cursor: pointer;
    font-family: var(--font-heading);
    transition: var(--transition);
    font-size: 0.95rem;
}
.mv-tab.active {
    background: var(--accent);
    color: var(--bg-dark);
}
.mv-tab:hover:not(.active) {
    background: rgba(212, 175, 55, 0.1);
}
.mv-content {
    display: none;
    animation: fadeIn 0.5s ease;
}
.mv-content.active {
    display: block;
}
.mv-item {
    display: flex;
    gap: 20px;
}
.mv-icon {
    width: 50px;
    height: 50px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--accent);
    font-size: 1.2rem;
    flex-shrink: 0;
}
.mv-item h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-family: var(--font-body);
}
.mv-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.about-image-wrapper {
    position: relative;
    height: 600px;
}
.about-image {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
}
.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 10s ease;
}
.about-image-wrapper:hover .about-image img {
    transform: scale(1.1);
}
.experience-badge {
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 180px;
    height: 180px;
    perspective: 1000px;
    z-index: 10;
}
.badge-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 1s;
}
.badge-front, .badge-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    background: var(--primary);
    padding: 30px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border: 5px solid var(--bg-dark);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}
.badge-back {
    transform: rotateY(180deg);
}
.badge-front .number, .badge-back .number {
    font-size: 3rem;
    font-family: var(--font-heading);
    color: var(--accent);
    line-height: 1;
}
.badge-front .text, .badge-back .text {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
    color: var(--text-main);
}

/* Properties Carousel */
.properties-section {
    background: linear-gradient(180deg, var(--bg-dark) 0%, var(--primary-light) 50%, var(--bg-dark) 100%);
    position: relative;
}
.properties-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 20px;
    padding: 0 2%;
}
.carousel-controls {
    display: flex;
    gap: 15px;
}
.carousel-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid rgba(var(--velo-rgb), 0.2);
    color: var(--texto-fuerte);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
}
.carousel-btn:hover {
    background: var(--accent);
    color: var(--bg-dark);
    border-color: var(--accent);
}
.carousel-instruction {
    text-align: right;
    padding: 0 2%;
    color: var(--accent);
    font-size: 0.8rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.carousel-container {
    width: 100%;
    overflow-x: auto;
    /* Hide scrollbar */
    -ms-overflow-style: none;
    scrollbar-width: none;
    cursor: grab;
    padding-bottom: 40px;
}
.carousel-container::-webkit-scrollbar {
    display: none;
}
.carousel-container:active {
    cursor: grabbing;
}
.properties-track {
    display: flex;
    gap: 30px;
    padding: 0 2%;
    width: max-content;
}

/* Property Card */
.property-card {
    width: 400px;
    height: 550px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    transition: var(--transition);
    cursor: pointer;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    perspective: 1000px;
    transform-style: preserve-3d;
}
.property-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}
.property-image {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}
.property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}
.property-card:hover .property-image img {
    transform: scale(1.08);
}
.property-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 72%;
    /* El degradado se mantiene opaco más arriba para que el texto siga
       siendo legible sobre fotografías con mucho detalle o color claro */
    background: linear-gradient(to top,
        rgba(var(--fondo-rgb), 0.97) 0%,
        rgba(var(--fondo-rgb), 0.90) 45%,
        rgba(var(--fondo-rgb), 0.50) 75%,
        transparent 100%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
}
.property-overlay .property-location,
.property-overlay .property-title {
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
}
.property-status {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 3;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    backdrop-filter: blur(5px);
}
.status-nueva { background: rgba(46, 204, 113, 0.8); color: #ffffff; }
.status-oferta { background: rgba(212, 175, 55, 0.8); color: #0f172a; }
.status-vendida { background: rgba(231, 76, 60, 0.8); color: #ffffff; }

/* Sold State */
/* El desaturado se aplica solo a la fotografía. Si se aplicara a toda la
   tarjeta, el cintillo perdería su color porque los filtros CSS afectan
   también a los pseudo-elementos. */
.property-card.is-sold .property-image img {
    filter: grayscale(85%) brightness(0.75);
    transform: none;
}
.property-card.is-sold:hover {
    transform: none;
}
.property-card.is-sold:hover .property-image img {
    transform: none;
}

/* Cintillo diagonal de esquina a esquina para propiedades vendidas */
.property-card.is-sold::after {
    content: 'VENDIDA';
    position: absolute;
    top: 40%;
    left: 50%;
    width: 170%;
    padding: 13px 0;
    transform: translate(-50%, -50%) rotate(-27deg);
    background: linear-gradient(90deg,
        rgba(150, 32, 26, 0.95) 0%,
        rgba(203, 58, 46, 0.97) 50%,
        rgba(150, 32, 26, 0.95) 100%);
    /* El cintillo siempre va sobre rojo: su texto y bordes no siguen el tema */
    color: #ffffff;
    text-align: center;
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 9px;
    text-indent: 9px; /* compensa el espaciado de la última letra */
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    border-top: 2px solid rgba(255, 255, 255, 0.32);
    border-bottom: 2px solid rgba(255, 255, 255, 0.32);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 6;
    pointer-events: none;
}

/* Con el cintillo presente, la etiqueta pequeña sería redundante */
.property-card.is-sold .property-status { display: none; }

@media (max-width: 480px) {
    .property-card.is-sold::after {
        font-size: 1.05rem;
        letter-spacing: 6px;
        text-indent: 6px;
        padding: 10px 0;
    }
}

.property-location {
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.property-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--texto-fuerte);
    margin-bottom: 10px;
}
.property-price {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--texto-fuerte);
    margin-bottom: 15px;
}
.property-features {
    display: flex;
    gap: 15px;
    border-top: 1px solid rgba(var(--velo-rgb), 0.1);
    padding-top: 15px;
}
.feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.feature i {
    color: var(--accent);
}

.view-more-card {
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    border: 1px dashed rgba(var(--velo-rgb), 0.3);
}
.view-more-card:hover {
    border-color: var(--accent);
    background: rgba(212, 175, 55, 0.05);
}
.view-more-content {
    text-align: center;
    color: var(--accent);
    font-size: 1.2rem;
    font-weight: 500;
}
.view-more-content i {
    font-size: 2rem;
    margin-bottom: 15px;
    display: block;
}

/* Footer */
.advanced-footer {
    background: #0a0714;
    border-top: 1px solid rgba(var(--velo-rgb), 0.05);
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
}
.footer-brand p {
    color: var(--text-muted);
    margin: 20px 0;
    max-width: 400px;
}
.social-links {
    display: flex;
    gap: 15px;
}
.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(var(--velo-rgb), 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--texto-fuerte);
}
.social-links a:hover {
    background: var(--accent);
    color: var(--bg-dark);
    transform: translateY(-3px);
}
.footer-links h4, .footer-contact h4 {
    color: var(--texto-fuerte);
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 25px;
}
.footer-links ul li {
    margin-bottom: 12px;
}
.footer-links a {
    color: var(--text-muted);
}
.footer-links a:hover {
    color: var(--accent);
    padding-left: 5px;
}
.footer-contact ul li {
    color: var(--text-muted);
    margin-bottom: 15px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}
.footer-contact i {
    color: var(--accent);
    margin-top: 4px;
}
.footer-bottom {
    background: #05030a;
    padding: 20px 0;
    text-align: center;
    color: rgba(var(--velo-rgb), 0.4);
    font-size: 0.85rem;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(var(--fondo-rgb), 0.95);
    backdrop-filter: blur(20px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}
.modal-content {
    width: 90%;
    max-width: 1200px;
    height: 90vh;
    background: var(--bg-dark);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
}
.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}
.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--boton-circular-bg);
    border: 1px solid rgba(var(--velo-rgb), 0.2);
    color: var(--texto-fuerte);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
}
.close-modal:hover {
    background: var(--accent);
    color: var(--bg-dark);
}
.modal-body {
    display: flex;
    width: 100%;
    height: 100%;
}

/* Modal Content Injection Styles */
.modal-image {
    width: 50%;
    height: 100%;
    position: relative;
}
.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.modal-details {
    width: 50%;
    height: 100%;
    padding: 50px;
    overflow-y: auto;
}
.modal-details::-webkit-scrollbar {
    width: 6px;
}
.modal-details::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 3px;
}
.modal-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 5px;
}
.modal-location {
    color: var(--accent);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}
.modal-price {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: var(--texto-fuerte);
}
.modal-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}
.modal-feature {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(var(--velo-rgb), 0.05);
    padding: 15px;
    border-radius: 8px;
}
.modal-feature i {
    color: var(--accent);
    font-size: 1.2rem;
}
.modal-description {
    color: var(--text-muted);
    margin-bottom: 40px;
}

/* Contact Form inside Modal */
.contact-form-container {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}
.form-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 10px;
}
.form-subtitle {
    color: var(--accent);
    font-size: 0.9rem;
    margin-bottom: 20px;
}
.form-group {
    margin-bottom: 20px;
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 15px;
    background: var(--campo-bg);
    border: 1px solid rgba(var(--velo-rgb), 0.1);
    border-radius: 6px;
    color: var(--texto-fuerte);
    font-family: var(--font-body);
}
.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}
.form-btn {
    width: 100%;
    text-align: center;
}

/* Disabled Form State (Sold) */
.contact-form-container.disabled {
    opacity: 0.5;
    pointer-events: none;
    filter: grayscale(100%);
}
.sold-message {
    color: #e74c3c;
    font-weight: bold;
    margin-bottom: 15px;
    display: none;
}
.contact-form-container.disabled .sold-message {
    display: block;
}

/* Demo Admin Panel */
.admin-toggle-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-dark);
    color: var(--text-muted);
    border: 1px solid rgba(var(--velo-rgb), 0.2);
    z-index: 100;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}
.admin-toggle-btn:hover {
    background: white;
    color: black;
}
.admin-panel {
    position: fixed;
    bottom: 90px;
    left: 30px;
    width: 350px;
    background: rgba(var(--fondo-rgb), 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(var(--velo-rgb), 0.1);
    border-radius: 12px;
    padding: 20px;
    z-index: 100;
    transform: translateX(-400px);
    opacity: 0;
    transition: var(--transition);
}
.admin-panel.open {
    transform: translateX(0);
    opacity: 1;
}
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(var(--velo-rgb), 0.1);
    padding-bottom: 10px;
}
.admin-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}
#close-admin {
    background: none;
    border: none;
    color: var(--texto-fuerte);
    cursor: pointer;
}
.admin-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    background: rgba(var(--velo-rgb), 0.05);
    padding: 10px;
    border-radius: 6px;
}
.admin-item-title {
    font-size: 0.85rem;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.admin-item select {
    background: var(--bg-dark);
    color: var(--texto-fuerte);
    border: 1px solid var(--accent);
    padding: 5px;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* WhatsApp Chatbot */
.whatsapp-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}
.whatsapp-btn {
    width: 60px;
    height: 60px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    cursor: pointer;
    font-size: 2.2rem;
    color: var(--texto-fuerte);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
    transition: var(--transition);
}
.whatsapp-btn i {
    color: var(--primary);
}
.whatsapp-btn:hover {
    transform: scale(1.1);
}
.pulse::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: inherit;
    z-index: -1;
    animation: pulseAnim 2s infinite;
}
@keyframes pulseAnim {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.5); opacity: 0; }
}
.whatsapp-chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 320px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transform-origin: bottom right;
    transform: scale(0);
    opacity: 0;
    transition: var(--transition);
    z-index: 1;
}
.whatsapp-chat-window.open {
    transform: scale(1);
    opacity: 1;
}
.wa-header {
    background: var(--primary);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--texto-fuerte);
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}
.wa-avatar {
    position: relative;
    width: 40px;
    height: 40px;
}
.wa-avatar-img {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #a88a44, #504020);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--texto-fuerte);
}
.wa-status-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background: #25D366;
    border: 2px solid var(--primary);
    border-radius: 50%;
}
.wa-info h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin: 0;
    font-weight: 600;
}
.wa-info p {
    font-size: 0.8rem;
    margin: 0;
    color: var(--text-muted);
}
.wa-close {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--texto-fuerte);
    cursor: pointer;
    font-size: 1.2rem;
}
.wa-body {
    height: 260px;
    background: #e5ddd5;
    background-image: url('data:image/svg+xml,%3Csvg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="%23d0c9c3" fill-opacity="0.4" fill-rule="evenodd"%3E%3Ccircle cx="3" cy="3" r="3"/%3E%3Ccircle cx="13" cy="13" r="3"/%3E%3C/g%3E%3C/svg%3E');
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.wa-date-badge {
    align-self: center;
    background: rgba(225, 245, 254, 0.9);
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 0.7rem;
    color: #555;
    font-weight: 600;
    margin-bottom: 5px;
}
.wa-message {
    max-width: 90%;
    padding: 12px 15px;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.4;
    position: relative;
    color: #333;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.wa-message p { margin: 0; }
.bot-message {
    background: white;
    align-self: flex-start;
    border-top-left-radius: 0;
}
.wa-time {
    display: block;
    font-size: 0.7rem;
    color: #999;
    text-align: right;
    margin-top: 5px;
}
.typing {
    display: none;
    width: 60px;
    gap: 5px;
    justify-content: center;
    align-items: center;
    height: 40px;
}
.typing.active {
    display: flex;
}
.dot {
    width: 8px;
    height: 8px;
    background: #ccc;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out;
}
.dot:nth-child(1) { animation-delay: -0.32s; }
.dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}
.wa-footer {
    padding: 10px;
    background: #f0f0f0;
}
.wa-action-card {
    background: white;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.wa-action-card h4 {
    margin: 0 0 5px 0;
    color: #111;
    font-size: 1.1rem;
}
.wa-action-card p {
    margin: 0 0 15px 0;
    font-size: 0.8rem;
    color: #666;
}
.wa-action-btn-new {
    width: 100%;
    padding: 12px;
    background: var(--accent);
    color: var(--bg-dark);
    border: none;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}
.wa-action-btn-new:hover {
    background: #b5952f;
    color: var(--bg-dark);
}

/* Contact Split Layout */
.contact-grid-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: stretch;
    max-width: 1200px;
    margin: 0 auto;
}
.contact-header-left {
    margin-bottom: 40px;
}
.contact-header-left .section-title {
    margin-bottom: 20px;
}
.contact-description {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
}
.contact-info-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}
.info-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    text-decoration: none;
    transition: var(--transition);
}
.info-item:hover {
    transform: translateX(10px);
}
.info-item:hover .info-icon {
    background: var(--accent);
    color: var(--bg-dark);
}
.info-icon {
    width: 50px;
    height: 50px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--accent);
    font-size: 1.5rem;
    flex-shrink: 0;
    transition: var(--transition);
}
.info-text h4 {
    color: var(--texto-fuerte);
    margin: 0 0 5px 0;
    font-size: 1.1rem;
}
.info-text p {
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}
.contact-form-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* 3D Spin Element Wrapper */
.tilt-effect .badge-inner {
    animation: spin3D 8s linear infinite;
}

@keyframes spin3D {
    0% {
        transform: rotateY(0deg);
    }
    100% {
        transform: rotateY(360deg);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-title { font-size: 4rem; }
    .hero-brand-name { font-size: 4.5rem; }
    .about-grid { grid-template-columns: 1fr; }
    .modal-content { flex-direction: column; overflow-y: auto; }
    .modal-image { width: 100%; height: 40vh; }
    .modal-details { width: 100%; height: auto; }
}

@media (max-width: 768px) {
    .hero-title { font-size: 3rem; }
    .hero-brand-name { font-size: 3.2rem; }
    .footer-grid { grid-template-columns: 1fr; }
    .property-card { width: 300px; height: 450px; }
    .contact-grid-split { grid-template-columns: 1fr; gap: 40px; }
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(var(--fondo-rgb), 0.95);
        flex-direction: column;
        padding: 20px 0;
        text-align: center;
        gap: 20px;
        transform: translateY(-200%);
        transition: var(--transition);
        z-index: -1;
    }
    .nav-links.active {
        transform: translateY(0);
    }
    .hamburger { display: block; }
    .nav-actions .btn { display: none; }
}

/* Floating Social Share Widget */
.share-widget-floating {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1999;
    padding: 15px 10px;
    background: rgba(var(--fondo-rgb), 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(var(--velo-rgb), 0.05);
    border-radius: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}
.share-widget-floating a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(var(--velo-rgb), 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--texto-fuerte);
    font-size: 1.1rem;
    transition: var(--transition);
}
.share-widget-floating a:hover {
    transform: scale(1.1) rotate(360deg);
}
.share-widget-floating a.share-facebook:hover { background: #3b5998; color: #ffffff; }
.share-widget-floating a.share-instagram:hover { background: #e1306c; color: #ffffff; }
.share-widget-floating a.share-whatsapp:hover { background: #25d366; color: #ffffff; }


/* FAQ Premium Accordion Styles */
.faq-split-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 50px;
    margin-top: 50px;
    align-items: start;
}
.faq-item {
    transition: var(--transition);
    border: 1px solid rgba(var(--velo-rgb), 0.03) !important;
    background: rgba(var(--panel-rgb), 0.3) !important;
}
.faq-item:hover:not(.active) {
    border-color: rgba(212, 175, 55, 0.15) !important;
    background: rgba(var(--panel-rgb), 0.4) !important;
}
.faq-item.active {
    border-color: rgba(212, 175, 55, 0.3) !important;
    background: rgba(var(--panel-rgb), 0.6) !important;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.05) !important;
}
.faq-item.active .faq-icon {
    transform: rotate(180deg);
}
.faq-item.active .faq-trigger {
    background: rgba(212, 175, 55, 0.02);
}

/* Responsive FAQ */
@media (max-width: 1024px) {
    .faq-split-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .share-widget-floating {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        flex-direction: row;
        justify-content: center;
        margin: 30px auto 0;
        width: fit-content;
        box-shadow: none;
    }
}

/* Banderola de Demo */

/* ===== Ventana de confirmación de solicitud enviada ===== */
.confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(8, 5, 16, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.confirm-overlay.visible { opacity: 1; }

.confirm-card {
    position: relative;
    width: 100%;
    max-width: 430px;
    padding: 42px 34px 32px;
    border-radius: 18px;
    text-align: center;
    background: linear-gradient(160deg, var(--confirm-bg-a) 0%, var(--confirm-bg-b) 100%);
    border: 1px solid rgba(212, 175, 55, 0.28);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.6);
    transform: translateY(18px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.confirm-overlay.visible .confirm-card { transform: translateY(0) scale(1); }

.confirm-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(var(--velo-rgb), 0.06);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.95rem;
    transition: var(--transition);
}
.confirm-close:hover { background: rgba(var(--velo-rgb), 0.14); color: var(--texto-fuerte); }
.confirm-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.confirm-check { width: 76px; height: 76px; margin: 0 auto 20px; }
.confirm-check svg { width: 100%; height: 100%; }
.confirm-check-circle {
    fill: none;
    stroke: #25D366;
    stroke-width: 2.5;
    stroke-dasharray: 151;
    stroke-dashoffset: 151;
    animation: confirmCircle 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}
.confirm-check-mark {
    fill: none;
    stroke: #25D366;
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    animation: confirmMark 0.35s cubic-bezier(0.65, 0, 0.45, 1) 0.5s forwards;
}
@keyframes confirmCircle { to { stroke-dashoffset: 0; } }
@keyframes confirmMark  { to { stroke-dashoffset: 0; } }

.confirm-card h3 {
    margin: 0 0 10px;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--texto-fuerte);
    line-height: 1.25;
}
.confirm-card p {
    margin: 0 0 20px;
    color: var(--text-muted);
    font-size: 0.96rem;
    line-height: 1.6;
    font-weight: 300;
}
.confirm-card p strong { color: var(--accent); font-weight: 600; }

.confirm-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 11px 14px;
    margin-bottom: 24px;
    border-radius: 10px;
    background: rgba(var(--velo-rgb), 0.04);
    border: 1px solid rgba(var(--velo-rgb), 0.06);
    color: var(--text-muted);
    font-size: 0.83rem;
}
.confirm-hint i { color: var(--accent); }

.confirm-actions { display: flex; flex-direction: column; gap: 10px; }
.confirm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 13px 22px;
    border: none;
    border-radius: 30px;
    font-family: var(--font-body);
    font-size: 0.93rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}
.confirm-btn-wa { background: #25D366; color: #ffffff; }
.confirm-btn-wa:hover { background: #1eb855; transform: translateY(-2px); }
.confirm-btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid rgba(var(--velo-rgb), 0.12);
}
.confirm-btn-ghost:hover { color: var(--texto-fuerte); border-color: rgba(var(--velo-rgb), 0.28); }
.confirm-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 480px) {
    .confirm-card { padding: 36px 22px 26px; }
    .confirm-card h3 { font-size: 1.3rem; }
}
@media (prefers-reduced-motion: reduce) {
    .confirm-overlay, .confirm-card { transition: none; }
    .confirm-check-circle, .confirm-check-mark { animation: none; stroke-dashoffset: 0; }
}

/* ===== Aviso cuando el catálogo no se puede cargar ===== */
.catalogo-caido {
    width: 100%;
    max-width: 620px;
    margin: 0 auto;
    padding: 50px 30px;
    text-align: center;
    border-radius: 14px;
    background: rgba(var(--velo-rgb), 0.03);
    border: 1px solid rgba(var(--velo-rgb), 0.08);
}
.catalogo-caido i {
    font-size: 2.6rem;
    color: var(--accent);
    margin-bottom: 18px;
    display: block;
}
.catalogo-caido h3 {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    color: var(--texto-fuerte);
    margin-bottom: 12px;
}
.catalogo-caido p {
    color: var(--text-muted);
    font-size: 0.98rem;
    line-height: 1.65;
    font-weight: 300;
    max-width: 46ch;
    margin: 0 auto 26px;
}
.catalogo-caido-acciones {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}
.catalogo-caido-acciones .btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}
@media (max-width: 520px) {
    .catalogo-caido { padding: 38px 20px; }
    .catalogo-caido-acciones { flex-direction: column; }
}

/* ===== Bloques de detalle dentro del modal de propiedad ===== */
.modal-bloque {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(var(--velo-rgb), 0.07);
}
.modal-bloque h4 {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 12px;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--texto-fuerte);
}
.modal-bloque h4 i { color: var(--accent); font-size: 0.9rem; }
.modal-bloque p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.6;
    font-weight: 300;
}

.modal-amenidades {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}
.amenidad {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 13px;
    border-radius: 30px;
    background: rgba(212, 175, 55, 0.09);
    border: 1px solid rgba(212, 175, 55, 0.22);
    color: var(--text-main);
    font-size: 0.85rem;
    white-space: nowrap;
}
.amenidad i { color: var(--accent); font-size: 0.82rem; }

.modal-mapa-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 20px;
    padding: 15px 18px;
    border-radius: 10px;
    background: rgba(var(--velo-rgb), 0.04);
    border: 1px solid rgba(var(--velo-rgb), 0.1);
    color: var(--texto-fuerte);
    transition: var(--transition);
}
.modal-mapa-btn:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.4);
    transform: translateY(-2px);
}
.modal-mapa-btn > i:first-child { color: var(--accent); font-size: 1.4rem; flex: none; }
.modal-mapa-btn > i:last-child { color: var(--text-muted); font-size: 0.78rem; margin-left: auto; flex: none; }
.modal-mapa-btn span { display: flex; flex-direction: column; gap: 2px; line-height: 1.3; }
.modal-mapa-btn strong { font-size: 0.94rem; font-weight: 600; }
.modal-mapa-btn small { color: var(--text-muted); font-size: 0.78rem; }
.modal-mapa-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.modal-referencia {
    margin-top: 20px;
    padding: 12px 15px;
    border-radius: 8px;
    background: rgba(var(--velo-rgb), 0.03);
    color: var(--text-muted);
    font-size: 0.84rem;
}
.modal-referencia strong { color: var(--accent); font-family: var(--font-heading); }
.modal-referencia span { display: block; margin-top: 3px; font-size: 0.78rem; opacity: 0.75; }

@media (max-width: 520px) {
    .modal-amenidades { gap: 7px; }
    .amenidad { font-size: 0.8rem; padding: 6px 11px; }
}

/* ===== Ajustes propios del tema claro ===== */
/* El logo es blanco sobre transparente: sobre fondo claro desaparece,
   así que se invierte para que se vea oscuro. */
:root[data-tema="claro"] .navbar-logo,
:root[data-tema="claro"] .footer-logo,
:root[data-tema="claro"] .preloader-logo {
    filter: brightness(0) saturate(100%) invert(9%) sepia(19%) saturate(2000%) hue-rotate(190deg);
}
/* La regla original fuerza el logo a blanco cuando la barra está arriba */
:root[data-tema="claro"] .navbar:not(.scrolled) .navbar-logo {
    filter: brightness(0) saturate(100%) invert(9%) sepia(19%) saturate(2000%) hue-rotate(190deg);
}
/* El pie inferior lleva un tono más oscuro que el resto del pie */
:root[data-tema="claro"] .footer-bottom {
    background: #e8ebf0;
    /* Con 0.4 de opacidad el texto queda demasiado tenue sobre fondo claro */
    color: rgba(var(--velo-rgb), 0.62);
}
:root[data-tema="claro"] .preloader,
:root[data-tema="claro"] .advanced-footer {
    background-color: var(--bg-dark);
}
:root[data-tema="claro"] .preloader-brand {
    color: var(--texto-fuerte);
}
/* Sobre fondo claro, las sombras negras fuertes ensucian */
:root[data-tema="claro"] .property-card,
:root[data-tema="claro"] .modal-content,
:root[data-tema="claro"] .confirm-card {
    box-shadow: 0 10px 30px var(--sombra-tarjeta);
}
:root[data-tema="claro"] .btn-secondary {
    border-color: var(--texto-fuerte);
}

/* ===== Botón para cambiar de tema ===== */
.btn-tema {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--accent);
    border-radius: 50%;
    background: transparent;
    color: var(--accent);
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    flex: none;
}
.btn-tema:hover {
    background: var(--accent);
    color: var(--bg-dark);
    transform: rotate(-15deg);
}
.btn-tema:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
    .btn-tema:hover { transform: none; }
}

/* En tema claro el texto ya es oscuro: una sombra negra detrás lo ensucia.
   Se cambia por un halo blanco, que cumple la misma función (separar el
   texto de la fotografía) sin emborronarlo. */
:root[data-tema="claro"] .hero-title {
    text-shadow: 0 6px 24px rgba(255, 255, 255, 0.75);
}
:root[data-tema="claro"] .property-overlay .property-location,
:root[data-tema="claro"] .property-overlay .property-title {
    text-shadow: 0 1px 6px rgba(255, 255, 255, 0.85);
}

/* Botón "Compartir" dentro de la ficha. Antes llevaba los colores escritos
   en el HTML, lo que lo dejaba en blanco sobre el fondo claro. */
.modal-share-btn {
    padding: 8px 12px;
    font-size: 0.8rem;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    background: transparent;
    border: 1px solid rgba(var(--velo-rgb), 0.25);
    color: var(--texto-fuerte);
    transition: var(--transition);
    flex: none;
}
.modal-share-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ===== Propiedades premium ===== */
.property-card.is-premium {
    border: 1px solid rgba(212, 175, 55, 0.55);
    box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.18), 0 18px 40px rgba(212, 175, 55, 0.14);
}
.property-card.is-premium:hover {
    box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.5), 0 24px 50px rgba(212, 175, 55, 0.24);
}
/* El distintivo va sobre la fotografía: sus colores no siguen el tema */
.premium-badge {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 30px;
    background: linear-gradient(135deg, #f1cd56 0%, #D4AF37 50%, #a8842a 100%);
    color: #1a1204;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

/* ===== Ventana de bienvenida premium ===== */
.bienvenida-overlay {
    position: fixed;
    inset: 0;
    z-index: 15000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(4, 6, 16, 0.84);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.35s ease;
}
.bienvenida-overlay.visible { opacity: 1; }
.bienvenida-card {
    position: relative;
    width: 100%;
    max-width: 760px;
    max-height: calc(100vh - 36px);
    overflow-y: auto;
    padding: 34px 34px 28px;
    border-radius: 20px;
    text-align: center;
    background: linear-gradient(160deg, var(--confirm-bg-a) 0%, var(--confirm-bg-b) 100%);
    border: 1px solid rgba(212, 175, 55, 0.45);
    box-shadow: 0 0 0 6px rgba(212, 175, 55, 0.07), 0 40px 90px rgba(0, 0, 0, 0.6);
    transform: translateY(24px) scale(0.96);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.bienvenida-overlay.visible .bienvenida-card { transform: translateY(0) scale(1); }
.bienvenida-cerrar {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: rgba(var(--velo-rgb), 0.08);
    color: var(--texto-fuerte);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}
.bienvenida-cerrar:hover { background: var(--accent); color: var(--bg-dark); }
.bienvenida-cerrar:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bienvenida-sello {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 30px;
    border: 1px solid rgba(212, 175, 55, 0.5);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
}
.bienvenida-encabezado h2 {
    margin: 0 0 6px;
    font-family: var(--font-heading);
    font-size: 2rem;
    line-height: 1.15;
    color: var(--texto-fuerte);
}
.bienvenida-encabezado h2 em { font-style: normal; color: var(--accent); }
.bienvenida-encabezado p { margin: 0 0 20px; color: var(--text-muted); font-size: 0.95rem; font-weight: 300; }

.bienvenida-slider { position: relative; overflow: hidden; border-radius: 14px; }
.bienvenida-pista { display: flex; transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.bienvenida-slide { flex: 0 0 100%; min-width: 0; cursor: pointer; text-align: left; }
.bienvenida-foto { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 14px; background: rgba(var(--velo-rgb), 0.06); }
.bienvenida-foto img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.2s ease; }
.bienvenida-slide:hover .bienvenida-foto img { transform: scale(1.04); }
.bienvenida-precio {
    position: absolute;
    left: 16px;
    bottom: 16px;
    padding: 9px 18px;
    border-radius: 30px;
    background: linear-gradient(135deg, #f1cd56 0%, #D4AF37 55%, #a8842a 100%);
    color: #1a1204;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4);
}
.bienvenida-info { padding: 16px 4px 0; }
.bienvenida-lugar { color: var(--accent); font-size: 0.75rem; letter-spacing: 1.5px; text-transform: uppercase; }
.bienvenida-info h3 { margin: 6px 0 10px; font-family: var(--font-heading); font-size: 1.35rem; color: var(--texto-fuerte); }
.bienvenida-info .property-features { border-top: none; padding-top: 0; margin-top: 0; }
.bienvenida-flecha {
    position: absolute;
    top: 38%;
    z-index: 2;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #ffffff;
    cursor: pointer;
    transition: var(--transition);
}
.bienvenida-flecha:hover { background: #D4AF37; color: #1a1204; }
.bienvenida-flecha.izq { left: 12px; }
.bienvenida-flecha.der { right: 12px; }
.bienvenida-puntos { display: flex; justify-content: center; gap: 8px; margin: 16px 0 20px; }
.bienvenida-puntos button {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: rgba(var(--velo-rgb), 0.25);
    cursor: pointer;
    transition: var(--transition);
}
.bienvenida-puntos button.activo { width: 26px; background: var(--accent); }
.bienvenida-acciones { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

@media (max-width: 600px) {
    .bienvenida-card { padding: 28px 18px 22px; }
    .bienvenida-encabezado h2 { font-size: 1.5rem; }
    .bienvenida-foto { aspect-ratio: 4 / 3; }
    .bienvenida-flecha { display: none; } /* en el teléfono se desliza con el dedo */
    .bienvenida-acciones .btn { width: 100%; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
    .bienvenida-pista, .bienvenida-card, .bienvenida-foto img { transition: none; }
}

/* ===== Ficha de propiedad en teléfono ===== */
/* En pantallas angostas las dos columnas (foto | detalles) se apilan:
   foto arriba con altura fija y los detalles debajo, desplazables. */
@media (max-width: 768px) {
    .modal-content {
        width: 100%;
        height: 100%;
        max-height: 100dvh;
        border-radius: 0;
        border: none;
    }
    .modal-body { flex-direction: column; overflow-y: auto; }
    .modal-image { width: 100%; height: 42vh; min-height: 240px; flex: none; }
    .modal-details { width: 100%; height: auto; padding: 22px 18px 32px; overflow: visible; }
    .modal-title { font-size: 1.35rem !important; }
    .close-modal { top: 12px; right: 12px; background: rgba(0, 0, 0, 0.6); color: #ffffff; }
    .modal-gallery-controls img { width: 46px !important; height: 46px !important; }
}
@media (max-width: 600px) {
    /* Deja libre la esquina del botón de cerrar */
    .bienvenida-encabezado { padding: 22px 30px 0; }
}

/* ===== Estado "enviando" de los formularios ===== */
form.enviando input, form.enviando textarea { opacity: 0.6; }
form.enviando button[type="submit"] {
    cursor: progress;
    opacity: 0.9;
    transform: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.envio-rueda {
    width: 16px;
    height: 16px;
    flex: none;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.25);
    border-top-color: currentColor;
    animation: envio-girar 0.8s linear infinite;
}
.envio-barra {
    height: 4px;
    margin-top: 10px;
    border-radius: 4px;
    overflow: hidden;
    background: rgba(var(--velo-rgb), 0.12);
}
.envio-barra span {
    display: block;
    width: 40%;
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    animation: envio-avanzar 1.2s ease-in-out infinite;
}
@keyframes envio-girar { to { transform: rotate(360deg); } }
@keyframes envio-avanzar {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(250%); }
}
@media (prefers-reduced-motion: reduce) {
    .envio-rueda { animation: none; border-top-color: transparent; }
    .envio-barra span { animation: none; width: 100%; }
}
