/* ==========================================================================
   SISTEMA DE ESTILOS UNIFICADO - fincasvenezuela.com
   ========================================================================== */

:root {
    --bg-page: rgb(178, 213, 148);       /* Verde claro degradado ligero */
    --footer-bg: rgb(184, 113, 255);     /* Lila claro corporativo */
    --primary-color: #1b5e20;            /* Verde bosque para contrastes */
    --text-main: #0c1c11;                /* Texto principal ultra-oscuro */
    --mega-text: #1a0933;                /* Texto mega menú de alta legibilidad */
    --lila-dark: #6a1b9a;                /* Lila oscuro para hover */
}

/* Reset de documento y fondo persistente para internas y home */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-page) !important;
    color: var(--text-main);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
}

/* ==========================================================================
   CABECERA COMPACTA Y ALINEADA (Evita desbordes y desalineaciones de fondo)
   ========================================================================== */
.main-header {
    width: 100%;
    background: #ffffff !important; /* Fondo blanco consistente y sólido */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 24px;
    background: transparent;
    min-height: 100px;
}

.logo-container {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-img {
    max-height: 150px !important;
    width: auto;
    transition: transform 0.3s ease;
    display: block;
}

.logo-img:hover {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 25px !important;
    list-style: none;
}

.nav-link {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    padding: 8px 12px;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--lila-dark);
}

/* Mega Menú y Desplegables Reforzados para Desktop */
.mega-dropdown {
    position: relative;
}

.mega-menu {
    position: absolute !important;
    top: 100%;
    left: -150px;
    width: 900px;
    background: #ffffff !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2) !important;
    border: 2px solid var(--footer-bg);
    border-radius: 8px;
    padding: 25px !important;
    display: none;
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 15px !important;
    z-index: 1200;
}

.mega-dropdown:hover .mega-menu {
    display: grid !important;
}

.mega-column h5 {
    font-size: 0.95rem !important;
    color: var(--lila-dark) !important;
    margin-bottom: 12px !important;
    border-bottom: 2px solid var(--bg-page);
    padding-bottom: 4px;
    font-weight: 800;
}

.mega-column ul {
    list-style: none;
}

.mega-column ul li {
    margin-bottom: 8px;
}

.mega-column ul li a {
    color: var(--mega-text) !important;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.mega-column ul li a:hover {
    color: var(--footer-bg) !important;
    text-decoration: underline;
}

/* Dropdown de Servicios estándar */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    list-style: none;
    padding: 12px;
    min-width: 200px;
    border-radius: 6px;
    border-top: 3px solid var(--footer-bg);
    z-index: 1100;
}

.dropdown-menu li {
    margin-bottom: 8px;
}

.dropdown-menu li a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
    display: block;
    transition: color 0.2s;
}

.dropdown-menu li a:hover {
    color: var(--lila-dark);
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.mobile-toggle {
    display: none;
}

/* ==========================================================================
   HERO VIDEO ENCUADRADO PERFECTO
   ========================================================================== */
.hero-section {
    position: relative;
    width: 100%;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Evita que el video se escape visualmente del cuadro */
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%); /* Centrado absoluto perfecto sin importar resolución */
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 1150px;
    padding: 60px 24px;
    text-align: center;
    color: #ffffff;
}

/* ==========================================================================
   PROTOTIPO DE SLIDER PARA FOTOS (Efecto desvaneciente de 1 segundo)
   ========================================================================== */
.slider-container {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.slider-container .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out !important; /* Desvanecimiento perfecto de 1 segundo */
    object-fit: cover;
    z-index: 1;
}

.slider-container .slide.active {
    opacity: 1;
    z-index: 2;
}

/* ==========================================================================
   PIE DE PÁGINA PREMIUM — logo grande arriba a la derecha, tipografía
   elegante y uniforme, texto de contacto en negro legible, fondo con
   estrellas titilando muy tenue detrás del contenido.
   ========================================================================== */
.site-footer-premium {
    position: relative;
    overflow: hidden;
    background-color: var(--footer-bg) !important;
    padding: 0 24px 70px !important;
    margin-top: 100px !important;
}

/* Capa de estrellas titilando: muy tenue, puramente decorativa y detrás del texto */
.footer-stars {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        radial-gradient(1.6px 1.6px at 8% 20%, rgba(12,28,17,0.55) 50%, transparent 51%),
        radial-gradient(1.4px 1.4px at 22% 65%, rgba(12,28,17,0.45) 50%, transparent 51%),
        radial-gradient(1.8px 1.8px at 38% 15%, rgba(12,28,17,0.5) 50%, transparent 51%),
        radial-gradient(1.3px 1.3px at 52% 78%, rgba(12,28,17,0.4) 50%, transparent 51%),
        radial-gradient(1.7px 1.7px at 67% 32%, rgba(12,28,17,0.5) 50%, transparent 51%),
        radial-gradient(1.4px 1.4px at 79% 60%, rgba(12,28,17,0.4) 50%, transparent 51%),
        radial-gradient(1.6px 1.6px at 91% 22%, rgba(12,28,17,0.5) 50%, transparent 51%),
        radial-gradient(1.3px 1.3px at 14% 88%, rgba(12,28,17,0.4) 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 60% 90%, rgba(12,28,17,0.45) 50%, transparent 51%),
        radial-gradient(1.4px 1.4px at 85% 82%, rgba(12,28,17,0.4) 50%, transparent 51%);
    background-repeat: no-repeat;
    animation: footerTwinkle 5s ease-in-out infinite alternate;
    opacity: 0.5;
}

@keyframes footerTwinkle {
    0%   { opacity: 0.18; }
    50%  { opacity: 0.5; }
    100% { opacity: 0.22; }
}

.footer-top {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 36px 0 10px;
}

.footer-logo-img {
    max-height: 160px !important;
    width: auto;
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.18));
    transition: transform 0.3s ease;
}

.footer-logo-img:hover {
    transform: scale(1.05);
}

.footer-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr !important;
    gap: 50px !important;
    max-width: 1200px;
    margin: 10px auto 0;
}

.footer-col h3 {
    font-family: Georgia, 'Times New Roman', serif !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em;
    color: #0c1c11 !important;
    margin-bottom: 22px !important;
    border-bottom: 2px solid rgba(12, 28, 17, 0.18);
    padding-bottom: 10px;
}

.footer-col p,
.footer-col ul li a,
.footer-bottom p {
    color: #0c1c11 !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.footer-col p {
    line-height: 1.85 !important;
    font-size: 1.08rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.01em;
    opacity: 0.92;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    text-decoration: none;
    font-weight: 700;
    font-size: 1.08rem !important;
    letter-spacing: 0.01em;
    transition: color 0.2s, opacity 0.2s;
    opacity: 0.92;
}

.footer-col ul li a:hover {
    color: #ffffff !important;
    opacity: 1;
}

.footer-bottom {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 50px auto 0 auto !important;
    padding-top: 28px;
    border-top: 1px solid rgba(12, 28, 17, 0.2);
    text-align: center;
}

.footer-bottom p {
    font-size: 1rem !important;
    font-weight: 600;
    letter-spacing: 0.01em;
    opacity: 0.85;
}


/* ==========================================================================
   RESPONSIVIDAD COMPUTADORA / MÓVIL OPTIMIZADA
   ========================================================================== */
main {
    max-width: 1200px;
    margin: 80px auto !important;
    padding: 0 24px;
}

.properties-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr) !important; /* Tres columnas perfectas en desktop sin amontonamientos */
    gap: 35px !important;
}

.property-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 20px !important;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.property-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.property-specs {
    margin: 20px 0 !important;
    padding-top: 12px;
    border-top: 1px dashed rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    gap: 8px !important;
}

.spec-item {
    font-size: 0.95rem;
    color: #2b3a30;
}

.spec-label {
    font-family: 'Georgia', serif !important;
    font-size: 1rem !important;
    font-weight: 900 !important;
    color: #0c1c11 !important;
}

/* ANIMACIONES */
.jumping-text {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px;
}

.jumping-text span {
    display: inline-block;
    animation: letterJump 1.8s infinite ease-in-out;
}

@keyframes letterJump {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Responsividad general en tablets y smartphones */
@media (max-width: 1024px) {
    .navbar {
        padding: 12px 20px;
        min-height: auto;
    }

    .logo-img {
        max-height: 90px !important;
    }

    .mobile-toggle {
        display: block !important;
        font-size: 2rem;
        cursor: pointer;
        color: var(--text-main);
        z-index: 1100;
    }

    .nav-menu {
        display: none;
        flex-direction: column !important;
        position: absolute !important;
        top: 100%;
        left: 0;
        width: 100%;
        background: #ffffff !important;
        padding: 25px !important;
        box-shadow: 0 8px 16px rgba(0,0,0,0.15);
        z-index: 1050;
        gap: 15px !important;
    }

    .nav-menu.active {
        display: flex !important;
    }

    .mega-menu {
        position: static !important;
        display: none !important;
        grid-template-columns: 1fr !important;
        width: 100% !important;
        box-shadow: none !important;
        border: none !important;
        padding: 15px !important;
        background: rgba(0, 0, 0, 0.03) !important;
    }

    .mega-dropdown.active .mega-menu {
        display: grid !important;
    }

    .properties-grid {
        grid-template-columns: 1fr !important; /* Una sola columna en móvil para evitar sobreponer elementos */
        gap: 30px !important;
    }

    .footer-top {
        justify-content: center;
        padding-top: 44px;
    }

    .footer-logo-img {
        max-height: 110px !important;
    }

    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }

    .footer-bottom {
        text-align: center;
    }
}