/* ===================================================
   Bruno Busolin Propiedades — style.css
   Fuentes: Playfair Display (serif) + Inter (sans)
   Colores: #2F4D3A verde | #F5F2EA crema
   =================================================== */

:root {
    --green:       #2F4D3A;
    --green-dark:  #21382A;
    --green-light: #3F6650;
    --cream:       #F5F2EA;
    --gray-mid:    #DCD6C7;
    --white:       #ffffff;
    --text:        #26251F;
    --text-light:  #6E6A5C;

    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans:  'Inter', 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 {
    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(33, 56, 42, 0.55);
    backdrop-filter: blur(4px);
    transition: background 0.4s ease, box-shadow 0.4s ease;
    padding: 0 32px;
}
.site-header.scrolled {
    background: var(--green-dark);
    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: 46px;
    width: auto;
}

.nav-list { display: flex; align-items: center; gap: 4px; }
.nav-list > li > a {
    display: block;
    padding: 8px 16px;
    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; }
.nav-list > li > a.active { opacity: 0.6; }

.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: 620px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--green-dark);
}

.hero-slider { position: absolute; inset: 0; z-index: 0; }
.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.4s ease;
}
.hero-slide.active { opacity: 1; }

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(ellipse at 20% 15%, rgba(63, 102, 80, 0.35) 0%, transparent 55%),
        linear-gradient(160deg, rgba(26, 44, 33, 0.82) 0%, rgba(33, 56, 42, 0.72) 55%, rgba(47, 77, 58, 0.68) 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(32px, 4.2vw, 56px);
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 52px;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.3);
}

.hero-search .search-fields {
    display: flex;
    background: rgba(255, 255, 255, 0.97);
    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(--green-dark);
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    border-right: 1px solid rgba(47, 77, 58, 0.14);
}
.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='%232F4D3A' 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(--green-dark); opacity: 0.5; }

.btn-search {
    padding: 0 36px;
    height: 58px;
    background: var(--green);
    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(--green-dark); }


/* =============================================
   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(--green);
    opacity: 0.6;
    margin-bottom: 10px;
}
.section-title {
    font-family: var(--font-serif);
    font-size: clamp(28px, 3vw, 40px);
    color: var(--green-dark);
    font-weight: 600;
}


/* =============================================
   CATEGORÍAS — "¿Qué estás buscando?"
   ============================================= */
.section-categorias { padding: 100px 0; background: var(--white); }

.categorias-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: 320px 360px;
    gap: 18px;
}
#cat-departamentos { grid-column: 1 / 8; grid-row: 1; }
#cat-alquileres     { grid-column: 8 / 13; grid-row: 1; }
#cat-casas           { grid-column: 1 / 6; grid-row: 2; }
#cat-terrenos       { grid-column: 6 / 13; grid-row: 2; }

.categoria-card {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 22px;
    cursor: pointer;
    isolation: isolate;
    background: var(--green-dark);
}
.categoria-card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    z-index: -2;
}
.categoria-card:hover .categoria-card-img { transform: scale(1.08); }
.categoria-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.08) 60%);
    z-index: -1;
}
.categoria-card svg {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 30px;
    height: 30px;
    stroke: rgba(255,255,255,0.35);
}
.categoria-card span {
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}


/* =============================================
   PROPIEDADES — grid + card
   ============================================= */
.section-destacadas { padding: 100px 0; background: var(--cream); }

.properties-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 52px;
}
.property-card {
    background: var(--white);
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 48px rgba(47, 77, 58, 0.16);
}
.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(--cream);
}
.property-card:hover .property-card-image img { transform: scale(1.05); }
.property-card-badge {
    position: absolute;
    top: 14px; left: 14px;
    background: var(--green);
    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; display: flex; flex-direction: column; flex: 1; }
.property-card-type {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--green);
    opacity: 0.65;
    margin-bottom: 6px;
}
.property-card-title {
    font-family: var(--font-serif);
    font-size: 18px;
    color: var(--green-dark);
    margin-bottom: 6px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.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(--green); opacity: 0.6; }
.property-card-price { font-family: var(--font-serif); font-size: 20px; font-weight: 600; color: var(--green-dark); margin-top: auto; padding-top: 8px; }

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

.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(--green);
    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; }


/* =============================================
   NOSOTROS
   ============================================= */
.section-nosotros { padding: 100px 0; background: var(--green-dark); color: var(--white); }
.nosotros-logo {
    width: 140px; height: 140px;
    margin: 0 auto 36px;
    background: var(--white);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 14px 36px rgba(0,0,0,0.28);
    padding: 16px;
    overflow: hidden;
}
.nosotros-logo img { width: 100%; height: 100%; object-fit: contain; }
.nosotros-intro { max-width: 720px; margin: 0 auto 64px; text-align: center; }
.nosotros-intro h2 {
    font-family: var(--font-serif);
    font-size: clamp(24px, 2.8vw, 36px);
    margin-bottom: 22px;
    line-height: 1.35;
}
.nosotros-intro p { font-size: 15px; line-height: 1.9; opacity: 0.82; margin-bottom: 18px; }
.nosotros-intro p:last-child { margin-bottom: 0; }

.pilares-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 56px;
}
.pilar-card { text-align: center; padding: 0 16px; }
.pilar-icon {
    width: 56px; height: 56px;
    margin: 0 auto 20px;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pilar-icon svg { width: 24px; height: 24px; opacity: 0.85; }
.pilar-card h3 {
    font-family: var(--font-serif);
    font-size: 18px;
    margin-bottom: 12px;
}
.pilar-card p { font-size: 13px; line-height: 1.75; opacity: 0.7; }

.nosotros-cierre {
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
    padding-top: 48px;
    border-top: 1px solid rgba(255,255,255,0.12);
}
.nosotros-cierre p { font-size: 14px; line-height: 1.85; opacity: 0.78; }


/* =============================================
   CONTACTO (sección home)
   ============================================= */
.section-contacto { padding: 100px 0; background: var(--cream); }
.contacto-inner { display: grid; grid-template-columns: 1fr 1.4fr; gap: 80px; align-items: start; }
.contacto-info .section-label { opacity: 0.7; }
.contacto-info .section-title { color: var(--green-dark); }
.contacto-bajada { font-size: 15px; line-height: 1.8; color: var(--text-light); 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; }
.contacto-datos li svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; stroke: var(--green); opacity: 0.7; }
.contacto-datos li div, .contacto-datos li a, .contacto-datos li span { display: block; color: var(--text); line-height: 1.7; }
.contacto-datos li a:hover { opacity: 0.7; }

.contacto-form-wrap { background: var(--white); border: 1px solid var(--gray-mid); 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;
    color: var(--green-dark); opacity: 0.6; margin-bottom: 8px;
}
.contacto-form input, .contacto-form textarea {
    background: var(--white);
    border: 1.5px solid var(--gray-mid);
    color: var(--text);
    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 { color: var(--text-light); opacity: 0.7; }
.contacto-form input:focus, .contacto-form textarea:focus { border-color: var(--green); }

.btn-contacto {
    width: 100%; padding: 15px;
    background: var(--green);
    color: var(--white);
    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;
    margin-top: 8px;
}
.btn-contacto:hover { background: var(--green-dark); }
.btn-contacto:disabled { opacity: 0.6; cursor: default; }

.form-feedback { margin-top: 14px; font-size: 13px; text-align: center; }
.form-feedback.ok { color: #2d7a2d; }
.form-feedback.error { color: #c0392b; }


/* =============================================
   FOOTER
   ============================================= */
.site-footer { background: var(--green-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.1);
    margin-bottom: 32px;
}
.footer-logo { height: 46px; width: auto; margin-bottom: 16px; }
.footer-brand p { font-size: 13px; opacity: 0.55; 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.45; 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.65; transition: opacity 0.2s ease; }
.social-links a:hover { opacity: 1; }
.footer-bottom p { text-align: center; font-size: 11px; opacity: 0.35; }


/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
    .properties-grid { grid-template-columns: repeat(2, 1fr); }
    .categorias-grid { grid-template-rows: 260px 300px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
    .pilares-grid { gap: 20px; }
}

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

    .main-nav {
        position: fixed;
        top: var(--header-h); left: 0; right: 0; bottom: 0;
        height: 100vh;
        z-index: 1001;
        background: var(--green-dark);
        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;
    }
    .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);
    }
    .nav-toggle { display: flex; }

    .hero-search .search-fields { flex-direction: column; }
    .hero-search select, .hero-search input[type="text"] {
        border-right: none;
        border-bottom: 1px solid rgba(47,77,58,0.12);
        padding: 15px;
    }
    .btn-search { width: 100%; }

    .properties-grid { grid-template-columns: 1fr; }
    .categorias-grid { grid-template-columns: 1fr; grid-template-rows: none; }
    .categorias-grid > .categoria-card { grid-column: 1 / -1 !important; grid-row: auto !important; height: 220px; }

    .pilares-grid { grid-template-columns: 1fr; gap: 32px; }

    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .site-header { padding: 0 20px; }

    .section-destacadas, .section-categorias, .section-nosotros,
    .section-contacto { padding: 72px 0; }

    .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%; }
}
