/* ============================================================
   DUPAVI — Página «Consultor SEO en Lleida» (/consultor-seo-lleida/)
   Concepto: «cerca de verdad». La cercanía no es un código postal,
   es trabajar con la persona: tu foto en un círculo y un segundo
   círculo que se acerca (tú y el cliente). Animación firma «acercar»:
   las piezas entran desde los lados y se encuentran en el centro.

   - Solo lo propio de esta página (prefijo .lle-). La estructura,
     el acordeón, el formulario y el motor de animaciones están en
     servicios-base.css (prefijo .srv-).
   - Los dos círculos de la cita los añade assets/js/seo-lleida.js.
   ============================================================ */

:root {
    --lle-ico-user:     url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
    --lle-ico-building: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='16' height='20' x='4' y='2' rx='2'/%3E%3Cpath d='M9 22v-4h6v4'/%3E%3Cpath d='M8 6h.01'/%3E%3Cpath d='M16 6h.01'/%3E%3Cpath d='M12 6h.01'/%3E%3Cpath d='M12 10h.01'/%3E%3Cpath d='M12 14h.01'/%3E%3Cpath d='M16 10h.01'/%3E%3Cpath d='M16 14h.01'/%3E%3Cpath d='M8 10h.01'/%3E%3Cpath d='M8 14h.01'/%3E%3C/svg%3E");
    --lle-ico-talk:     url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 9a2 2 0 0 1-2 2H6l-4 4V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2z'/%3E%3Cpath d='M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1'/%3E%3C/svg%3E");
    --lle-ico-sliders:  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 4h-7'/%3E%3Cpath d='M10 4H3'/%3E%3Cpath d='M21 12h-9'/%3E%3Cpath d='M8 12H3'/%3E%3Cpath d='M21 20h-5'/%3E%3Cpath d='M12 20H3'/%3E%3Cpath d='M14 2v4'/%3E%3Cpath d='M8 10v4'/%3E%3Cpath d='M16 18v4'/%3E%3C/svg%3E");
}

/* Ritmo vertical (sustituye el hueco genérico de 24px que pone WordPress) */
.lle-hero-main > *,
.lle-hero-aside > *,
.lle-hero-card > * { margin-top: 0 !important; }
.lle-way-card > * + * { margin-top: 0.85rem !important; }

/* ============================================================
   1 · HERO — tu foto en un círculo y un segundo círculo que se acerca
   ============================================================ */
.lle-hero { overflow: hidden; }
.lle-hero-cols.wp-block-columns {
    align-items: center !important;
    gap: clamp(2.5rem, 6vw, 6rem);
    margin: 0;
}
.lle-hero-main.wp-block-column  { flex-basis: 54% !important; }
.lle-hero-aside.wp-block-column {
    flex-basis: 46% !important;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.lle-hero h1 {
    font-size: clamp(2.2rem, 4.2vw, 3.5rem);
    line-height: 1.07;
    letter-spacing: -0.03em;
    color: var(--c-ink);
    margin-bottom: 1.75rem;
    max-width: 16ch;
}
.lle-hero .lle-hero-lead {
    color: var(--c-ink);
    font-size: 1.22rem;
    font-weight: 600;
    line-height: 1.4;
    max-width: 44ch;
    margin-bottom: 0.6rem;
}
.lle-hero .lle-hero-lead2 {
    color: var(--c-ink);
    font-size: 1.05rem;
    line-height: 1.55;
    max-width: 52ch;
    margin-bottom: 1.25rem;
}
.lle-hero .lle-hero-body { font-size: 0.95rem; max-width: 54ch; margin-bottom: 0; }
.lle-hero-main > .wp-block-buttons { margin-top: 2.5rem !important; }

/* Foto en círculo + círculo de contorno solapado (tú y el cliente) */
.lle-hero-aside::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: min(300px, 70vw);
    aspect-ratio: 1;
    margin-left: calc(min(300px, 70vw) * -0.5 - min(300px, 70vw) * 0.42);
    border-radius: 50%;
    border: 2px solid rgba(40, 94, 168, 0.35);
    background-color: rgba(40, 94, 168, 0.04);
    pointer-events: none;
}
.lle-photo.wp-block-image {
    position: relative;
    z-index: 1;
    width: min(300px, 70vw);
    aspect-ratio: 1;
    margin: 0;
    border-radius: 50%;
    overflow: hidden;
    background: radial-gradient(circle at 50% 35%, #3B74C4 0%, var(--c-action) 55%, #1F4D8F 100%);
    box-shadow: 0 24px 60px rgba(40, 94, 168, 0.22);
}
.lle-photo.wp-block-image img {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 88%;
    height: auto;
    transform: translateX(-50%);
}
.lle-hero-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 440px;
    margin-top: -2.5rem !important;
    background-color: var(--c-white);
    border: 1px solid var(--c-border);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(17, 24, 39, 0.08);
    padding: 1.75rem 1.9rem;
}
.lle-hero-card .lle-card-title {
    color: var(--c-ink);
    font-size: 1.02rem;
    font-weight: 700;
    margin-bottom: 1.1rem;
}
.lle-checks { list-style: none; margin: 0; padding: 0; }
.lle-checks li {
    position: relative;
    padding-left: 1.85rem;
    margin: 0 0 0.85rem;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--c-muted);
}
.lle-checks li:last-child { margin-bottom: 0; }
.lle-checks li strong { color: var(--c-ink); font-weight: 600; }
.lle-checks li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.2rem;
    width: 16px;
    height: 16px;
    background-color: var(--c-action);
    -webkit-mask: var(--srv-ico-check) center / contain no-repeat;
            mask: var(--srv-ico-check) center / contain no-repeat;
}

/* ============================================================
   2 · UNA FORMA DIFERENTE DE TRABAJAR — 4 tarjetas + cita
   ============================================================ */
.lle-way-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}
.lle-way-grid > * { margin: 0 !important; }
.lle-way-card {
    position: relative;
    background-color: var(--c-white);
    border: 1px solid var(--c-border);
    border-radius: 14px;
    padding: 2rem 2rem 1.9rem calc(2rem + 46px + 1.25rem);
    transition: border-color 0.4s ease, box-shadow 0.5s ease;
}
.lle-way-card::before {                  /* círculo del icono */
    content: "";
    position: absolute;
    top: 1.8rem;
    left: 2rem;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1.5px solid rgba(40, 94, 168, 0.35);
    transition: background-color 0.35s ease, border-color 0.35s ease;
}
.lle-way-card::after {                   /* icono */
    content: "";
    position: absolute;
    top: calc(1.8rem + 12px);
    left: calc(2rem + 12px);
    width: 22px;
    height: 22px;
    background-color: var(--c-action);
    -webkit-mask: var(--lle-ico) center / contain no-repeat;
            mask: var(--lle-ico) center / contain no-repeat;
    transition: background-color 0.35s ease;
}
.lle-icon-user     { --lle-ico: var(--lle-ico-user); }
.lle-icon-building { --lle-ico: var(--lle-ico-building); }
.lle-icon-talk     { --lle-ico: var(--lle-ico-talk); }
.lle-icon-sliders  { --lle-ico: var(--lle-ico-sliders); }
.lle-way-card h3 { font-size: 1.12rem; margin-bottom: 0; padding-top: 0.25rem; }
.lle-way-card p  { font-size: 0.93rem; max-width: none; }

/* Cita: dos círculos que se unen y la frase */
.lle-quote.wp-block-quote {
    max-width: 880px;
    margin: clamp(4rem, 8vw, 6rem) auto 0 !important;
    padding: 0;
    border: none;
    text-align: center;
}
.lle-venn {
    position: relative;
    width: 96px;
    height: 56px;
    margin: 0 auto 1.75rem;
}
.lle-venn span {
    position: absolute;
    top: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid var(--c-action);
}
.lle-venn span:first-child { left: 0;  background-color: rgba(40, 94, 168, 0.10); }
.lle-venn span:last-child  { right: 0; background-color: rgba(40, 94, 168, 0.10); }
.lle-quote.wp-block-quote p {
    max-width: none;
    margin: 0 auto;
    color: var(--c-ink);
    font-size: clamp(1.35rem, 2.5vw, 1.95rem);
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

/* ============================================================
   MÓVIL Y TABLET
   ============================================================ */
@media (max-width: 781px) {
    .lle-hero-main.wp-block-column,
    .lle-hero-aside.wp-block-column { flex-basis: 100% !important; }
    .lle-hero h1 { max-width: none; }
    .lle-photo.wp-block-image,
    .lle-hero-aside::before { width: min(240px, 62vw); }
    .lle-hero-aside::before { margin-left: calc(min(240px, 62vw) * -0.5 - min(240px, 62vw) * 0.36); }
    .lle-way-grid { grid-template-columns: 1fr; }
    .lle-way-card { padding: calc(1.6rem + 46px + 1rem) 1.5rem 1.6rem; }
    .lle-way-card::before { top: 1.6rem; left: 1.5rem; }
    .lle-way-card::after  { top: calc(1.6rem + 12px); left: calc(1.5rem + 12px); }
}

/* ============================================================
   ANIMACIONES PROPIAS — «acercar»
   Usan el motor común (servicios-base.css): html.srv-motion, .srv-in,
   fotogramas srv* y fill «backwards».
   ============================================================ */
@keyframes lleFromX  { from { opacity: 0; transform: translateX(var(--lle-dx, -48px)); } to { opacity: 1; transform: none; } }
@keyframes lleCircle { from { opacity: 0; transform: translateX(-70px); } to { opacity: 1; transform: none; } }
@keyframes llePhoto  { from { opacity: 0; transform: scale(0.88); } to { opacity: 1; transform: none; } }
@keyframes lleVennL  { from { transform: translateX(-28px); } to { transform: none; } }
@keyframes lleVennR  { from { transform: translateX(28px); } to { transform: none; } }

/* ── 1 · Hero: las líneas del H1 llegan desde los lados; el círculo se acerca a la foto ── */
html.srv-motion .lle-hero:not(.srv-in) h1,
html.srv-motion .lle-hero:not(.srv-in) .lle-hero-lead,
html.srv-motion .lle-hero:not(.srv-in) .lle-hero-lead2,
html.srv-motion .lle-hero:not(.srv-in) .lle-hero-body,
html.srv-motion .lle-hero:not(.srv-in) .wp-block-buttons,
html.srv-motion .lle-hero-aside:not(.srv-in) .lle-photo,
html.srv-motion .lle-hero-aside:not(.srv-in)::before,
html.srv-motion .lle-hero-aside:not(.srv-in) .lle-hero-card { opacity: 0; }
html.srv-motion .lle-hero h1 .srv-line-in { animation: lleFromX 1.2s var(--ease-premium) calc(200ms + var(--i, 0) * 180ms) backwards; }
html.srv-motion .lle-hero h1 .srv-line:nth-child(even) .srv-line-in { --lle-dx: 48px; }
html.srv-motion .lle-hero.srv-in .lle-hero-lead     { animation: srvRise 1.3s var(--ease-premium)  700ms backwards; }
html.srv-motion .lle-hero.srv-in .lle-hero-lead2    { animation: srvRise 1.3s var(--ease-premium)  850ms backwards; }
html.srv-motion .lle-hero.srv-in .lle-hero-body     { animation: srvRise 1.3s var(--ease-premium) 1000ms backwards; }
html.srv-motion .lle-hero.srv-in .wp-block-buttons  { animation: srvRise 1.3s var(--ease-premium) 1150ms backwards; }
/* (la columna de la foto se activa aparte: en móvil va debajo del texto) */
html.srv-motion .lle-hero-aside.srv-in .lle-photo     { animation: llePhoto 1.3s var(--ease-premium) 200ms backwards; }
html.srv-motion .lle-hero-aside.srv-in::before        { animation: lleCircle 1.6s var(--ease-premium) 600ms backwards; }
html.srv-motion .lle-hero-aside.srv-in .lle-hero-card { animation: srvRise 1.2s var(--ease-premium) 1100ms backwards; }

/* ── 2 · Tarjetas: entran desde su lado y se encuentran en el centro ── */
html.srv-motion .lle-way-card:not(.srv-in) { opacity: 0; }
html.srv-motion .lle-way-card.srv-in { animation: lleFromX 1.3s var(--ease-premium) calc(var(--i, 0) * 180ms) backwards; }
html.srv-motion .lle-way-card:nth-child(even) { --lle-dx: 48px; }

/* Cita: los dos círculos se acercan hasta solaparse y aparece la frase */
html.srv-motion .lle-quote:not(.srv-in) .lle-venn,
html.srv-motion .lle-quote:not(.srv-in) p { opacity: 0; }
html.srv-motion .lle-quote.srv-in .lle-venn { animation: srvFade 0.8s ease backwards; }
html.srv-motion .lle-quote.srv-in .lle-venn span:first-child { animation: lleVennL 1.4s var(--ease-premium) 200ms backwards; }
html.srv-motion .lle-quote.srv-in .lle-venn span:last-child  { animation: lleVennR 1.4s var(--ease-premium) 200ms backwards; }
html.srv-motion .lle-quote.srv-in p { animation: srvRise 1.3s var(--ease-premium) 1100ms backwards; }

/* ── Interacción: ratón en PC / tarjeta del centro de la pantalla en móvil ── */
@media (hover: hover) {
    .lle-way-card:hover { border-color: rgba(40, 94, 168, 0.35); box-shadow: 0 12px 32px rgba(17, 24, 39, 0.05); }
    .lle-way-card:hover::before { background-color: var(--c-action); border-color: var(--c-action); }
    .lle-way-card:hover::after  { background-color: #ffffff; }
}
.lle-way-card.is-focus { border-color: rgba(40, 94, 168, 0.35); }
.lle-way-card.is-focus::before { background-color: var(--c-action); border-color: var(--c-action); }
.lle-way-card.is-focus::after  { background-color: #ffffff; }
