/* ==========================================================================
   María Eliana Carta — design system (Bootstrap 5 polish)
   ========================================================================== */
:root {
    --maca-primary: #a40770;
    --maca-primary-dark: #7d0556;
    --maca-primary-light: #c93a98;
    --maca-ink: #1c1c22;
    --maca-muted: #6b6b76;
    --maca-bg-soft: #f7f5f8;
    --maca-radius: 12px;
    --maca-shadow: 0 6px 24px rgba(20, 20, 30, .08);
    --maca-shadow-hover: 0 12px 34px rgba(164, 7, 112, .18);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; } /* defensive — B34 */

body {
    font-family: 'Montserrat', system-ui, sans-serif;
    color: var(--maca-ink);
    overflow-x: hidden;
    padding-top: 84px; /* fixed navbar height */
}

a { color: var(--maca-primary); text-decoration: none; }
a:hover { color: var(--maca-primary-dark); }

.maca-section { padding: 4rem 0; }
.maca-section--soft { background: var(--maca-bg-soft); }
.maca-title { font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.4rem); }
.maca-title span { color: var(--maca-primary); }
.maca-subtitle { color: var(--maca-muted); max-width: 640px; margin: .5rem auto 0; }
.text-primary-maca { color: var(--maca-primary) !important; }

/* ---------- Buttons ---------- */
.maca-btn {
    background: var(--maca-primary);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: .65rem 1.5rem;
    font-weight: 600;
    transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.maca-btn:hover { background: var(--maca-primary-dark); color: #fff; transform: translateY(-2px); box-shadow: var(--maca-shadow-hover); }
.maca-btn--outline { background: transparent; color: var(--maca-primary); border: 2px solid var(--maca-primary); }
.maca-btn--outline:hover { background: var(--maca-primary); color: #fff; }

/* ---------- Navbar ---------- */
.maca-navbar {
    background: #fff;
    box-shadow: 0 2px 14px rgba(0, 0, 0, .06);
    min-height: 84px;
}
.maca-navbar .navbar-brand img { object-fit: contain; }
.maca-navbar .nav-link {
    color: var(--maca-ink);
    font-weight: 600;
    font-size: .95rem;
    padding: .5rem 1rem;
    position: relative;
}
.maca-navbar .nav-link:hover,
.maca-navbar .nav-link.active { color: var(--maca-primary); }
.maca-navbar .nav-link.active::after {
    content: ""; position: absolute; left: 1rem; right: 1rem; bottom: .25rem;
    height: 2px; background: var(--maca-primary); border-radius: 2px;
}

/* ---------- Hero ---------- */
.maca-hero {
    position: relative;
    min-height: 540px;
    display: flex; align-items: center; justify-content: center;
    text-align: center;
    color: #fff;
    isolation: isolate;
    background: #2a2a30 center/cover no-repeat;
}
.maca-hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(180deg, rgba(20,20,30,.42), rgba(164,7,112,.20));
}
.maca-hero__title { font-weight: 700; font-size: clamp(2rem, 5vw, 3.4rem); text-shadow: 0 2px 16px rgba(0,0,0,.35); }
.maca-hero__sub { font-size: 1.15rem; opacity: .95; margin-bottom: 2rem; }
.maca-hero__cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.maca-hero__cta .maca-btn { font-size: 1.1rem; padding: .8rem 2.2rem; }

/* ---------- Search bar ---------- */
.maca-search {
    background: #fff;
    border-radius: var(--maca-radius);
    box-shadow: var(--maca-shadow);
    padding: 1.25rem;
    margin-top: -3rem;
    position: relative;
    z-index: 3;
}
.maca-search .form-select, .maca-search .form-control { border-radius: 8px; }
/* Inside a section (e.g. propiedades.php) the search must NOT overlap the title;
   the negative margin is only for the home hero overlap. */
.maca-section .maca-search { margin-top: 0; }

/* ---------- Property cards ---------- */
.maca-card {
    display: flex; flex-direction: column;
    background: #fff;
    border-radius: var(--maca-radius);
    overflow: hidden;
    box-shadow: var(--maca-shadow);
    transition: transform .25s ease, box-shadow .25s ease;
}
.maca-card:hover { transform: translateY(-4px); box-shadow: var(--maca-shadow-hover); }
.maca-card__media { display: block; overflow: hidden; }
.maca-card__img { object-fit: cover; transition: transform .4s ease; }
.maca-card:hover .maca-card__img { transform: scale(1.08); }
.maca-card__badge {
    position: absolute; top: .75rem; left: .75rem; z-index: 2;
    background: var(--maca-primary); color: #fff;
    font-size: .8rem; font-weight: 600;
    padding: .25rem .75rem; border-radius: 50px;
}
.maca-card__body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; flex: 1; }
.maca-card__loc { color: var(--maca-muted); font-size: .85rem; margin-bottom: .35rem; }
.maca-card__title { font-size: 1.05rem; font-weight: 600; line-height: 1.35; margin-bottom: .65rem; }
.maca-card__title a { color: var(--maca-ink); }
.maca-card__title a:hover { color: var(--maca-primary); }
.maca-card__features { list-style: none; padding: 0; margin: 0 0 .75rem; display: flex; flex-wrap: wrap; gap: .75rem; color: var(--maca-muted); font-size: .85rem; }
.maca-card__features li i { color: var(--maca-primary); }
.maca-card__price { margin-top: auto; font-size: 1.25rem; font-weight: 700; color: var(--maca-primary); }

/* ---------- Detail page ---------- */
.maca-detail__title { font-weight: 700; }
.maca-detail__price { font-size: 1.6rem; font-weight: 700; color: var(--maca-primary); }
.maca-detail__panel { background: #fff; border-radius: var(--maca-radius); box-shadow: var(--maca-shadow); padding: 1.5rem; }
.maca-spec { list-style: none; padding: 0; margin: 0; }
.maca-spec li { display: flex; justify-content: space-between; padding: .55rem 0; border-bottom: 1px solid #eee; }
.maca-spec li i { color: var(--maca-primary); margin-right: .4rem; }
.maca-carousel img { width: 100%; height: 480px; object-fit: cover; border-radius: var(--maca-radius); }
.maca-carousel iframe { width: 100%; height: 480px; border: 0; border-radius: var(--maca-radius); }
.maca-map iframe { width: 100%; height: 420px; border: 0; border-radius: var(--maca-radius); }

/* ---------- Forms ---------- */
.maca-form .form-control { border-radius: 8px; }
.maca-form .form-control:focus { border-color: var(--maca-primary-light); box-shadow: 0 0 0 .2rem rgba(164,7,112,.15); }
.maca-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.maca-form__feedback { border-radius: 8px; padding: .75rem 1rem; font-weight: 500; }
.maca-form__feedback.is-ok { background: #e7f6ec; color: #1b7a3d; }
.maca-form__feedback.is-err { background: #fdecec; color: #b02a2a; }

/* ---------- Footer ---------- */
.maca-footer { background: #1c1c22; color: #d8d8de; padding: 3rem 0 1.5rem; margin-top: 3rem; }
.maca-footer__logo { max-width: 230px; background: #fff; padding: .5rem .75rem; border-radius: 8px; }
.maca-footer__title { color: #fff; font-weight: 600; margin-bottom: 1rem; }
.maca-footer__links { list-style: none; padding: 0; margin: 0; }
.maca-footer__links li { margin-bottom: .5rem; }
.maca-footer__links a { color: #d8d8de; }
.maca-footer__links a:hover { color: var(--maca-primary-light); }
.maca-footer__rule { border-color: rgba(255,255,255,.12); margin: 2rem 0 1rem; }
.maca-footer__bottom { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; font-size: .85rem; color: #9a9aa6; }
.maca-footer__gvamax { color: #fff; font-weight: 700; }
.maca-footer__gvamax:hover { color: var(--maca-primary-light); }

/* ---------- WhatsApp FAB ---------- */
.maca-wa-fab {
    position: fixed; right: 20px; bottom: 24px; z-index: 1050;
    width: 56px; height: 56px; border-radius: 50%;
    background: #25d366; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.7rem; box-shadow: 0 6px 18px rgba(0,0,0,.25);
    transition: transform .2s ease;
}
.maca-wa-fab:hover { color: #fff; transform: scale(1.08); }

/* ---------- Scroll reveal (static content only — not AJAX, B38) ---------- */
[data-animate] { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
[data-animate].in-view { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    [data-animate] { opacity: 1; transform: none; transition: none; }
    .maca-card__img, .maca-card { transition: none; }
}

/* ---------- Pagination ---------- */
.maca-pagination { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; list-style: none; padding: 0; margin: 2rem 0; }
.maca-pagination a, .maca-pagination span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 42px; height: 42px; padding: 0 .5rem; border-radius: 8px;
    border: 1px solid #ddd; color: var(--maca-ink); font-weight: 600;
}
.maca-pagination a:hover { border-color: var(--maca-primary); color: var(--maca-primary); }
.maca-pagination .is-current { background: var(--maca-primary); border-color: var(--maca-primary); color: #fff; }

/* ---------- Mobile ---------- */
@media (max-width: 575.98px) {
    body { padding-top: 76px; }
    .maca-navbar { min-height: 76px; }
    .maca-section { padding: 2.5rem 0; }
    .maca-carousel img, .maca-carousel iframe { height: 280px; }
    .maca-search { margin-top: -1.5rem; }
}
