/* ============================================================
   RESIDENCIA MEDALLA MILAGROSA — Flores, CABA
   Estilo propio "Sereno Clásico": azul mariano + dorado,
   tipografía editorial. Diseño 100% responsive (mobile-first).
   ============================================================ */

:root {
    --blue:        #24406B;
    --blue-dark:   #172C4D;
    --blue-soft:   #EAF0F8;
    --gold:        #C0A24A;
    --gold-dark:   #A5863A;
    --ivory:       #FBF8F2;
    --paper:       #FFFFFF;
    --ink:         #232F3D;
    --ink-soft:    #5C6B7A;
    --line:        #E8E2D6;
    --wa:          #25D366;

    --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --sans:  'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

    --maxw: 1180px;
    --radius: 14px;
    --radius-lg: 26px;
    --shadow: 0 18px 50px rgba(23, 44, 77, 0.10);
    --shadow-sm: 0 8px 24px rgba(23, 44, 77, 0.08);
    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
    font-family: var(--sans);
    color: var(--ink);
    background: var(--ivory);
    line-height: 1.65;
    overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; color: var(--blue-dark); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--sans); font-size: 0.74rem; font-weight: 700;
    letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-dark);
}
.eyebrow::before { content: ''; width: 26px; height: 2px; background: var(--gold); display: inline-block; }

.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-head { max-width: 640px; margin-bottom: 2.6rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(2rem, 4.5vw, 3rem); margin: 0.6rem 0 0.5rem; }
.section-head p { color: var(--ink-soft); font-size: 1.05rem; }

/* ---------- Botones ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 14px 26px; border-radius: 60px; font-family: var(--sans);
    font-weight: 600; font-size: 0.95rem; cursor: pointer; border: 1.6px solid transparent;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, color .25s;
    white-space: nowrap;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: #1eb658; transform: translateY(-2px); box-shadow: 0 10px 26px rgba(37,211,102,.32); }
.btn-ghost { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn-ghost:hover { background: var(--blue); color: #fff; }
.btn-gold { background: var(--gold); color: var(--blue-dark); }
.btn-gold:hover { background: var(--gold-dark); color: #fff; transform: translateY(-2px); }

/* ---------- Barra superior ---------- */
.topbar {
    background: var(--blue-dark); color: #dfe7f2;
    font-size: 0.82rem;
}
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 40px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.topbar a { color: #dfe7f2; transition: color .2s; }
.topbar a:hover { color: var(--gold); }
.topbar-info { display: flex; gap: 20px; flex-wrap: wrap; }
.topbar-info span, .topbar-info a { display: inline-flex; align-items: center; gap: 7px; }
.topbar-info i { color: var(--gold); }

/* ---------- Header ---------- */
.header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    transition: box-shadow .3s;
}
.header.scrolled { box-shadow: 0 6px 26px rgba(23,44,77,.08); }
.header .container { display: flex; align-items: center; justify-content: space-between; min-height: 74px; gap: 16px; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand-badge {
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--blue); color: var(--gold);
    display: grid; place-items: center; font-size: 1.25rem; flex-shrink: 0;
    border: 2px solid var(--gold);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text .b-name { font-family: var(--serif); font-size: 1.4rem; font-weight: 700; color: var(--blue-dark); }
.brand-text .b-sub { font-size: 0.6rem; font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold-dark); }

.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: 0.92rem; font-weight: 500; color: var(--ink); position: relative; padding: 4px 0; }
.nav-links a::after { content:''; position:absolute; left:0; bottom:-2px; width:0; height:2px; background: var(--gold); transition: width .3s var(--ease); }
.nav-links a:hover { color: var(--blue); }
.nav-links a:hover::after { width: 100%; }

.header-cta { display: flex; align-items: center; gap: 12px; }
.burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.burger span { width: 26px; height: 2.5px; background: var(--blue-dark); border-radius: 2px; transition: .3s; }
.burger.active span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Hero (partido) ---------- */
.hero { background: linear-gradient(180deg, var(--ivory) 0%, var(--blue-soft) 100%); position: relative; overflow: hidden; }
.hero .container { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; padding-top: clamp(3rem, 7vw, 5rem); padding-bottom: clamp(3rem, 7vw, 5rem); }
.hero-copy .eyebrow { margin-bottom: 1.1rem; }
.hero-copy h1 { font-size: clamp(2.5rem, 6vw, 4.1rem); letter-spacing: -0.5px; }
.hero-copy h1 em { color: var(--gold-dark); font-style: italic; }
.hero-copy .lead { color: var(--ink-soft); font-size: 1.12rem; margin: 1.3rem 0 1.9rem; max-width: 33ch; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-trust { display: flex; gap: 26px; margin-top: 2.2rem; flex-wrap: wrap; }
.hero-trust .t { display: flex; flex-direction: column; }
.hero-trust .t b { font-family: var(--serif); font-size: 1.7rem; color: var(--blue); line-height: 1; }
.hero-trust .t span { font-size: 0.82rem; color: var(--ink-soft); margin-top: 4px; }

.hero-media { position: relative; }
.hero-media .frame { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); position: relative; z-index: 2; }
.hero-media .frame img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/4.4; }
.hero-media::before { content:''; position:absolute; top: -18px; right: -18px; width: 130px; height: 130px; border: 3px solid var(--gold); border-radius: var(--radius-lg); z-index: 1; }
.hero-media .badge-float {
    position: absolute; left: -18px; bottom: 26px; z-index: 3;
    background: #fff; border-radius: 16px; padding: 14px 18px; box-shadow: var(--shadow-sm);
    display: flex; align-items: center; gap: 12px; max-width: 240px;
}
.hero-media .badge-float i { color: var(--gold-dark); font-size: 1.5rem; }
.hero-media .badge-float span { font-size: 0.86rem; font-weight: 600; color: var(--blue-dark); line-height: 1.3; }

/* ---------- Sobre nosotros (alternado) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split.reverse .split-media { order: 2; }
.split-media img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); aspect-ratio: 5/3.6; object-fit: cover; }
.split-copy h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0.5rem 0 1rem; }
.split-copy p { color: var(--ink-soft); margin-bottom: 1rem; }
.check-list { display: grid; gap: 12px; margin-top: 1.4rem; }
.check-list li { display: flex; align-items: flex-start; gap: 12px; font-size: 0.97rem; }
.check-list i { color: var(--gold-dark); margin-top: 3px; }

/* ---------- Servicios (tarjetas editoriales) ---------- */
.servicios { background: var(--paper); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.card {
    background: var(--ivory); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 30px 26px; border-top: 3px solid var(--gold);
    transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card .ic { width: 54px; height: 54px; border-radius: 12px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; font-size: 1.4rem; margin-bottom: 16px; }
.card h3 { font-size: 1.4rem; margin-bottom: 8px; }
.card p { color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- Franja de valores ---------- */
.valores { background: var(--blue); color: #eaf0f8; }
.valores .container { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; }
.valor { text-align: center; padding: 6px; }
.valor i { font-size: 1.9rem; color: var(--gold); margin-bottom: 12px; }
.valor h4 { font-family: var(--serif); font-size: 1.45rem; color: #fff; margin-bottom: 6px; }
.valor p { font-size: 0.9rem; color: #c3d0e4; }

/* ---------- Galería ---------- */
.galeria-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.g-item { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.g-item img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; transition: transform .6s var(--ease); }
.g-item:hover img { transform: scale(1.06); }
.g-item figcaption {
    position: absolute; inset: auto 0 0 0; padding: 26px 16px 14px;
    background: linear-gradient(transparent, rgba(23,44,77,.82));
    color: #fff; font-weight: 600; font-size: 0.92rem; display: flex; align-items: center; gap: 8px;
}
.g-item figcaption i { color: var(--gold); }
.g-item.tall { grid-row: span 2; }
.g-item.tall img { aspect-ratio: auto; height: 100%; }

/* ---------- Testimonios ---------- */
.testimonios { background: var(--blue-soft); }
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.quote { background: #fff; border-radius: var(--radius); padding: 30px 28px; box-shadow: var(--shadow-sm); position: relative; }
.quote::before { content: '\201C'; font-family: var(--serif); font-size: 4.5rem; color: var(--gold); opacity: .5; position: absolute; top: 6px; left: 18px; line-height: 1; }
.quote p { position: relative; color: var(--ink); font-size: 1.02rem; margin-bottom: 18px; padding-top: 18px; }
.quote .who { display: flex; align-items: center; gap: 12px; }
.quote .who .av { width: 42px; height: 42px; border-radius: 50%; background: var(--blue); color: var(--gold); display: grid; place-items: center; }
.quote .who b { display: block; font-family: var(--serif); font-size: 1.15rem; color: var(--blue-dark); }
.quote .who span { font-size: 0.82rem; color: var(--ink-soft); }
.stars { color: var(--gold); margin-bottom: 10px; font-size: 0.9rem; }

/* ---------- FAQ ---------- */
.faq-wrap { max-width: 820px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q { width: 100%; background: none; border: 0; cursor: pointer; text-align: left; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 4px; font-family: var(--serif); font-size: 1.25rem; color: var(--blue-dark); }
.faq-q i { color: var(--gold-dark); transition: transform .3s var(--ease); flex-shrink: 0; }
.faq-item.open .faq-q i { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s var(--ease); }
.faq-a p { color: var(--ink-soft); padding: 0 4px 20px; }

/* ---------- Contacto ---------- */
.contacto { background: var(--paper); }
.contacto-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 3.5rem); }
.contacto-info h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: 1rem; }
.contacto-info .ci { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.contacto-info .ci i { width: 44px; height: 44px; border-radius: 12px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; flex-shrink: 0; }
.contacto-info .ci b { display: block; color: var(--blue-dark); font-size: 1.02rem; }
.contacto-info .ci span, .contacto-info .ci a { color: var(--ink-soft); font-size: 0.95rem; }
.form { background: var(--ivory); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.6rem, 4vw, 2.4rem); }
.form h3 { font-size: 1.6rem; margin-bottom: 1.2rem; }
.field { margin-bottom: 14px; }
.field input, .field textarea { width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; font-family: var(--sans); font-size: 0.98rem; background: #fff; color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(36,64,107,.12); }
.form .btn { width: 100%; }

/* ---------- Mapa ---------- */
.mapa iframe { width: 100%; height: 380px; border: 0; display: block; }

/* ---------- Footer ---------- */
.footer { background: var(--blue-dark); color: #c3d0e4; padding: clamp(3rem, 6vw, 4.5rem) 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.2fr; gap: 40px; padding-bottom: 2.5rem; }
.footer .brand-text .b-name { color: #fff; }
.footer p { font-size: 0.92rem; margin-top: 14px; color: #a9b8d0; }
.footer h4 { font-family: var(--sans); font-size: 0.82rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 16px; }
.footer li { margin-bottom: 10px; }
.footer li a, .footer li span { color: #c3d0e4; font-size: 0.92rem; transition: color .2s; display: inline-flex; align-items: center; gap: 9px; }
.footer li a:hover { color: var(--gold); }
.footer li i { color: var(--gold); width: 16px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 20px 0; text-align: center; font-size: 0.82rem; color: #8ea1bd; }
.footer-bottom p { margin: 4px 0; color: #8ea1bd; }

/* ---------- WhatsApp flotante ---------- */
.fab-wa { position: fixed; right: 20px; bottom: 20px; width: 56px; height: 56px; border-radius: 50%; background: var(--wa); color: #fff; display: grid; place-items: center; font-size: 1.7rem; box-shadow: 0 10px 30px rgba(37,211,102,.45); z-index: 90; transition: transform .3s; }
.fab-wa:hover { transform: scale(1.08); }

/* ---------- Animaciones de entrada ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
    .hero .container { grid-template-columns: 1fr; }
    .hero-media { max-width: 460px; margin: 0 auto; order: -1; }
    .hero-copy .lead { max-width: none; }
    .split { grid-template-columns: 1fr; }
    .split.reverse .split-media { order: -1; }
    .contacto-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 760px) {
    /* Menú móvil (desplegable desde arriba, full-width: no genera overflow) */
    .nav-links {
        position: fixed; top: 0; left: 0; right: 0; width: 100%;
        background: #fff; flex-direction: column; align-items: stretch; justify-content: flex-start;
        padding: 84px 26px 26px; gap: 4px; transform: translateY(-105%);
        transition: transform .38s var(--ease); box-shadow: 0 22px 44px rgba(23,44,77,.16); z-index: 95;
        max-height: 100vh; overflow-y: auto;
    }
    .nav-links.open { transform: translateY(0); }
    .nav-links a { font-size: 1.1rem; padding: 14px 2px; width: 100%; border-bottom: 1px solid var(--line); }
    .nav-links a::after { display: none; }
    .burger { display: flex; z-index: 96; }
    .header-cta .btn:not(.burger) { display: none; }
    .header .container { min-height: 64px; }

    .topbar-info { gap: 14px; font-size: 0.78rem; }
    .topbar .topbar-social { display: none; }

    .hero-trust { gap: 20px; }
    .valores .container { gap: 26px; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer .brand { justify-content: center; }
    .footer li a, .footer li span { justify-content: center; }
    .g-item.tall { grid-row: span 1; }
}

@media (max-width: 460px) {
    .container { padding: 0 16px; }
    .brand-text .b-name { font-size: 1.18rem; }
    .brand-badge { width: 40px; height: 40px; font-size: 1.1rem; }
    .hero-copy h1 { font-size: clamp(2.1rem, 9vw, 2.6rem); }
    .hero-actions .btn { width: 100%; }
    .topbar-info .tb-hide { display: none; }
    .btn { padding: 13px 22px; }
    .fab-wa { width: 52px; height: 52px; bottom: 16px; right: 16px; }
}


/* ============================================================
   LEGIBILIDAD Y AREAS TACTILES EN MOBILE (auditoria 2026-08-27)
   El publico son adultos mayores y sus hijos de 50+: ningun texto
   por debajo de 12px y ningun boton por debajo de 44px de alto.
   ============================================================ */
@media (max-width: 768px) {
    /* --- texto minimo legible --- */
    .mobile-nav-item,
    .mobile-nav-item span      { font-size: 12px; }
    .section-label,
    .contacto-badge,
    .eyebrow,
    .b-sub,
    .hero-line span,
    .stat-label,
    .location-hero-subtitle,
    .breadcrumb-list,
    .wa-tag,
    .footer-disclaimer,
    .footer-habilitacion,
    .footer-copyright,
    .footer-bottom p           { font-size: 12px; }
    .testimonio-info span,
    .galeria-overlay span,
    .hero-badge-pill,
    .hero-tag,
    .hero-badge,
    .location-badge            { font-size: 12px; }

    /* --- areas tactiles de al menos 44px --- */
    .nav-link,
    .nav-links a,
    .footer ul li a,
    .footer-list a,
    .footer-contact-list a,
    .location-info-link,
    .breadcrumb-item a,
    .topbar-info a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }
    .btn,
    .header-cta,
    .footer-cta-btn,
    .btn-whatsapp-submit,
    .faq-question,
    .faq-q                     { min-height: 48px; }
    .mobile-nav-item           { min-height: 52px; }
    .menu-toggle,
    .burger,
    .nav-toggle                { min-width: 44px; min-height: 44px; }
}

@media (max-width: 768px) {
    /* Enlaces que viven solos dentro de una tarjeta: area tactil completa */
    .location-info-text a,
    .contacto-datos li a,
    .contacto-info a,
    .ci a,
    .footer-contact-list a,
    .topbar-info a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }
    /* Enlaces embebidos en una oracion: se agranda el area sin cortar el renglon */
    .footer-habilitacion a,
    .footer-disclaimer a,
    .footer-bottom a {
        display: inline-block;
        padding: 11px 4px;
    }
}

@media (max-width: 768px) {
    /* Estos dos venian con reglas mas especificas en el tema base */
    .brand-text .b-sub,
    .section-head .section-tag,
    .section-header .section-tag,
    span.section-tag           { font-size: 11.5px; }

    /* Cualquier enlace suelto dentro de texto de contenido */
    .servicio-card p a,
    .privacy-body a,
    .privacy-body li a,
    .location-info-content a,
    .contacto p a,
    .container > p a,
    .footer-brand a,
    .footer-logo,
    a.privacy-back {
        display: inline-block;
        padding: 11px 2px;
        min-height: 44px;
        box-sizing: border-box;
    }
    .footer-logo, .footer-brand > a { display: inline-flex; align-items: center; }
}

@media (max-width: 768px) {
    /* Enlace dentro de un parrafo: area tactil sin romper el renglon */
    p > a { display: inline-block; padding-block: 10px; }
}

/* ============================================================
   Los atributos width/height del HTML (puestos para evitar CLS) no deben
   imponer el ancho: el logo define su alto por CSS y el ancho va por
   proporcion. Sin esto, un logo de 1064px de ancho desbordaba la pagina.
   ============================================================ */
img { max-width: 100%; }

