/* ===================================================
   Fernando Paradela Inmuebles — style.css
   Fuentes: Cochin (serif, sistema) + Montserrat (sans)
   Colores: #2A4459 navy | #EAEBE9 gris claro
   =================================================== */

/* ----- Variables ----- */
:root {
    --navy:        #2A4459;
    --navy-dark:   #1f3345;
    --navy-light:  #3a5a73;
    --gray-light:  #EAEBE9;
    --gray-mid:    #d4d5d3;
    --white:       #ffffff;
    --text:        #2a2a2a;
    --text-light:  #666666;

    --font-serif: Cochin, 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
    --font-sans:  'Montserrat', Arial, sans-serif;

    --ease:        all 0.3s ease;
    --max-w:       1200px;
    --header-h:    76px;
}

/* ----- Reset ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-sans);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ----- Container ----- */
.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 28px;
}


/* =============================================
   HEADER
   ============================================= */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    height: var(--header-h);
    background: rgba(42, 68, 89, 0.55);
    backdrop-filter: blur(4px);
    transition: background 0.4s ease, box-shadow 0.4s ease;
    padding: 0 32px;
}

.site-header.scrolled {
    background: var(--navy);
    box-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
}

.header-logo img {
    height: 50px;
    width: auto;
    border-radius: 3px;
}

/* Nav */
.nav-list {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-list > li { position: relative; }

.nav-list > li > a {
    display: block;
    padding: 8px 14px;
    color: var(--white);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: var(--ease);
    white-space: nowrap;
}

.nav-list > li > a:hover { opacity: 0.7; }

/* Dropdown */
.has-dropdown .dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 210px;
    background: var(--white);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.14);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: var(--ease);
}

.has-dropdown:hover .dropdown,
.has-dropdown.open .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown li a {
    display: block;
    padding: 11px 20px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--navy);
    border-bottom: 1px solid var(--gray-light);
    transition: var(--ease);
}

.dropdown li:last-child a { border-bottom: none; }

.dropdown li a:hover {
    background: var(--gray-light);
    padding-left: 28px;
}

/* Mobile toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.nav-toggle span {
    display: block;
    width: 26px;
    height: 2px;
    background: white;
    transition: var(--ease);
    transform-origin: center;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }


/* =============================================
   HERO
   ============================================= */
.hero {
    position: relative;
    height: 100vh;
    min-height: 640px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        160deg,
        rgba(42, 68, 89, 0.45) 0%,
        rgba(42, 68, 89, 0.60) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    padding: 0 24px;
    max-width: 860px;
    width: 100%;
}

.hero-tagline {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    opacity: 0.7;
    margin-bottom: 20px;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(34px, 4.5vw, 60px);
    font-weight: bold;
    line-height: 1.2;
    margin-bottom: 52px;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.3);
}

/* Hero search bar */
.hero-search .search-fields {
    display: flex;
    background: rgba(255, 255, 255, 0.96);
    overflow: hidden;
}

.hero-search select,
.hero-search input[type="text"],
.hero-search .btn-search {
    border: none;
    outline: none;
    font-family: var(--font-sans);
}

.hero-search select,
.hero-search input[type="text"] {
    flex: 1;
    min-width: 0;
    padding: 0 20px 0 24px;
    height: 58px;
    color: var(--navy);
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    border-right: 1px solid rgba(42, 68, 89, 0.12);
}

.hero-search select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%232A4459' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.hero-search input[type="text"]::placeholder {
    color: var(--navy);
    opacity: 0.5;
}

.btn-search {
    padding: 0 36px;
    height: 58px;
    background: var(--navy);
    color: var(--white);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.btn-search:hover { background: var(--navy-dark); }

/* Scroll indicator */
.hero-scroll {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}
.hero-scroll span {
    display: block;
    width: 22px;
    height: 34px;
    border: 1.5px solid rgba(255, 255, 255, 0.45);
    border-radius: 11px;
    position: relative;
}
.hero-scroll span::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 7px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 2px;
    animation: scroll-pulse 2s ease infinite;
}
@keyframes scroll-pulse {
    0%   { opacity: 1; top: 5px; }
    100% { opacity: 0; top: 16px; }
}


/* =============================================
   SECCIÓN — estilos comunes
   ============================================= */
.section-header {
    text-align: center;
    margin-bottom: 52px;
}
.section-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--navy);
    opacity: 0.55;
    margin-bottom: 10px;
}
.section-title {
    font-family: var(--font-serif);
    font-size: clamp(28px, 3vw, 40px);
    color: var(--navy);
    font-weight: bold;
}


/* =============================================
   DESTACADAS
   ============================================= */
.section-destacadas {
    padding: 100px 0;
    background: var(--gray-light);
}

.properties-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 52px;
}

/* Card */
.property-card {
    background: var(--white);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 48px rgba(42, 68, 89, 0.14);
}

.property-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
}
.property-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
    background: var(--gray-light);
}
.property-card:hover .property-card-image img { transform: scale(1.05); }

.property-card-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: var(--navy);
    color: var(--white);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 4px 10px;
}
.property-card-badge.vendida,
.property-card-badge.reservada,
.property-card-badge.alquilada { background: #888; }

.property-card-body { padding: 20px 22px 24px; }

.property-card-type {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--navy);
    opacity: 0.55;
    margin-bottom: 6px;
}
.property-card-title {
    font-family: var(--font-serif);
    font-size: 18px;
    color: var(--navy);
    margin-bottom: 6px;
    line-height: 1.3;
}
.property-card-location {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 14px;
}
.property-card-details {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 14px;
}
.card-detail {
    display: flex;
    align-items: center;
    gap: 6px;
}
.card-detail svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    stroke: var(--navy);
    opacity: 0.55;
}
.property-card-price {
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: bold;
    color: var(--navy);
}

.section-cta { text-align: center; }

.btn-outline {
    display: inline-block;
    padding: 14px 44px;
    border: 1.5px solid var(--navy);
    color: var(--navy);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    transition: var(--ease);
}
.btn-outline:hover {
    background: var(--navy);
    color: var(--white);
}

/* Loading / spinner */
.loading-state {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    padding: 80px 0;
}
.spinner {
    width: 30px;
    height: 30px;
    border: 2px solid var(--gray-mid);
    border-top-color: var(--navy);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.grid-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 64px 0;
    color: var(--text-light);
    font-size: 14px;
}


/* =============================================
   INSTITUCIONAL
   ============================================= */
.section-institucional {
    padding: 100px 0;
    background: var(--navy);
    color: var(--white);
}

.institucional-inner {
    display: flex;
    align-items: center;
    gap: 80px;
}

.institucional-number {
    flex-shrink: 0;
    text-align: center;
    line-height: 1;
}
.institucional-number span {
    display: block;
    font-family: var(--font-serif);
    font-size: 140px;
    color: var(--white);
    opacity: 0.1;
    line-height: 1;
}
.institucional-number p {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    opacity: 0.55;
    margin-top: -12px;
}

.institucional-text h2 {
    font-family: var(--font-serif);
    font-size: clamp(22px, 2.5vw, 34px);
    margin-bottom: 20px;
    line-height: 1.35;
}
.institucional-text p {
    font-size: 15px;
    line-height: 1.85;
    opacity: 0.82;
    max-width: 540px;
    margin-bottom: 36px;
}

.institucional-valores {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.institucional-valores li {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 6px 16px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    opacity: 0.75;
}


/* =============================================
   EMPRENDIMIENTOS
   ============================================= */
.section-emprendimientos {
    padding: 100px 0;
    background: var(--white);
}

.emprendimientos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    min-height: 320px;
}

.emprendimiento-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    cursor: pointer;
}
.emprendimiento-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
    background: var(--gray-light);
}
.emprendimiento-card:hover img { transform: scale(1.06); }

.emprendimiento-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(42,68,89,0.9) 0%, rgba(42,68,89,0.05) 55%);
    display: flex;
    align-items: flex-end;
    padding: 28px 24px;
    color: var(--white);
    transition: background 0.3s ease;
}
.emprendimiento-card:hover .emprendimiento-overlay {
    background: linear-gradient(to top, rgba(42,68,89,0.95) 0%, rgba(42,68,89,0.15) 55%);
}

.emprendimiento-overlay h3 {
    font-family: var(--font-serif);
    font-size: 20px;
    margin-bottom: 4px;
    line-height: 1.2;
}
.emprendimiento-overlay p {
    font-size: 11px;
    letter-spacing: 0.1em;
    opacity: 0.75;
    text-transform: uppercase;
}


/* =============================================
   CONTACTO
   ============================================= */
.section-contacto {
    padding: 100px 0;
    background: var(--navy);
    color: var(--white);
}

.contacto-inner {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 80px;
    align-items: start;
}

.contacto-info .section-label { opacity: 0.6; }

.contacto-bajada {
    font-size: 15px;
    line-height: 1.8;
    opacity: 0.75;
    margin: 20px 0 40px;
    max-width: 340px;
}

.contacto-datos {
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.contacto-datos li {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    font-size: 14px;
    opacity: 0.85;
}
.contacto-datos li svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
    opacity: 0.6;
}
.contacto-datos li div,
.contacto-datos li a,
.contacto-datos li span {
    display: block;
    color: var(--white);
    line-height: 1.7;
}
.contacto-datos li a:hover { opacity: 0.7; }

/* Form */
.contacto-form-wrap {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 44px 40px;
}

.contacto-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.contacto-form .form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

.contacto-form label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    opacity: 0.6;
    margin-bottom: 8px;
}

.contacto-form input,
.contacto-form textarea {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.15);
    color: var(--white);
    font-family: var(--font-sans);
    font-size: 14px;
    padding: 13px 16px;
    outline: none;
    transition: border-color 0.25s ease;
    resize: none;
    width: 100%;
}
.contacto-form input::placeholder,
.contacto-form textarea::placeholder { opacity: 0.35; }
.contacto-form input:focus,
.contacto-form textarea:focus { border-color: rgba(255,255,255,0.45); }

.btn-contacto {
    width: 100%;
    padding: 15px;
    background: var(--white);
    color: var(--navy);
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease;
    margin-top: 8px;
}
.btn-contacto:hover { background: var(--gray-light); }
.btn-contacto:disabled { opacity: 0.6; cursor: default; }

.form-feedback {
    margin-top: 14px;
    font-size: 13px;
    text-align: center;
    opacity: 0.85;
}
.form-feedback.ok { color: #7fd17f; }
.form-feedback.error { color: #f08080; }


/* =============================================
   FOOTER
   ============================================= */
.site-footer {
    background: var(--navy-dark);
    color: var(--white);
    padding: 72px 0 36px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 32px;
}

.footer-logo {
    height: 50px;
    width: auto;
    margin-bottom: 16px;
    border-radius: 3px;
}
.footer-brand p {
    font-size: 13px;
    opacity: 0.5;
    line-height: 1.7;
    max-width: 220px;
}

.footer-contact h4,
.footer-nav h4,
.footer-social h4 {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    opacity: 0.4;
    margin-bottom: 18px;
}

.footer-contact li,
.footer-nav li { margin-bottom: 10px; }

.footer-contact li a,
.footer-contact li,
.footer-nav li a {
    font-size: 13px;
    opacity: 0.75;
    transition: opacity 0.2s ease;
}
.footer-contact li a:hover,
.footer-nav li a:hover { opacity: 1; }

.social-links { display: flex; gap: 18px; }
.social-links a {
    opacity: 0.6;
    transition: opacity 0.2s ease;
}
.social-links a:hover { opacity: 1; }

.footer-bottom p {
    text-align: center;
    font-size: 11px;
    opacity: 0.3;
}


/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
    .properties-grid,
    .emprendimientos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 36px;
    }
    .institucional-inner { gap: 52px; }
    .institucional-number span { font-size: 100px; }
}

@media (max-width: 768px) {
    :root { --header-h: 68px; }

    /* Mobile nav */
    .main-nav {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        bottom: 0;
        height: 100vh;
        z-index: 1001;
        background: var(--navy);
        padding: 28px 24px;
        padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
        transform: translateX(100%) translateZ(0);
        transition: transform 0.35s ease;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        will-change: transform;
    }
    .main-nav.open { transform: translateX(0) translateZ(0); }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }
    .nav-list > li > a {
        padding: 16px 0;
        font-size: 14px;
        letter-spacing: 0.12em;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }

    .has-dropdown .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: rgba(255,255,255,0.06);
        display: none;
        margin-bottom: 8px;
    }
    .has-dropdown.open .dropdown { display: block; }
    .dropdown li a {
        color: rgba(255,255,255,0.75);
        border-color: rgba(255,255,255,0.07);
        padding-left: 20px;
        font-size: 13px;
    }
    .dropdown li a:hover {
        background: rgba(255,255,255,0.08);
        padding-left: 28px;
        color: white;
    }

    .nav-toggle { display: flex; }

    /* Hero search stack */
    .hero-search .search-fields { flex-direction: column; }
    .hero-search select,
    .hero-search input[type="text"] {
        border-right: none;
        border-bottom: 1px solid rgba(42,68,89,0.12);
        padding: 15px;
    }
    .btn-search { width: 100%; }

    /* Grids a 1 col */
    .properties-grid { grid-template-columns: 1fr; }
    .emprendimientos-grid { grid-template-columns: 1fr; }

    /* Institucional */
    .institucional-inner {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    .institucional-number span { font-size: 80px; }
    .institucional-text p { margin-left: auto; margin-right: auto; }
    .institucional-valores { justify-content: center; }

    /* Footer */
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }

    .site-header { padding: 0 20px; }

    .section-destacadas,
    .section-institucional,
    .section-emprendimientos,
    .section-contacto { padding: 72px 0; }

    /* Contacto */
    .contacto-inner { grid-template-columns: 1fr; gap: 48px; }
    .contacto-form-wrap { padding: 32px 24px; }
    .contacto-form .form-row { grid-template-columns: 1fr; gap: 0; }
    .contacto-bajada { max-width: 100%; }
}


/* =============================================
   WHATSAPP FLOTANTE
   ============================================= */
.whatsapp-float {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 999;
    width: 56px;
    height: 56px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
}
.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(37, 211, 102, 0.6);
}
.whatsapp-float svg {
    width: 30px;
    height: 30px;
    fill: #fff;
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
    .whatsapp-float svg { width: 26px; height: 26px; }
}
