/* ============================================================
   apartamentosmodernos.com — Home editorial (navy + oro)
   Solo se carga en index.php. Todo va con prefijo .hm- para no
   chocar con el sistema global de style.css.
   Principios: fotografia real, serif solo en titulares, hairlines
   en lugar de sombras, un solo acento (oro), sin emojis ni iconos
   decorativos, esquinas casi rectas.
   ============================================================ */

.hm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.hm-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #8a6b2b;
}
.hm-eyebrow::before { content: ""; width: 36px; height: 1px; background: currentColor; }
.hm-on-dark .hm-eyebrow, .hm-hero .hm-eyebrow { color: var(--c-gold); }

.hm-section { padding: 104px 0; }
.hm-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}
.hm-head h2 {
    font-size: clamp(1.9rem, 3.2vw, 2.75rem);
    line-height: 1.12;
    letter-spacing: -0.01em;
    margin-top: 18px;
    max-width: 18em;
}
.hm-head p { max-width: 30em; margin-top: 14px; color: var(--c-charcoal); font-size: 1.02rem; line-height: 1.7; }
.hm-link {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--c-navy);
    padding-bottom: 6px;
    border-bottom: 1px solid var(--c-gold);
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
}
.hm-link:hover { color: #8a6b2b; }

/* ---------- HERO ---------- */
.hm-hero {
    position: relative;
    isolation: isolate;
    color: #fff;
    background: var(--c-navy-deep) url('/asset/images/hero-photo.webp') center 42% / cover no-repeat;
}
.hm-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(95deg, rgba(7,27,48,0.95) 0%, rgba(7,27,48,0.82) 36%, rgba(7,27,48,0.38) 68%, rgba(7,27,48,0.12) 100%),
        linear-gradient(0deg, rgba(7,27,48,0.9) 0%, rgba(7,27,48,0) 34%);
}
.hm-hero-inner { padding-top: 104px; padding-bottom: 92px; }
.hm-hero h1 {
    color: #fff;
    font-weight: 500;
    font-size: clamp(2.6rem, 5.6vw, 4.75rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    max-width: 12.5em;
    margin: 30px 0 28px;
}
.hm-hero h1 em { font-style: italic; font-weight: 400; color: var(--c-gold-light); }
.hm-hero .hm-lede { color: rgba(255,255,255,0.84); font-size: 1.15rem; line-height: 1.7; max-width: 33em; }

.hm-search {
    display: flex;
    max-width: 640px;
    margin-top: 44px;
    background: #fff;
    border-radius: 2px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}
.hm-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 20px 24px;
    font-size: 1rem;
    color: var(--c-ink);
}
.hm-search input::placeholder { color: var(--c-ash); }
.hm-search:focus-within { box-shadow: 0 24px 60px rgba(0,0,0,0.35), 0 0 0 2px var(--c-gold); }
.hm-search button {
    border: 0;
    background: var(--c-gold);
    color: var(--c-navy-deep);
    padding: 0 34px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    transition: background 0.2s;
}
.hm-search button:hover { background: var(--c-gold-light); }

.hm-popular { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: baseline; font-size: 0.9rem; }
.hm-popular span { color: rgba(255,255,255,0.55); }
.hm-popular a { color: rgba(255,255,255,0.88); border-bottom: 1px solid rgba(255,255,255,0.28); padding-bottom: 1px; transition: color 0.2s, border-color 0.2s; }
.hm-popular a:hover { color: var(--c-gold-light); border-color: var(--c-gold); }

.hm-facts { border-top: 1px solid rgba(255,255,255,0.18); background: rgba(7,27,48,0.55); }
.hm-facts-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.hm-fact { padding: 26px 28px 26px 0; display: flex; align-items: baseline; gap: 14px; }
.hm-fact + .hm-fact { padding-left: 28px; border-left: 1px solid rgba(255,255,255,0.14); }
.hm-fact b { font-family: var(--font-display); font-weight: 500; font-size: 2.1rem; line-height: 1; color: #fff; }
.hm-fact span { font-size: 0.78rem; line-height: 1.35; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255,255,255,0.62); }

/* ---------- ZONAS ---------- */
.hm-zones-sec { background: var(--c-parchment); }
.hm-zones { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 250px; gap: 14px; }
.hm-zone { position: relative; display: block; overflow: hidden; background: var(--c-navy); color: #fff; }
.hm-zone--feat { grid-column: span 2; grid-row: span 2; }
.hm-zone img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.hm-zone::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(0deg, rgba(7,27,48,0.9) 0%, rgba(7,27,48,0.25) 52%, rgba(7,27,48,0) 100%);
}
.hm-zone:hover img { transform: scale(1.045); }
.hm-zone-info { position: absolute; z-index: 1; left: 24px; right: 24px; bottom: 22px; }
.hm-zone-info h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.4rem; line-height: 1.2; color: #fff; }
.hm-zone--feat .hm-zone-info h3 { font-size: 2.2rem; }
.hm-zone-info p { margin-top: 6px; font-size: 0.85rem; color: rgba(255,255,255,0.78); }
.hm-zone-info::before {
    content: ""; display: block; width: 28px; height: 1px; background: var(--c-gold); margin-bottom: 14px;
    transition: width 0.4s ease;
}
.hm-zone:hover .hm-zone-info::before { width: 64px; }
.hm-zone--all {
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: 24px; background: var(--c-navy); transition: background 0.25s;
}
.hm-zone--all::after { display: none; }
.hm-zone--all:hover { background: var(--c-navy-deep); }
.hm-zone--all b { font-family: var(--font-display); font-weight: 500; font-size: 1.4rem; line-height: 1.25; }
.hm-zone--all span { margin-top: 14px; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--c-gold); }

/* ---------- PROYECTOS ---------- */
.hm-proj-sec { background: #fff; border-top: 1px solid var(--c-mist); border-bottom: 1px solid var(--c-mist); }
.hm-proj-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 28px; }
.hm-proj { display: block; color: inherit; }
.hm-proj-img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--c-linen); }
.hm-proj-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.hm-proj:hover .hm-proj-img img { transform: scale(1.04); }
.hm-proj-tag {
    position: absolute; left: 0; bottom: 0;
    background: var(--c-navy); color: #fff;
    font-size: 0.68rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
    padding: 9px 16px;
}
.hm-proj-body { padding-top: 22px; }
.hm-proj-body h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.5rem; line-height: 1.2; color: var(--c-navy); }
.hm-proj-dev { margin-top: 6px; font-size: 0.9rem; color: var(--c-ash); }
.hm-proj-meta {
    margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--c-mist);
    display: flex; flex-direction: column; gap: 4px; font-size: 0.9rem;
}
.hm-proj-meta b { font-weight: 600; color: var(--c-navy); }
.hm-proj-meta span { color: var(--c-ash); }

.hm-more { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--c-mist); display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: baseline; font-size: 0.92rem; }
.hm-more span { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: #8a6b2b; }
.hm-more a { color: var(--c-navy); border-bottom: 1px solid var(--c-mist); padding: 4px 0; transition: border-color 0.2s; }
.hm-more a:hover { border-color: var(--c-gold); }
.hm-more small { color: var(--c-ash); font-size: 0.8rem; margin-left: 4px; }

/* ---------- CAMINOS (oscuro) ---------- */
.hm-paths { background: var(--c-navy); color: #fff; }
.hm-paths .hm-head h2 { color: #fff; }
.hm-paths .hm-head p { color: rgba(255,255,255,0.7); }
.hm-paths-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(255,255,255,0.18); }
.hm-path { padding: 40px 40px 8px 0; }
.hm-path + .hm-path { padding-left: 40px; border-left: 1px solid rgba(255,255,255,0.14); }
.hm-path-n { font-family: var(--font-display); font-style: italic; font-size: 1.1rem; color: var(--c-gold); }
.hm-path h3 { margin-top: 14px; font-family: var(--font-display); font-weight: 500; font-size: 1.75rem; line-height: 1.2; color: #fff; }
.hm-path > p { margin-top: 14px; color: rgba(255,255,255,0.7); font-size: 0.98rem; line-height: 1.7; }
.hm-path ul { margin-top: 26px; }
.hm-path li { border-top: 1px solid rgba(255,255,255,0.12); }
.hm-path li a {
    display: flex; justify-content: space-between; gap: 16px; padding: 15px 0;
    font-size: 0.95rem; color: rgba(255,255,255,0.9); transition: color 0.2s, padding 0.25s;
}
.hm-path li a::after { content: "\2192"; color: var(--c-gold); }
.hm-path li a:hover { color: var(--c-gold-light); padding-left: 6px; }

/* ---------- ESENCIAL DEL MERCADO ---------- */
.hm-market { background: var(--c-parchment); }
.hm-market-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 80px; align-items: start; }
.hm-market-side { position: sticky; top: 120px; }
.hm-market-side h2 { font-size: clamp(1.9rem, 3.2vw, 2.75rem); line-height: 1.12; letter-spacing: -0.01em; margin-top: 18px; }
.hm-market-side p { margin-top: 20px; color: var(--c-charcoal); line-height: 1.75; }
.hm-market-side .hm-note { margin-top: 28px; padding-left: 18px; border-left: 2px solid var(--c-gold); font-size: 0.92rem; color: var(--c-charcoal); }
.hm-market-side .hm-note a { color: var(--c-navy); font-weight: 600; border-bottom: 1px solid var(--c-gold); }
.hm-market-list { border-top: 1px solid var(--c-mist); }
.hm-market-row {
    display: grid; grid-template-columns: 56px 1fr; gap: 8px 12px;
    padding: 28px 0; border-bottom: 1px solid var(--c-mist); color: inherit;
}
.hm-market-row .n { font-family: var(--font-display); font-style: italic; color: #8a6b2b; font-size: 1.05rem; padding-top: 3px; }
.hm-market-row h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.4rem; color: var(--c-navy); line-height: 1.25; }
.hm-market-row p { margin-top: 8px; color: var(--c-charcoal); line-height: 1.7; }
.hm-market-row .go { display: inline-block; margin-top: 12px; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--c-navy); border-bottom: 1px solid var(--c-gold); padding-bottom: 3px; }
.hm-market-row:hover h3 { color: #8a6b2b; }

/* ---------- BLOG ---------- */
.hm-blog-sec { background: #fff; border-top: 1px solid var(--c-mist); }
.hm-blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 32px; }
.hm-post { display: block; color: inherit; }
.hm-post-img { aspect-ratio: 3 / 2; overflow: hidden; background: var(--c-linen); }
.hm-post-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.hm-post:hover .hm-post-img img { transform: scale(1.04); }
.hm-post-cat { display: block; margin-top: 22px; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: #8a6b2b; }
.hm-post h3 { margin-top: 10px; font-family: var(--font-display); font-weight: 500; font-size: 1.4rem; line-height: 1.3; color: var(--c-navy); transition: color 0.2s; }
.hm-post:hover h3 { color: #8a6b2b; }
.hm-post p {
    margin-top: 10px; color: var(--c-charcoal); font-size: 0.95rem; line-height: 1.65;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.hm-post-date { display: block; margin-top: 14px; font-size: 0.82rem; color: var(--c-ash); }

/* ---------- FAQ ---------- */
.hm-faq-sec { background: var(--c-parchment); border-top: 1px solid var(--c-mist); }
.hm-faq-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 80px; align-items: start; }
.hm-faq-grid .hm-head { display: block; margin: 0; }
.hm-faq { border-top: 1px solid var(--c-mist); }
.hm-faq details { border-bottom: 1px solid var(--c-mist); }
.hm-faq summary {
    list-style: none; cursor: pointer; padding: 26px 48px 26px 0; position: relative;
    font-family: var(--font-display); font-weight: 500; font-size: 1.25rem; line-height: 1.35; color: var(--c-navy);
}
.hm-faq summary::-webkit-details-marker { display: none; }
.hm-faq summary::after {
    content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
    font-family: var(--font-sans); font-weight: 300; font-size: 1.6rem; color: #8a6b2b; transition: transform 0.25s;
}
.hm-faq details[open] summary::after { content: "\2212"; }
.hm-faq summary:hover { color: #8a6b2b; }
.hm-faq details p { padding: 0 48px 28px 0; color: var(--c-charcoal); line-height: 1.8; }

/* ---------- AGENTES ---------- */
.hm-agent { background: #fff; border-top: 1px solid var(--c-mist); padding: 88px 0; }
.hm-agent-box {
    display: flex; align-items: center; justify-content: space-between; gap: 48px; flex-wrap: wrap;
    background: var(--c-navy); color: #fff; padding: 64px 72px; border-left: 3px solid var(--c-gold);
}
.hm-agent-box h2 { color: #fff; font-size: clamp(1.7rem, 2.8vw, 2.4rem); line-height: 1.15; margin-top: 18px; max-width: 16em; }
.hm-agent-box p { margin-top: 16px; color: rgba(255,255,255,0.74); max-width: 32em; line-height: 1.7; }
.hm-btn {
    display: inline-block; background: var(--c-gold); color: var(--c-navy-deep);
    padding: 18px 38px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
    border-radius: 2px; transition: background 0.2s; white-space: nowrap;
}
.hm-btn:hover { background: var(--c-gold-light); }

/* ---------- Accesibilidad ---------- */
.hm-hero a:focus-visible, .hm-section a:focus-visible, .hm-agent a:focus-visible,
.hm-search button:focus-visible, .hm-faq summary:focus-visible { outline: 2px solid var(--c-gold); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
    .hm-zone img, .hm-proj-img img, .hm-post-img img { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .hm-section { padding: 80px 0; }
    .hm-zones { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 230px; }
    .hm-zone--feat { grid-column: span 2; grid-row: span 2; }
    .hm-proj-grid, .hm-blog-grid { grid-template-columns: repeat(2, 1fr); }
    .hm-market-grid, .hm-faq-grid { grid-template-columns: 1fr; gap: 48px; }
    .hm-market-side { position: static; }
    .hm-paths-grid { grid-template-columns: 1fr; }
    .hm-path, .hm-path + .hm-path { padding: 36px 0 8px; border-left: 0; }
    .hm-path + .hm-path { border-top: 1px solid rgba(255,255,255,0.14); }
    .hm-facts-grid { grid-template-columns: repeat(2, 1fr); }
    .hm-fact:nth-child(3) { padding-left: 0; border-left: 0; }
    .hm-fact:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,0.14); }
    .hm-agent-box { padding: 48px 40px; }
}
@media (max-width: 640px) {
    .hm-section { padding: 64px 0; }
    .hm-head { margin-bottom: 32px; }
    .hm-hero-inner { padding-top: 72px; padding-bottom: 64px; }
    .hm-hero::before {
        background: linear-gradient(180deg, rgba(7,27,48,0.9) 0%, rgba(7,27,48,0.8) 55%, rgba(7,27,48,0.92) 100%);
    }
    .hm-hero .hm-lede { font-size: 1.02rem; }
    .hm-search { margin-top: 32px; flex-direction: column; }
    .hm-search input { padding: 18px 18px; }
    .hm-search button { padding: 17px; }
    .hm-fact { padding: 20px 12px 20px 0; flex-direction: column; gap: 6px; }
    .hm-fact + .hm-fact { padding-left: 16px; }
    .hm-fact b { font-size: 1.7rem; }
    .hm-zones { grid-auto-rows: 190px; gap: 10px; }
    .hm-zone--feat { grid-row: span 2; }
    .hm-zone-info { left: 16px; right: 16px; bottom: 16px; }
    .hm-zone-info h3 { font-size: 1.15rem; }
    .hm-zone--feat .hm-zone-info h3 { font-size: 1.7rem; }
    .hm-zone-info p { display: none; }
    .hm-zone--feat .hm-zone-info p { display: block; }
    .hm-proj-grid, .hm-blog-grid { grid-template-columns: 1fr; }
    .hm-market-row { grid-template-columns: 40px 1fr; padding: 22px 0; }
    .hm-faq summary { font-size: 1.1rem; padding: 22px 36px 22px 0; }
    .hm-faq details p { padding-right: 0; }
    .hm-agent { padding: 48px 0; }
    .hm-agent-box { padding: 36px 24px; gap: 28px; }
    .hm-btn { width: 100%; text-align: center; padding: 18px 20px; }
}
