/*
 * Solufin — Plantillas de WordPress
 * Aviso de Privacidad, Centro de Ayuda, paginas genericas, 404 y listados.
 * Se carga despues de solufin-theme.css, que ya trae base, header y footer.
 * Desarrollado por Codesmic · codesmic.com
 */

/* SUBHERO */
.subhero {
    background-color: var(--vino);
    background-image: linear-gradient(95deg, rgba(53,10,13,0.93) 0%, rgba(77,14,18,0.78) 50%, rgba(77,14,18,0.45) 100%), url('../img/hero/facilcard-banner.jpg');
    background-size: cover; background-position: center;
    color: white; padding: 4.5rem 2rem 5rem; position: relative; overflow: hidden;
}
.subhero-content { max-width: 1280px; margin: 0 auto; position: relative; z-index: 1; }
.breadcrumb { display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; color: rgba(255,255,255,0.55); margin-bottom: 1.2rem; }
.breadcrumb a { color: rgba(255,255,255,0.7); text-decoration: none; transition: color 0.2s; }
.breadcrumb a:hover { color: white; }
.breadcrumb .sep { color: rgba(255,255,255,0.3); }
.subhero-eyebrow { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.78rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: #ff8585; margin-bottom: 0.8rem; }
.subhero-eyebrow::before { content: ''; width: 24px; height: 2px; background: var(--rojo); }
/* El color va en el h1 y no heredado de .subhero: Astra declara color para
   h1 y un valor explicito le gana siempre a la herencia. Sin esto el titulo
   sale gris sobre el vino. Mismo caso en .hero h1 de solufin-theme.css. */
.subhero h1 { color: #fff; font-family: 'Poppins', sans-serif; font-size: 3rem; font-weight: 800; letter-spacing: -1.5px; margin-bottom: 0.8rem; line-height: 1.05; }
.subhero h1 span { color: #ff7a7a; }
.subhero p { font-size: 1.1rem; color: rgba(255,255,255,0.82); max-width: 620px; line-height: 1.6; }
.last-update { display: inline-block; margin-top: 1rem; padding: 0.4rem 0.9rem; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); border-radius: 100px; font-size: 0.78rem; color: rgba(255,255,255,0.7); }

/* RESPONSABLE CARD */
.responsable-wrap { max-width: 1280px; margin: -3rem auto 0; padding: 0 2rem; position: relative; z-index: 5; }
.responsable-card {
    background: white; border-radius: 18px;
    box-shadow: 0 20px 50px -20px rgba(0,0,0,0.18);
    border: 1px solid var(--border);
    padding: 2rem 2.4rem;
    display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center;
}
.responsable-head .small-eyebrow { font-size: 0.7rem; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; color: var(--rojo); margin-bottom: 0.4rem; display: block; }
.responsable-head h2 { font-family: 'Poppins', sans-serif; font-size: 1.4rem; font-weight: 800; color: var(--carbon); letter-spacing: -0.4px; margin-bottom: 0.4rem; }
.responsable-head p { color: var(--muted); font-size: 0.9rem; line-height: 1.55; }
.responsable-data { display: grid; gap: 0.7rem; }
.resp-item { display: flex; align-items: flex-start; gap: 0.8rem; font-size: 0.88rem; }
.resp-icon { width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; background: linear-gradient(135deg, #fef2f2, #fde8e8); display: flex; align-items: center; justify-content: center; }
.resp-icon svg { width: 16px; height: 16px; stroke: var(--rojo); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.resp-text strong { display: block; font-size: 0.68rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--rojo); margin-bottom: 0.15rem; }
.resp-text span { color: var(--carbon); font-weight: 500; line-height: 1.5; }

/* CONTENT LAYOUT */
.privacy { max-width: 1280px; margin: 4rem auto; padding: 0 2rem; display: grid; grid-template-columns: 260px 1fr; gap: 4rem; align-items: start; }
.privacy-toc { position: sticky; top: 6rem; }
.privacy-toc .small-eyebrow { font-size: 0.7rem; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; color: var(--rojo); margin-bottom: 0.7rem; display: block; }
.privacy-toc-title { font-family: 'Poppins', sans-serif; font-size: 1.05rem; font-weight: 700; color: var(--carbon); margin-bottom: 1rem; }
.privacy-toc ol { list-style: none; counter-reset: toc-num; }
.privacy-toc li { counter-increment: toc-num; margin-bottom: 0.55rem; }
.privacy-toc a { display: flex; align-items: flex-start; gap: 0.65rem; padding: 0.45rem 0.5rem; color: var(--muted); text-decoration: none; font-size: 0.86rem; line-height: 1.4; border-radius: 7px; transition: all 0.2s ease; border-left: 2px solid transparent; }
.privacy-toc a::before { content: counter(toc-num, decimal-leading-zero); font-family: 'Poppins', sans-serif; font-weight: 700; color: var(--rojo); font-size: 0.78rem; min-width: 22px; }
.privacy-toc a:hover { background: white; color: var(--carbon); border-left-color: var(--rojo); padding-left: 0.7rem; }

.privacy-content { display: grid; gap: 1.5rem; }
.privacy-section {
    background: white; border: 1px solid var(--border); border-radius: 16px;
    padding: 2rem 2.2rem;
    scroll-margin-top: 5rem;
    transition: border-color 0.2s ease;
}
.privacy-section:hover { border-color: rgba(192,0,0,0.18); }
.privacy-section h3 { font-family: 'Poppins', sans-serif; font-size: 1.3rem; font-weight: 700; color: var(--carbon); margin-bottom: 1rem; letter-spacing: -0.3px; display: flex; align-items: baseline; gap: 0.7rem; }
.privacy-section h3 span { font-family: 'Poppins', sans-serif; font-weight: 800; color: var(--rojo); font-size: 0.88rem; letter-spacing: 1.5px; }
.privacy-section p { color: var(--muted); font-size: 0.96rem; margin-bottom: 0.9rem; }
.privacy-section p:last-child { margin-bottom: 0; }
.privacy-section ul { list-style: none; margin: 0.4rem 0 0.9rem; }
.privacy-section li { padding: 0.35rem 0 0.35rem 1.4rem; color: var(--muted); font-size: 0.95rem; position: relative; }
.privacy-section li::before { content: ''; position: absolute; left: 0; top: 0.95rem; width: 8px; height: 1.5px; background: var(--rojo); }
.privacy-section strong { color: var(--carbon); font-weight: 600; }
.privacy-section a { color: var(--rojo); text-decoration: none; font-weight: 600; }
.privacy-section a:hover { text-decoration: underline; }

/* Disclaimer */
.disclaimer {
    background: linear-gradient(135deg, rgba(192,0,0,0.04) 0%, rgba(192,0,0,0.01) 100%);
    border: 1px solid rgba(192,0,0,0.2);
    border-radius: 14px;
    padding: 1.3rem 1.6rem;
    display: flex; gap: 1rem; align-items: flex-start;
    margin-bottom: 1.5rem;
}
.disclaimer-icon { width: 36px; height: 36px; border-radius: 9px; background: var(--rojo); color: white; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-family: 'Poppins', sans-serif; font-weight: 800; }
.disclaimer-text { font-size: 0.88rem; color: var(--carbon); line-height: 1.6; }
.disclaimer-text strong { color: var(--rojo); font-weight: 700; }

/* FAQ SECTION */
.faq { max-width: 1280px; margin: 0 auto; padding: 5rem 2rem; display: grid; grid-template-columns: 280px 1fr; gap: 4rem; align-items: start; }
.faq-side { position: sticky; top: 6rem; }
.faq-side .small-eyebrow { font-size: 0.72rem; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; color: var(--rojo); margin-bottom: 0.5rem; display: block; }
.faq-side h2 { font-family: 'Poppins', sans-serif; font-size: 1.6rem; font-weight: 800; color: var(--carbon); letter-spacing: -0.5px; line-height: 1.1; margin-bottom: 0.7rem; }
.faq-side p { color: var(--muted); font-size: 0.93rem; line-height: 1.65; margin-bottom: 1.4rem; }
.faq-count { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.9rem; background: white; border: 1px solid var(--border); border-radius: 100px; font-size: 0.78rem; font-weight: 600; color: var(--carbon); }
.faq-count strong { color: var(--rojo); font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 1rem; }

.faq-items { display: grid; gap: 0.85rem; }
.faq-item {
    background: white; border: 1px solid var(--border); border-radius: 14px;
    overflow: hidden; transition: all 0.3s ease;
}
.faq-item:hover { border-color: rgba(192,0,0,0.2); box-shadow: 0 6px 18px -8px rgba(77,14,18,0.1); }
.faq-item[open] { border-color: rgba(192,0,0,0.35); box-shadow: 0 10px 30px -10px rgba(77,14,18,0.15); }
.faq-q { display: flex; align-items: center; gap: 1.1rem; padding: 1.3rem 1.5rem; cursor: pointer; list-style: none; transition: background 0.2s ease; }
.faq-q::-webkit-details-marker { display: none; }
.faq-q:hover { background: rgba(192,0,0,0.025); }
.faq-num { font-family: 'Poppins', sans-serif; font-size: 1.05rem; font-weight: 800; color: var(--rojo); min-width: 32px; flex-shrink: 0; }
.faq-q-text { flex: 1; font-family: 'Poppins', sans-serif; font-size: 1.08rem; font-weight: 600; color: var(--carbon); }
.faq-toggle { width: 32px; height: 32px; border-radius: 50%; background: var(--bg); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.3s ease; }
.faq-toggle svg { width: 14px; height: 14px; stroke: var(--rojo); fill: none; stroke-width: 2.2; transition: transform 0.3s ease; }
.faq-item[open] .faq-toggle { background: var(--rojo); }
.faq-item[open] .faq-toggle svg { stroke: white; transform: rotate(45deg); }
.faq-a { padding: 0 1.5rem 1.5rem 5rem; color: var(--muted); font-size: 0.97rem; line-height: 1.75; }
.faq-a p { margin: 0; }

/* CTA Final */
.ayuda-cta-wrap { max-width: 1280px; margin: 0 auto 5rem; padding: 0 2rem; }
.ayuda-cta {
    background-color: var(--vino);
    background-image:
        radial-gradient(circle at 85% 15%, rgba(192,0,0,0.35) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.05' stroke-width='2'%3E%3Cpath d='M0 40h20v-20h20v20h20v-20h20M0 60h20v-20M40 60v-20h20v40'/%3E%3C/g%3E%3C/svg%3E");
    color: white; border-radius: 22px; padding: 3.5rem 3rem;
    display: grid; grid-template-columns: 1.4fr 1fr; gap: 2.5rem; align-items: center;
    position: relative; overflow: hidden;
    box-shadow: 0 20px 50px -18px rgba(77,14,18,0.4);
}
.ayuda-cta::before { content: ''; position: absolute; top: 0; left: 0; bottom: 0; width: 5px; background: linear-gradient(180deg, var(--rojo) 0%, transparent 100%); }
.ayuda-cta-content { position: relative; z-index: 1; }
.ayuda-cta-content .small-eyebrow { font-size: 0.72rem; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; color: #ff8585; margin-bottom: 0.6rem; display: block; }
.ayuda-cta h3 { color: #fff; font-family: 'Poppins', sans-serif; font-size: 2rem; font-weight: 800; letter-spacing: -0.6px; margin-bottom: 0.7rem; line-height: 1.1; }
.ayuda-cta p { color: rgba(255,255,255,0.82); font-size: 1rem; line-height: 1.65; }
.ayuda-cta-actions { display: flex; flex-direction: column; gap: 0.6rem; position: relative; z-index: 1; }
.ayuda-cta .cta-white { background: white; color: var(--vino); padding: 1rem 1.6rem; border-radius: 10px; text-decoration: none; font-weight: 700; font-size: 0.95rem; transition: all 0.3s ease; text-align: center; }
.ayuda-cta .cta-white:hover { background: var(--rojo); color: white; transform: translateY(-3px); box-shadow: 0 8px 18px rgba(192,0,0,0.5); }
.ayuda-cta .cta-ghost { background: transparent; color: white; padding: 1rem 1.6rem; border: 1.5px solid rgba(255,255,255,0.3); border-radius: 10px; text-decoration: none; font-weight: 600; font-size: 0.93rem; transition: all 0.3s ease; text-align: center; }
.ayuda-cta .cta-ghost:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.5); }

/* ── Responsive de interiores ──
 * Los cuatro layouts de dos columnas de estas paginas colapsan aqui. Este
 * bloque se habia perdido al extraer el CSS de los HTML del diseño, y en su
 * lugar habia quedado HTML crudo: el parser lo descartaba y estas paginas se
 * quedaban sin responsive. El Aviso de Privacidad se desbordaba en telefono y
 * el Centro de Ayuda dejaba una columna vacia.
 */
@media (max-width: 900px) {
    .privacy { grid-template-columns: 1fr; gap: 2.2rem; margin: 3rem auto; }
    .privacy-toc { position: static; top: auto; }
    .faq { grid-template-columns: 1fr; gap: 2.2rem; padding: 3.5rem 2rem; }
    .faq-side { position: static; top: auto; }
    .responsable-card { grid-template-columns: 1fr; gap: 1.6rem; align-items: start; }
    .ayuda-cta { grid-template-columns: 1fr; gap: 2rem; padding: 2.8rem 2rem; }
}

@media (max-width: 560px) {
    .subhero { padding: 3rem 1.25rem 3.5rem; }
    .subhero h1 { font-size: 2.1rem; letter-spacing: -1px; }
    .subhero p { font-size: 1rem; }
    .breadcrumb { font-size: 0.76rem; }

    .responsable-wrap { padding: 0 1.25rem; margin-top: -2rem; }
    .responsable-card { padding: 1.6rem 1.4rem; }
    /* Los correos y domicilios largos partian la caja en pantallas angostas. */
    .resp-text span { overflow-wrap: anywhere; }

    .privacy { padding: 0 1.25rem; }
    .privacy-section { padding: 1.5rem 1.35rem; }
    .privacy-section h3 { font-size: 1.15rem; }

    .faq { padding: 3rem 1.25rem; }
    .faq-side h2 { font-size: 1.4rem; }
    .faq-q { padding: 1.1rem; gap: 0.8rem; }
    .faq-q-text { font-size: 1rem; }
    /* En escritorio la respuesta se sangra 5rem para alinearla con la pregunta.
       En telefono esa sangria se come media pantalla. */
    .faq-a { padding: 0 1.1rem 1.3rem; }

    .ayuda-cta-wrap { padding: 0 1.25rem; margin-bottom: 3.5rem; }
    .ayuda-cta { padding: 2.2rem 1.5rem; border-radius: 18px; }
    .ayuda-cta h3 { font-size: 1.6rem; }
}

/* ══════════════ FORMULARIO — estados de WordPress ══════════════
 * El diseño aprobado trae el formulario sin envío real. Al pasarlo a
 * WordPress aparecen tres estados que el diseño no contemplaba:
 * consentimiento, error y acuse de recibo.
 */
.form-consent {
    margin-top: 0.9rem;
    font-size: 0.8rem; line-height: 1.5; color: var(--muted); text-align: center;
}
.form-consent a { color: var(--rojo); text-decoration: none; font-weight: 600; }
.form-consent a:hover { text-decoration: underline; }

.form-error {
    margin-top: 1rem; padding: 0.85rem 1rem;
    background: #FDF3F3; border: 1px solid #f0c9c9; border-radius: 8px;
    font-size: 0.85rem; color: #8c1414;
}
.form-error a { color: #8c1414; font-weight: 600; }

.contact-form--success { text-align: center; padding: 3.5rem 2.5rem; }
.contact-form--success h3 {
    font-family: 'Poppins', sans-serif; font-size: 1.6rem; font-weight: 700;
    color: var(--rojo); margin-bottom: 0.6rem;
}
.contact-form--success p { color: var(--muted); }

/* ══════════════ PAGINAS GENERICAS ══════════════
 * page.php, single.php e index.php. Contenido de Elementor y del editor
 * de WordPress renderizado dentro del header y footer de Solufin.
 */
.solufin-page { background: var(--bg); padding: 4rem 2rem 5rem; }
.solufin-page__container { max-width: 860px; margin: 0 auto; }
.solufin-page__content {
    background: white; border: 1px solid var(--border); border-radius: 16px;
    padding: 3rem; color: var(--text); line-height: 1.75;
}
.solufin-page__content > *:first-child { margin-top: 0; }
.solufin-page__content h2,
.solufin-page__content h3 {
    font-family: 'Poppins', sans-serif; color: var(--carbon);
    letter-spacing: -0.5px; margin: 2.2rem 0 0.8rem;
}
.solufin-page__content h2 { font-size: 1.5rem; font-weight: 700; }
.solufin-page__content h3 { font-size: 1.2rem; font-weight: 600; }
.solufin-page__content p { margin-bottom: 1.1rem; }
.solufin-page__content ul, .solufin-page__content ol { margin: 0 0 1.1rem 1.3rem; }
.solufin-page__content li { margin-bottom: 0.45rem; }
.solufin-page__content a { color: var(--rojo); }
.solufin-page__content img { max-width: 100%; height: auto; border-radius: 10px; }
.solufin-page__links { margin-top: 2rem; text-align: center; }
.solufin-page__links a { color: var(--rojo); text-decoration: none; font-weight: 600; }

.solufin-list { display: grid; gap: 1.2rem; }
.solufin-list__item {
    background: white; border: 1px solid var(--border); border-radius: 14px;
    padding: 1.75rem 2rem; transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.solufin-list__item:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(0,0,0,0.07); }
.solufin-list__title { font-family: 'Poppins', sans-serif; font-size: 1.25rem; font-weight: 700; margin-bottom: 0.35rem; }
.solufin-list__title a { color: var(--carbon); text-decoration: none; }
.solufin-list__title a:hover { color: var(--rojo); }
.solufin-list__meta { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.7rem; }
.solufin-list__excerpt { color: var(--muted); }

/* ══════════════ 404 ══════════════
 * Cabe en una sola pantalla — sin scroll.
 */
.solufin-404 {
    min-height: calc(100vh - 78px);
    display: flex; align-items: center; justify-content: center;
    padding: 3rem 2rem;
    background-color: var(--vino);
    background-image:
        linear-gradient(95deg, rgba(53,10,13,0.95) 0%, rgba(77,14,18,0.85) 55%, rgba(77,14,18,0.6) 100%),
        url('../img/hero/facilcard-banner.jpg');
    background-size: cover; background-position: center;
    color: white;
}
.solufin-404__inner { max-width: 620px; text-align: center; }
.solufin-404__code {
    font-family: 'Poppins', sans-serif; font-size: clamp(4.5rem, 14vw, 7rem);
    font-weight: 800; line-height: 1; letter-spacing: -4px; color: #ff7a7a;
}
.solufin-404__title {
    /* Sin color propio, Astra pinta el h1 gris sobre el vino. */
    color: #fff;
    font-family: 'Poppins', sans-serif; font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 700; letter-spacing: -1px; margin: 0.6rem 0 0.9rem;
}
.solufin-404__lede { color: rgba(255,255,255,0.8); margin-bottom: 2rem; }
.solufin-404__ctas { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.solufin-404__mail {
    display: inline-block; margin-top: 1.8rem;
    color: rgba(255,255,255,0.6); font-size: 0.85rem; text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.25); padding-bottom: 2px;
}
.solufin-404__mail:hover { color: white; border-color: white; }

@media (max-width: 768px) {
    .solufin-page { padding: 2.5rem 1.25rem 3.5rem; }
    .solufin-page__content { padding: 1.75rem 1.35rem; }
    .solufin-404 { min-height: calc(100vh - 70px); padding: 2.5rem 1.25rem; }
    .solufin-404__ctas { flex-direction: column; }
    .solufin-404__ctas a { width: 100%; }
}
