/* ═══════════════════════════════════════════
   MEGAC INMOBILIARE — Global Stylesheet
   Brand: #010D35 · #022CAD · #7B9BFE · #EBEBED · #FFF
   Font: Poppins
═══════════════════════════════════════════ */

/* ── Base Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Poppins', sans-serif;
    color: #1A1D2B;
    background: #FFFFFF;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
ul { list-style: none; }
a { text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── Container ── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}
@media (min-width: 768px) {
    .container { padding: 0 32px; }
}

/* ══════════════════════════════════════
   NAVBAR
══════════════════════════════════════ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 18px 0;
    transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
}
.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Scrolled state — white bg */
.navbar.scrolled {
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 12px 0;
    box-shadow: 0 1px 20px rgba(1,13,53,0.06);
    border-bottom: 1px solid #EBEBED;
}
.navbar.scrolled .nav-link { color: #5A5D6A; }
.navbar.scrolled .nav-link:hover,
.navbar.scrolled .nav-link.active { color: #010D35; background: rgba(1,13,53,0.04); }
.navbar.scrolled .mobile-hamburger span { background: #010D35; }

/* Logo */
.logo {
    height: 45px;
    display: flex;
    align-items: center;
    flex-shrink: 0; /* Evita que el contenedor del logo se deforme */
    max-width: 250px; /* Límite de seguridad para el contenedor */
}
.logo img {
    height: 45px; /* Altura controlada */
    max-height: 45px; /* Fuerza máxima altura contra estilos de Tailwind */
    width: auto;
    max-width: 100%; /* Límite de ancho estricto */
    object-fit: contain;
    object-position: left;
    transition: transform 0.3s ease;
}
.logo:hover img {
    transform: scale(1.03);
}

/* Nav links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}
.nav-link {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.25s;
}
.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: rgba(255,255,255,0.08);
}
.nav-cta {
    background: #022CAD;
    color: #fff !important;
    font-weight: 600;
    padding: 9px 22px;
    border-radius: 8px;
    margin-left: 8px;
    transition: all 0.3s;
    display: inline-block;
}
.nav-cta:hover {
    background: #7B9BFE;
    box-shadow: 0 4px 20px rgba(123,155,254,0.3);
}

/* Mobile hamburger */
.mobile-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}
.mobile-hamburger span {
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s;
}

/* ── MEJORAS EN MENÚ MÓVIL ── */
@media (max-width: 768px) {
    .mobile-hamburger { display: flex; }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        gap: 8px; /* Más espacio entre los enlaces */
        padding: 24px 24px; /* Más padding para que no se vea aplastado */
        background: #fff;
        border-top: 1px solid #EBEBED;
        box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    }
    .nav-links.open { display: flex; }
    
    .nav-links li {
        width: 100%; /* Ocupar todo el ancho disponible */
    }
    .nav-links .nav-link { 
        color: #1A1D2B; 
        display: block; /* Convertir a bloque para mejor área de toque */
        padding: 12px 16px;
        font-size: 16px; /* Letra un poco más grande */
        border-radius: 8px;
    }
    .nav-links .nav-link:hover,
    .nav-links .nav-link.active { 
        background: rgba(1,13,53,0.04); 
        color: #022CAD;
    }
    .nav-links .nav-cta {
        display: block;
        text-align: center; /* Centrar el texto del botón */
        margin-left: 0;
        margin-top: 12px;
        padding: 14px 22px;
    }
    .mobile-hamburger span { background: #010D35; }
    .navbar:not(.scrolled) .mobile-hamburger span { background: #fff; } /* Asegurar que la hamburguesa sea blanca si no hay scroll */
    
    .logo img {
        height: 38px; /* Un poco más pequeño en móviles */
        max-height: 38px;
    }
}

/* ══════════════════════════════════════
   PAGE HERO (dark navy banner)
══════════════════════════════════════ */
.page-hero {
    background: #010D35;
    padding: 160px 0 56px;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 50% at 50% 60%, rgba(2,44,173,0.12) 0%, transparent 70%),
        radial-gradient(ellipse 40% 40% at 85% 20%, rgba(123,155,254,0.07) 0%, transparent 50%);
}
.page-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(123,155,254,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(123,155,254,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
}
.page-hero .container { position: relative; z-index: 2; }
.page-hero .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #7B9BFE;
    margin-bottom: 14px;
}
.page-hero .eyebrow::before {
    content: '';
    width: 28px;
    height: 1.5px;
    background: #7B9BFE;
}
.page-hero h1 {
    font-size: clamp(32px, 4vw, 52px);
    font-weight: 700;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 16px;
}
.page-hero h1 em,
.page-hero h1 span.accent {
    font-style: normal;
    color: #7B9BFE;
}
.page-hero .hero-desc {
    font-size: 17px;
    color: #9CA0AD;
    line-height: 1.7;
    max-width: 600px;
}

/* Extended hero (homepage full-screen) */
.page-hero.hero-full {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 140px 0 100px;
}

/* ══════════════════════════════════════
   GLASS CARDS (on dark bg)
══════════════════════════════════════ */
.glass-card {
    background: rgba(123,155,254,0.04);
    border: 1px solid rgba(123,155,254,0.08);
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
}
.glass-card:hover {
    background: rgba(123,155,254,0.08);
    border-color: rgba(123,155,254,0.18);
    transform: translateY(-4px);
}

/* ══════════════════════════════════════
   LIGHT CARDS (on light bg)
══════════════════════════════════════ */
.card {
    background: #fff;
    border: 1.5px solid #EBEBED;
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
}
.card:hover {
    border-color: rgba(123,155,254,0.3);
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(1,13,53,0.08);
}

/* Soft cards (subtle bg) */
.card-soft {
    background: #F8F9FC;
    border: 1px solid #EBEBED;
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
}
.card-soft:hover {
    background: #fff;
    border-color: rgba(123,155,254,0.25);
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(1,13,53,0.06);
}

/* ══════════════════════════════════════
   SECTION EYEBROW
══════════════════════════════════════ */
.section-eyebrow {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #022CAD;
    margin-bottom: 12px;
}

/* ══════════════════════════════════════
   BUTTONS
══════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 15px;
    padding: 14px 32px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
}
.btn-blue {
    background: #022CAD;
    color: #fff;
}
.btn-blue:hover {
    background: #7B9BFE;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(123,155,254,0.3);
}
.btn-outline {
    background: transparent;
    color: #010D35;
    border: 2px solid #010D35;
}
.btn-outline:hover {
    background: #010D35;
    color: #fff;
}
.btn-white {
    background: #fff;
    color: #022CAD;
    font-weight: 700;
}
.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.15);
}

/* WhatsApp button */
.btn-wa {
    background: #25D366;
    color: #fff;
}
.btn-wa:hover {
    background: #20BD5A;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37,211,102,0.3);
}

/* ══════════════════════════════════════
   PROPERTY BADGES
══════════════════════════════════════ */
.badge {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #fff;
}

.badge-venta { background: #022CAD; }
.badge-renta { background: #7B9BFE; }
.badge-estancia { background: #E67E22; }

/* ══════════════════════════════════════
   FILTER TABS
══════════════════════════════════════ */
.filter-tabs {
    display: flex;
    gap: 4px;
    background: #EBEBED;
    border-radius: 10px;
    padding: 4px;
}
.filter-tab {
    padding: 10px 24px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    color: #5A5D6A;
    transition: all 0.3s;
}
.filter-tab.active {
    background: #022CAD;
    color: #fff;
    box-shadow: 0 2px 10px rgba(2,44,173,0.25);
}

/* ══════════════════════════════════════
   FORM INPUTS
══════════════════════════════════════ */
.form-input {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid #EBEBED;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    background: #fff;
    color: #1A1D2B;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.form-input::placeholder { color: #8B8E97; }
.form-input:focus {
    border-color: #7B9BFE;
    box-shadow: 0 0 0 3px rgba(123,155,254,0.1);
}
select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238B8E97' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* ══════════════════════════════════════
   CTA GRADIENT BANNER
══════════════════════════════════════ */
.cta-gradient {
    background: linear-gradient(135deg, #022CAD 0%, #0339D4 50%, #7B9BFE 100%);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
}
.cta-gradient::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(255,255,255,0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.06) 0%, transparent 40%);
}
.cta-gradient > * { position: relative; z-index: 2; }

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
.footer {
    background: #010D35;
    padding: 72px 0 40px;
}
.footer-link {
    color: rgba(255,255,255,0.5);
    font-size: 14px;
    transition: color 0.25s;
}
.footer-link:hover { color: #7B9BFE; }
.footer-heading {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    margin-bottom: 18px;
}
.footer-social {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(123,155,254,0.1);
    display: grid;
    place-items: center;
    transition: all 0.3s;
}
.footer-social:hover {
    background: #7B9BFE;
    border-color: #7B9BFE;
}
.footer-social svg { fill: rgba(255,255,255,0.4); width: 16px; height: 16px; }
.footer-social:hover svg { fill: #fff; }

/* ══════════════════════════════════════
   WHATSAPP FLOAT
══════════════════════════════════════ */
.wa-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25D366;
    display: grid;
    place-items: center;
    box-shadow: 0 4px 16px rgba(37,211,102,0.35);
    transition: all 0.3s;
}
.wa-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(37,211,102,0.5);
}
.wa-float svg { width: 26px; height: 26px; fill: #fff; }

/* ══════════════════════════════════════
   SCROLL REVEAL
══════════════════════════════════════ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════
   SHARED JS — inline via each page
   (navbar scroll, mobile toggle, reveal observer)
══════════════════════════════════════ */

/* Facebook - solo fill */
.footer-social-icon:hover .icon-facebook {
    fill: #ffffff;
}

/* Instagram - stroke sin fill */
.footer-social-icon:hover .icon-instagram {
    stroke: #ffffff;
}

.footer-social-icon:hover .icon-instagram .ig-dot {
    fill: #ffffff;
    stroke: none;
}