/* ==========================================================================
   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: 15px 24px;
    background: transparent;
}

.logo-img {
    max-height: 100px !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;
}

/* ==========================================================================
   DISEÑO PIE DE PÁGINA REDISEÑADO CON COMPONENTES MÁS GRANDES
   ========================================================================== */
footer {
    background-color: var(--footer-bg) !important;
    color: #0c1c11 !important;
    padding: 80px 24px !important;
    margin-top: 100px !important;
}

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

.footer-col h3 {
    font-size: 1.5rem !important; /* Más imponente */
    color: #0c1c11;
    margin-bottom: 25px !important;
    font-weight: 800;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 10px;
}

.footer-col p {
    line-height: 1.8 !important;
    font-size: 1.15rem !important; /* Letras significativamente más grandes */
    font-weight: 600;
}

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

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

.footer-col ul li a {
    color: #0c1c11;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.15rem !important; /* Enlaces más legibles */
    transition: color 0.2s;
}

.footer-col ul li a:hover {
    color: #ffffff;
}

.footer-bottom {
    max-width: 1200px;
    margin: 50px auto 0 auto !important;
    padding-top: 30px;
    border-top: 1px solid rgba(0, 0, 0, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom p {
    font-size: 1.1rem !important;
    font-weight: 700;
    flex: 2;
}

.footer-logo-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex: 1;
}

.footer-logo-img {
    max-height: 90px !important; /* Agrandado y visible */
    width: auto;
    transition: transform 0.3s ease;
}

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

/* ==========================================================================
   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: 15px 20px;
    }

    .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-grid {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-logo-right {
        justify-content: center;
    }
}