/**
 * Template: Preguntas Frecuentes RPMR — Frontend CSS v2
 * Colores adaptados al estilo de /servicios/ — sin tono dorado
 *
 * @package RPMR_Theme
 * @since 2.0.0
 */

/* ═══════════════════════════════════════════
   VARIABLES (valores por defecto,
   sobrescritos por el admin via <style>)
   ═══════════════════════════════════════════ */
:root {
    --pf-primary:      #0B1F3F;
    --pf-accent:       #1B4FBA;
    --pf-badge-bg:     #E8EEF9;
    --pf-badge-text:   #1B4FBA;
    --pf-cta-bg:       #0B1F3F;
    --pf-cta-btn-bg:   #FFFFFF;
    --pf-cta-btn-text: #0B1F3F;
    --pf-white:        #FFFFFF;
    --pf-gray-50:      #F8F9FA;
    --pf-gray-100:     #F1F3F5;
    --pf-gray-200:     #E9ECEF;
    --pf-gray-500:     #6C757D;
    --pf-gray-700:     #495057;
    --pf-gray-900:     #212529;
    --pf-radius:       10px;
    --pf-ease:         all 0.3s cubic-bezier(0.4,0,0.2,1);
    --pf-font:         'Inter','Segoe UI',system-ui,-apple-system,sans-serif;
    --pf-max-w:        1200px;
}

[class^="pf-"] *, [class^="pf-"] *::before, [class^="pf-"] *::after {
    box-sizing: border-box;
}

/* ═══════════════════════════════════════════
   HERO — padding reducido
   ═══════════════════════════════════════════ */
.pf-hero {
    position: relative;
    background: var(--pf-primary);
    background-size: cover;
    background-position: center;
    padding: 50px 0 40px;
    overflow: hidden;
}

.pf-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(11,31,63,.93) 0%,
        rgba(19,45,94,.87) 50%,
        rgba(27,79,186,.78) 100%);
    z-index: 1;
}

.pf-hero__inner {
    position: relative;
    z-index: 2;
    max-width: var(--pf-max-w);
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
}

.pf-hero__badge {
    display: inline-block;
    font-family: var(--pf-font);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: white;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    padding: 5px 18px;
    border-radius: 30px;
    margin-bottom: 14px;
}

.pf-hero__title {
    font-family: var(--pf-font);
    font-size: clamp(28px, 4.5vw, 44px);
    font-weight: 800;
    color: var(--pf-white);
    margin: 0 0 12px;
    line-height: 1.15;
}

.pf-hero__desc {
    font-family: var(--pf-font);
    font-size: 16px;
    color: rgba(255,255,255,.78);
    max-width: 580px;
    margin: 0 auto 20px;
    line-height: 1.6;
}

/* ── Breadcrumb ── */
.pf-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--pf-font);
    font-size: 13px;
    flex-wrap: wrap;
}

.pf-breadcrumb a {
    color: rgba(255,255,255,.65);
    text-decoration: none;
    transition: var(--pf-ease);
}

.pf-breadcrumb a:hover {
    color: var(--pf-white);
}

.pf-breadcrumb__sep {
    display: flex;
    align-items: center;
    color: rgba(255,255,255,.35);
}

.pf-breadcrumb__current {
    color: var(--pf-white);
    font-weight: 600;
}


/* ═══════════════════════════════════════════
   CONTENIDO EXTRA (wp_editor)
   ═══════════════════════════════════════════ */
.pf-extra-content {
    padding: 40px 0;
    background: var(--pf-white);
}

.pf-extra-content--bottom {
    background: var(--pf-gray-50);
}

.pf-extra-content__inner {
    max-width: var(--pf-max-w);
    margin: 0 auto;
    padding: 0 24px;
    font-family: var(--pf-font);
    font-size: 16px;
    line-height: 1.8;
    color: var(--pf-gray-700);
}

.pf-extra-content__inner h2,
.pf-extra-content__inner h3 {
    color: var(--pf-primary);
    margin-top: 0;
}

.pf-extra-content__inner img {
    max-width: 100%;
    height: auto;
    border-radius: var(--pf-radius);
}

.pf-extra-content__inner a {
    color: var(--pf-accent);
    font-weight: 600;
}


/* ═══════════════════════════════════════════
   FAQ ACCORDION + IMAGEN LATERAL
   ═══════════════════════════════════════════ */
.pf-faq {
    padding: 60px 0 70px;
    background: var(--pf-gray-50);
}

.pf-faq__wrap {
    max-width: var(--pf-max-w);
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
    align-items: start;
}

/* ── Accordion ── */
.pf-faq__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pf-faq__item {
    background: var(--pf-white);
    border-radius: var(--pf-radius);
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    border: 1px solid var(--pf-gray-200);
    overflow: hidden;
    transition: var(--pf-ease);
    animation: pfFadeUp .4s ease both;
}

.pf-faq__item:nth-child(1){animation-delay:.03s}
.pf-faq__item:nth-child(2){animation-delay:.06s}
.pf-faq__item:nth-child(3){animation-delay:.09s}
.pf-faq__item:nth-child(4){animation-delay:.12s}
.pf-faq__item:nth-child(5){animation-delay:.15s}
.pf-faq__item:nth-child(6){animation-delay:.18s}
.pf-faq__item:nth-child(7){animation-delay:.21s}
.pf-faq__item:nth-child(8){animation-delay:.24s}
.pf-faq__item:nth-child(9){animation-delay:.27s}
.pf-faq__item:nth-child(10){animation-delay:.30s}

.pf-faq__item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
    border-color: rgba(27,79,186,.15);
}

.pf-faq__item.is-active {
    border-color: var(--pf-accent);
    box-shadow: 0 4px 18px rgba(27,79,186,.1);
}

.pf-faq__q {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 18px 20px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: var(--pf-font);
    gap: 14px;
    transition: var(--pf-ease);
}

.pf-faq__q:hover { background: var(--pf-gray-50); }

.pf-faq__num {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pf-badge-bg);
    color: var(--pf-badge-text);
    font-weight: 700;
    font-size: 12px;
    border-radius: 50%;
    transition: var(--pf-ease);
}

.pf-faq__item.is-active .pf-faq__num {
    background: var(--pf-accent);
    color: var(--pf-white);
}

.pf-faq__q-text {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: var(--pf-gray-900);
    line-height: 1.45;
}

.pf-faq__icon {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pf-gray-100);
    border-radius: 50%;
    transition: var(--pf-ease);
    color: var(--pf-gray-500);
}

.pf-faq__item.is-active .pf-faq__icon {
    background: var(--pf-accent);
    color: var(--pf-white);
    transform: rotate(45deg);
}

/* ── Respuesta ── */
.pf-faq__a {
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s cubic-bezier(.4,0,.2,1), opacity .25s ease;
    opacity: 0;
}

.pf-faq__item.is-active .pf-faq__a { opacity: 1; }

.pf-faq__a-inner {
    padding: 0 20px 20px 68px;
    font-family: var(--pf-font);
    font-size: 14px;
    color: var(--pf-gray-700);
    line-height: 1.75;
    border-top: 1px solid var(--pf-gray-200);
    padding-top: 16px;
    margin: 0 20px;
    padding-left: 48px;
}

.pf-faq__a-inner a {
    color: var(--pf-accent);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: var(--pf-ease);
}

.pf-faq__a-inner a:hover { border-bottom-color: var(--pf-accent); }

.pf-faq__a-inner ul, .pf-faq__a-inner ol {
    padding-left: 18px;
    margin: 8px 0;
}

.pf-faq__empty {
    text-align: center;
    color: var(--pf-gray-500);
    font-style: italic;
    padding: 30px 0;
}

/* ── Imagen lateral ── */
.pf-faq__side {
    position: sticky;
    top: 90px;
}

.pf-faq__side-img {
width: 250px;
  height: auto;
  display: block;
  border-radius: var(--pf-radius);
  object-fit: cover;
  will-change: transform;
}
/* Tablet */
@media (max-width: 1024px) {
  .pf-faq__side-img {
    width: 150px;
  }
}

/* Móvil */
@media (max-width: 767px) {
  .pf-faq__side-img {
    width: 100px;
  }
}

.pf-faq__side-placeholder {
    background: var(--pf-gray-100);
    border: 2px dashed var(--pf-gray-200);
    border-radius: var(--pf-radius);
    padding: 60px 20px;
    text-align: center;
    color: var(--pf-gray-500);
    font-family: var(--pf-font);
    font-size: 13px;
}

.pf-faq__side-placeholder svg {
    margin-bottom: 12px;
    color: var(--pf-gray-200);
}

.pf-faq__side-placeholder p {
    margin: 0;
    line-height: 1.5;
}


/* ═══════════════════════════════════════════
   CTA
   ═══════════════════════════════════════════ */
.pf-cta {
    padding: 50px 0;
    background: linear-gradient(135deg, var(--pf-cta-bg) 0%, color-mix(in srgb, var(--pf-cta-bg), #1B4FBA 30%) 100%);
}

.pf-cta__wrap {
    max-width: var(--pf-max-w);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.pf-cta__title {
    font-family: var(--pf-font);
    font-size: clamp(22px,3vw,28px);
    font-weight: 700;
    color: var(--pf-white);
    margin: 0 0 8px;
}

.pf-cta__desc {
    font-family: var(--pf-font);
    font-size: 15px;
    color: rgba(255,255,255,.72);
    margin: 0;
    line-height: 1.6;
}

.pf-cta__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--pf-cta-btn-bg);
    color: var(--pf-cta-btn-text);
    font-family: var(--pf-font);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 8px;
    transition: var(--pf-ease);
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    white-space: nowrap;
    flex-shrink: 0;
}

.pf-cta__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,.2);
    opacity: .92;
    color: var(--pf-cta-btn-text);
    text-decoration: none;
}

.pf-cta__btn svg { flex-shrink: 0; }


/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */

@media (max-width: 992px) {
    .pf-faq__wrap {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .pf-faq__side {
        position: static;
        max-width: 400px;
        margin: 0 auto;
        order: -1;
    }
}

@media (max-width: 768px) {
    .pf-hero {
        padding: 40px 0 30px;
    }
    .pf-hero__title {
        font-size: clamp(24px, 5vw, 32px);
    }
    .pf-hero__desc {
        font-size: 14px;
        margin-bottom: 16px;
    }
    .pf-faq {
        padding: 40px 0 50px;
    }
    .pf-faq__wrap {
        padding: 0 16px;
    }
    .pf-faq__q {
        padding: 15px 16px;
        gap: 10px;
    }
    .pf-faq__q-text {
        font-size: 14px;
    }
    .pf-faq__a-inner {
        padding: 12px 16px 16px;
        margin: 0 16px;
        padding-left: 16px;
    }
    .pf-cta__wrap {
        flex-direction: column;
        text-align: center;
        padding: 0 16px;
    }
    .pf-cta__btn {
        width: 100%;
        justify-content: center;
    }
    .pf-extra-content__inner {
        padding: 0 16px;
    }
}

@media (max-width: 480px) {
    .pf-hero {
        padding: 30px 0 24px;
    }
    .pf-hero__badge {
        font-size: 10px;
        letter-spacing: 1.5px;
        padding: 4px 14px;
    }
    .pf-hero__title {
        font-size: 22px;
    }
    .pf-hero__desc {
        font-size: 13px;
    }
    .pf-breadcrumb {
        font-size: 11px;
    }
    .pf-faq__num {
        display: none;
    }
    .pf-faq__a-inner {
        padding-left: 12px;
    }
    .pf-faq__side {
        max-width: 100%;
    }
}


/* ═══════════════════════════════════════════
   ANIMACIÓN
   ═══════════════════════════════════════════ */
@keyframes pfFadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}


/* ═══════════════════════════════════════════
   ACCESIBILIDAD
   ═══════════════════════════════════════════ */
.pf-faq__q:focus-visible {
    outline: 3px solid var(--pf-accent);
    outline-offset: 2px;
    border-radius: var(--pf-radius);
}

@media (prefers-reduced-motion: reduce) {
    .pf-faq__item { animation: none; }
    .pf-faq__a { transition: none; }
    .pf-faq__icon { transition: none; }
}


/* ═══════════════════════════════════════════
   PRINT
   ═══════════════════════════════════════════ */
@media print {
    .pf-hero__overlay { display: none; }
    .pf-faq__a { max-height: none !important; opacity: 1 !important; }
    .pf-faq__icon { display: none; }
    .pf-cta { background: #f5f5f5 !important; }
    .pf-cta__title, .pf-cta__desc { color: #333 !important; }
}


