/**
 * TGP FAQ Pro — Estilos v2.1
 * Sin !important en propiedades controlables por Elementor.
 * Especificidad via selector doble .tgp-faq-wrap para ganar al tema WP.
 */

/* ══════════════════════════════════════════════
   CSS VARIABLES (override via Elementor selectors)
══════════════════════════════════════════════ */
.tgp-faq-wrap {
    --tgp-faq-accent:  #667eea;
    --tgp-faq-accent2: #764ba2;
    font-family: inherit;
}

/* ══════════════════════════════════════════════
   ENCABEZADO
══════════════════════════════════════════════ */
.tgp-faq-header { margin-bottom: 40px; }

.tgp-faq-badge {
    display: inline-block;
    background: var(--tgp-faq-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 4px 14px;
    border-radius: 30px;
    margin-bottom: 14px;
    line-height: 1.5;
}
.tgp-faq-title {
    font-size: clamp(22px, 4vw, 34px);
    font-weight: 700;
    color: #111827;
    line-height: 1.25;
    margin: 0 0 12px;
}
.tgp-faq-subtitle {
    font-size: 16px;
    color: #6b7280;
    line-height: 1.6;
    margin: 0 auto;
    max-width: 560px;
}

/* ══════════════════════════════════════════════
   BUSCADOR
══════════════════════════════════════════════ */
.tgp-faq-search-wrap {
    position: relative;
    margin-bottom: 24px;
    max-width: 520px;
}
.tgp-faq-header[style*="center"] + .tgp-faq-search-wrap,
.tgp-faq-header .tgp-faq-search-wrap { margin-left: auto; margin-right: auto; }

.tgp-faq-search-icon {
    position: absolute; left: 14px; top: 50%;
    transform: translateY(-50%);
    color: #9ca3af; pointer-events: none; display: flex; line-height: 0;
}
/* Especificidad alta para ganar al tema en el input */
.tgp-faq-wrap .tgp-faq-search-input {
    -webkit-appearance: none; appearance: none;
    display: block; width: 100%;
    padding: 12px 42px;
    background: #f9fafb; border: 2px solid #e5e7eb;
    border-radius: 12px; font-size: 14px;
    color: #111827;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box; line-height: 1.5;
    margin: 0; outline: none;
}
.tgp-faq-wrap .tgp-faq-search-input::placeholder { color: #9ca3af; }
.tgp-faq-wrap .tgp-faq-search-input:focus {
    outline: none;
    border-color: var(--tgp-faq-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--tgp-faq-accent) 18%, transparent);
}
.tgp-faq-search-clear {
    all: unset;
    position: absolute; right: 12px; top: 50%;
    transform: translateY(-50%);
    cursor: pointer; color: #9ca3af;
    display: flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; border-radius: 50%;
    transition: background 0.15s, color 0.15s; line-height: 0;
}
.tgp-faq-search-clear:hover { background: #f3f4f6; color: #374151; }
.tgp-faq-search-clear[hidden] { display: none; }

/* ══════════════════════════════════════════════
   TABS
══════════════════════════════════════════════ */
.tgp-faq-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.tgp-faq-wrap .tgp-faq-tab {
    all: unset;
    cursor: pointer; padding: 8px 20px;
    border-radius: 30px; font-size: 13px; font-weight: 600;
    color: #6b7280; background: #f3f4f6;
    border: 2px solid transparent;
    transition: all 0.2s; white-space: nowrap; line-height: 1.4; display: inline-block;
    box-sizing: border-box;
}
.tgp-faq-wrap .tgp-faq-tab:hover { background: #ede9fe; color: var(--tgp-faq-accent); }
.tgp-faq-wrap .tgp-faq-tab.is-active {
    background: var(--tgp-faq-accent); color: #fff; border-color: var(--tgp-faq-accent);
}

/* ══════════════════════════════════════════════
   LAYOUTS
══════════════════════════════════════════════ */
.tgp-faq-list { display: flex; flex-direction: column; gap: 10px; }
.tgp-faq-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; align-items: start; }
@media (max-width: 640px) { .tgp-faq-grid { grid-template-columns: 1fr; } }

/* ══════════════════════════════════════════════
   ÍTEM BASE
══════════════════════════════════════════════ */
.tgp-faq-item {
    position: relative;
    overflow: hidden;
    transition: border-color 0.25s, box-shadow 0.25s, background-color 0.25s;
    list-style: none; margin: 0; padding: 0;
}
.tgp-faq-item[data-hidden] { display: none; }

/* ══════════════════════════════════════════════
   BOTÓN PREGUNTA
   Especificidad 3 clases para ganar a body button, .entry-content button, etc.
   Sin !important — para que Elementor pueda overridear con sus selectors.
   Solo usamos !important en propiedades que el tema puede arruinar visualmente
   (background-image, text-decoration, filter, outline) que Elementor NO controla.
══════════════════════════════════════════════ */
.tgp-faq-wrap .tgp-faq-item .tgp-faq-question {
    -webkit-appearance: none !important;
    appearance: none !important;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
    text-align: left;
    background-color: transparent;
    background-image: none !important;
    border: none !important;
    border-radius: 0 !important;
    outline: none !important;
    box-shadow: none;
    padding: 18px 20px;
    margin: 0;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    line-height: inherit;
    text-transform: none !important;
    letter-spacing: normal !important;
    text-decoration: none !important;
    text-shadow: none !important;
    filter: none !important;
    opacity: 1;
    vertical-align: top;
    transition: background-color 0.18s;
}
.tgp-faq-wrap .tgp-faq-item .tgp-faq-question:hover {
    background-color: rgba(0,0,0,0.025);
    background-image: none !important;
    color: inherit;
    border: none !important;
    box-shadow: none !important;
    text-decoration: none !important;
    outline: none !important;
    filter: none !important;
}
.tgp-faq-wrap .tgp-faq-item .tgp-faq-question:focus { outline: none !important; box-shadow: none; }
.tgp-faq-wrap .tgp-faq-item .tgp-faq-question:focus-visible {
    outline: 2px solid var(--tgp-faq-accent) !important;
    outline-offset: -2px !important;
}
.tgp-faq-wrap .tgp-faq-item .tgp-faq-question:hover .tgp-faq-question-text {
    text-decoration: none !important;
}

.tgp-faq-question-inner { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.tgp-faq-q-icon { flex-shrink: 0; color: var(--tgp-faq-accent); font-size: 16px; line-height: 1; display: flex; }

.tgp-faq-question-text {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
    flex: 1;
    transition: color 0.2s;
    margin: 0; padding: 0;
    text-transform: none !important;
    letter-spacing: normal !important;
}
.tgp-faq-item.is-open .tgp-faq-question-text { color: var(--tgp-faq-accent); }

.tgp-faq-item-badge {
    flex-shrink: 0; font-size: 10px; font-weight: 700;
    letter-spacing: 0.5px; text-transform: uppercase;
    color: #fff; padding: 2px 8px; border-radius: 20px;
    line-height: 1.5; display: inline-block;
}

/* ══════════════════════════════════════════════
   ÍCONOS ACORDEÓN
══════════════════════════════════════════════ */
.tgp-faq-icon {
    flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    color: #adb5bd; line-height: 0; transition: color 0.2s;
}
.tgp-faq-item.is-open .tgp-faq-icon { color: var(--tgp-faq-accent); }

.tgp-faq-icon-svg { transition: transform 0.28s cubic-bezier(0.4,0,0.2,1); display: block; }
.tgp-faq-item.is-open .tgp-faq-icon-svg { transform: rotate(180deg); }

.tgp-faq-icon-plus { position: relative; width: 16px; height: 16px; display: block; }
.tgp-faq-icon-plus .icon-plus  { position: absolute; inset: 0; transition: opacity 0.2s, transform 0.2s; display: block; }
.tgp-faq-icon-plus .icon-minus { position: absolute; inset: 0; opacity: 0; transform: scale(0.8); transition: opacity 0.2s, transform 0.2s; display: block; }
.tgp-faq-item.is-open .tgp-faq-icon-plus .icon-plus  { opacity: 0; transform: scale(0.8); }
.tgp-faq-item.is-open .tgp-faq-icon-plus .icon-minus { opacity: 1; transform: scale(1); }

.tgp-faq-icon-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #d1d5db; transition: background 0.2s, transform 0.2s; display: block;
}
.tgp-faq-item.is-open .tgp-faq-icon-dot { background: var(--tgp-faq-accent); transform: scale(1.4); }

.tgp-faq-icon-custom-open   { display: none; }
.tgp-faq-icon-custom-closed { display: block; }
.tgp-faq-item.is-open .tgp-faq-icon-custom-open   { display: block; }
.tgp-faq-item.is-open .tgp-faq-icon-custom-closed { display: none; }

/* ══════════════════════════════════════════════
   SEPARADOR Y RESPUESTA
══════════════════════════════════════════════ */
.tgp-faq-divider { border: none; border-top: 1px solid #f0f0f0; margin: 0 20px; }
.tgp-faq-answer { overflow: hidden; }
.tgp-faq-answer[hidden] { display: block !important; height: 0 !important; visibility: hidden; }
.tgp-faq-answer-inner {
    padding: 4px 20px 20px; font-size: 14px; color: #4b5563; line-height: 1.75;
}
.tgp-faq-answer-inner > *:first-child { margin-top: 0; }
.tgp-faq-answer-inner > *:last-child  { margin-bottom: 0; }
.tgp-faq-answer-inner a { color: var(--tgp-faq-accent); text-decoration: underline; }
.tgp-faq-answer-inner ul, .tgp-faq-answer-inner ol { padding-left: 20px; margin: 8px 0; }
.tgp-faq-answer-inner li { margin-bottom: 4px; }

/* ══════════════════════════════════════════════
   SIN RESULTADOS / HIGHLIGHT
══════════════════════════════════════════════ */
.tgp-faq-no-results {
    display: flex; flex-direction: column; align-items: center;
    gap: 12px; padding: 48px 20px; text-align: center;
    color: #9ca3af; grid-column: 1 / -1;
}
.tgp-faq-no-results[hidden] { display: none; }
.tgp-faq-no-results p { font-size: 14px; margin: 0; color: #9ca3af; }
.tgp-faq-highlight {
    background: color-mix(in srgb, var(--tgp-faq-accent) 15%, transparent);
    color: var(--tgp-faq-accent); border-radius: 3px; padding: 0 2px; font-weight: 700;
}


/* ══════════════════════════════════════════════
   ESTILO 01 — CLASSIC
   Solo líneas. Sin cajas. Fondo transparente.
══════════════════════════════════════════════ */
.tgp-faq-style-classic .tgp-faq-list { gap: 0; }
.tgp-faq-style-classic .tgp-faq-item {
    background-color: transparent;
    border: none;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
}
.tgp-faq-style-classic .tgp-faq-item:first-child { border-top: 1px solid #e5e7eb; }
.tgp-faq-style-classic .tgp-faq-item.is-open { border-bottom-color: var(--tgp-faq-accent); background-color: transparent; }
.tgp-faq-style-classic .tgp-faq-divider { display: none; }
.tgp-faq-style-classic .tgp-faq-wrap .tgp-faq-item .tgp-faq-question { padding-left: 0; padding-right: 0; }
.tgp-faq-style-classic .tgp-faq-answer-inner { padding-left: 0; padding-right: 0; }
.tgp-faq-style-classic .tgp-faq-wrap .tgp-faq-item .tgp-faq-question:hover { background-color: transparent; }
.tgp-faq-style-classic .tgp-faq-question-text { font-size: 16px; }


/* ══════════════════════════════════════════════
   ESTILO 02 — BORDERED
   Borde 2px. Al abrir: borde de acento + glow exterior.
══════════════════════════════════════════════ */
.tgp-faq-style-bordered .tgp-faq-item {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background-color: #fff;
    box-shadow: none;
}
.tgp-faq-style-bordered .tgp-faq-item:hover { border-color: #cbd5e1; }
.tgp-faq-style-bordered .tgp-faq-item.is-open {
    border-color: var(--tgp-faq-accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--tgp-faq-accent) 14%, transparent);
    background-color: #fafbff;
}
.tgp-faq-style-bordered .tgp-faq-divider { border-top-color: #f1f5f9; }


/* ══════════════════════════════════════════════
   ESTILO 03 — FILLED
   Fondo gris claro. Al abrir: fondo de color + borde izquierdo grueso.
══════════════════════════════════════════════ */
.tgp-faq-style-filled .tgp-faq-item {
    background-color: #f3f4f6;
    border: 1px solid transparent;
    border-left: 4px solid transparent;
    border-radius: 10px;
    box-shadow: none;
}
.tgp-faq-style-filled .tgp-faq-item.is-open {
    background-color: color-mix(in srgb, var(--tgp-faq-accent) 8%, white);
    border-color: color-mix(in srgb, var(--tgp-faq-accent) 15%, #e5e7eb);
    border-left-color: var(--tgp-faq-accent);
}
.tgp-faq-style-filled .tgp-faq-divider { border-top-color: rgba(0,0,0,0.06); }
.tgp-faq-style-filled .tgp-faq-wrap .tgp-faq-item .tgp-faq-question:hover { background-color: rgba(0,0,0,0.03); }


/* ══════════════════════════════════════════════
   ESTILO 04 — MINIMAL
   Solo texto, sin cajas. Pregunta gris → negra/bold al abrir.
══════════════════════════════════════════════ */
.tgp-faq-style-minimal .tgp-faq-list { gap: 0; }
.tgp-faq-style-minimal .tgp-faq-item {
    border: none;
    border-bottom: 1px solid #f3f4f6;
    border-radius: 0;
    background-color: transparent;
    overflow: visible;
    box-shadow: none;
}
.tgp-faq-style-minimal .tgp-faq-item.is-open { background-color: transparent; }
.tgp-faq-style-minimal .tgp-faq-wrap .tgp-faq-item .tgp-faq-question { padding: 20px 0; }
.tgp-faq-style-minimal .tgp-faq-wrap .tgp-faq-item .tgp-faq-question:hover { background-color: transparent; }
.tgp-faq-style-minimal .tgp-faq-question-text { font-size: 16px; font-weight: 500; color: #6b7280; }
.tgp-faq-style-minimal .tgp-faq-item.is-open .tgp-faq-question-text { font-weight: 700; color: #111827; }
.tgp-faq-style-minimal .tgp-faq-divider { display: none; }
.tgp-faq-style-minimal .tgp-faq-answer-inner { padding: 0 0 20px 0; font-size: 15px; color: #6b7280; }
.tgp-faq-style-minimal .tgp-faq-icon { color: #d1d5db; }
.tgp-faq-style-minimal .tgp-faq-item.is-open .tgp-faq-icon { color: var(--tgp-faq-accent); }


/* ══════════════════════════════════════════════
   ESTILO 05 — GRADIENT
   Barra lateral degradada. Al abrir: fondo con gradiente tenue.
══════════════════════════════════════════════ */
.tgp-faq-style-gradient .tgp-faq-item {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background-color: #ffffff;
    overflow: hidden;
    box-shadow: none;
}
.tgp-faq-style-gradient .tgp-faq-item::before {
    content: '';
    position: absolute; left: 0; top: 0; bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--tgp-faq-accent), var(--tgp-faq-accent2));
    opacity: 0; transition: opacity 0.25s;
}
.tgp-faq-style-gradient .tgp-faq-item.is-open::before { opacity: 1; }
.tgp-faq-style-gradient .tgp-faq-item.is-open {
    border-color: color-mix(in srgb, var(--tgp-faq-accent) 30%, #e5e7eb);
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--tgp-faq-accent) 6%, white) 0%,
        white 70%);
}
.tgp-faq-style-gradient .tgp-faq-wrap .tgp-faq-item .tgp-faq-question { padding-left: 24px; }
.tgp-faq-style-gradient .tgp-faq-answer-inner { padding-left: 24px; }
.tgp-faq-style-gradient .tgp-faq-divider { margin-left: 24px; }


/* ══════════════════════════════════════════════
   ESTILO 06 — DARK
   Fondo slate oscuro en todos los ítems. Texto claro.
══════════════════════════════════════════════ */
.tgp-faq-style-dark .tgp-faq-item {
    background-color: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    box-shadow: none;
}
.tgp-faq-style-dark .tgp-faq-item:hover { border-color: #475569; }
.tgp-faq-style-dark .tgp-faq-item.is-open {
    background-color: #0f172a;
    border-color: var(--tgp-faq-accent);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--tgp-faq-accent) 30%, transparent),
                0 8px 24px rgba(0,0,0,0.4);
}
.tgp-faq-style-dark .tgp-faq-question-text { color: #e2e8f0; }
.tgp-faq-style-dark .tgp-faq-item.is-open .tgp-faq-question-text { color: #fff; }
.tgp-faq-style-dark .tgp-faq-icon { color: #64748b; }
.tgp-faq-style-dark .tgp-faq-item.is-open .tgp-faq-icon { color: var(--tgp-faq-accent); }
.tgp-faq-style-dark .tgp-faq-answer-inner { color: #94a3b8; }
.tgp-faq-style-dark .tgp-faq-divider { border-top-color: #1e293b; }
.tgp-faq-style-dark .tgp-faq-wrap .tgp-faq-item .tgp-faq-question:hover { background-color: rgba(255,255,255,0.04); }
/* Dark — encabezado, buscador, tabs */
.tgp-faq-style-dark .tgp-faq-title    { color: #f1f5f9; }
.tgp-faq-style-dark .tgp-faq-subtitle { color: #94a3b8; }
.tgp-faq-style-dark .tgp-faq-wrap .tgp-faq-search-input { background: #1e293b; border-color: #334155; color: #e2e8f0; }
.tgp-faq-style-dark .tgp-faq-wrap .tgp-faq-search-input::placeholder { color: #64748b; }
.tgp-faq-style-dark .tgp-faq-search-icon { color: #64748b; }
.tgp-faq-style-dark .tgp-faq-wrap .tgp-faq-tab { background: #1e293b; color: #94a3b8; border-color: #334155; }
.tgp-faq-style-dark .tgp-faq-wrap .tgp-faq-tab:hover  { background: #334155; color: #e2e8f0; }
.tgp-faq-style-dark .tgp-faq-wrap .tgp-faq-tab.is-active { background: var(--tgp-faq-accent); color: #fff; }
.tgp-faq-style-dark .tgp-faq-item-badge { background: #334155; }


/* ══════════════════════════════════════════════
   ESTILO 07 — ROUNDED
   Tarjetas muy redondeadas y flotantes. Hover: sube + sombra.
══════════════════════════════════════════════ */
.tgp-faq-style-rounded .tgp-faq-item {
    border: 1px solid #f1f5f9;
    border-radius: 20px;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
}
.tgp-faq-style-rounded .tgp-faq-item:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.10);
    transform: translateY(-1px);
}
.tgp-faq-style-rounded .tgp-faq-item.is-open {
    box-shadow: 0 16px 48px color-mix(in srgb, var(--tgp-faq-accent) 22%, transparent),
                0 4px 12px rgba(0,0,0,0.06);
    border-color: color-mix(in srgb, var(--tgp-faq-accent) 25%, #f1f5f9);
    transform: translateY(-2px);
}
.tgp-faq-style-rounded .tgp-faq-wrap .tgp-faq-item .tgp-faq-question { padding: 20px 24px; }
.tgp-faq-style-rounded .tgp-faq-answer-inner { padding: 4px 24px 22px; }
.tgp-faq-style-rounded .tgp-faq-divider { margin: 0 24px; }


/* ══════════════════════════════════════════════
   ESTILO 08 — TIMELINE
   Línea vertical degradada. Burbuja numerada con gradiente al abrir.
══════════════════════════════════════════════ */
.tgp-faq-style-timeline .tgp-faq-list {
    position: relative; padding-left: 52px; gap: 12px;
}
.tgp-faq-style-timeline .tgp-faq-list::before {
    content: ''; position: absolute;
    left: 15px; top: 24px; bottom: 24px; width: 2px;
    background: linear-gradient(180deg, var(--tgp-faq-accent), var(--tgp-faq-accent2));
    opacity: 0.15; border-radius: 2px;
}
.tgp-faq-style-timeline .tgp-faq-item {
    border: 1px solid #e5e7eb; border-radius: 14px; background-color: #fff; overflow: visible;
}
.tgp-faq-style-timeline .tgp-faq-item.is-open {
    border-color: color-mix(in srgb, var(--tgp-faq-accent) 35%, #e5e7eb);
    box-shadow: 0 6px 24px color-mix(in srgb, var(--tgp-faq-accent) 14%, transparent);
}
.tgp-faq-timeline-num {
    position: absolute; left: -52px; top: 15px;
    width: 32px; height: 32px; border-radius: 50%;
    background: #f1f5f9; border: 2px solid #e2e8f0;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; color: #94a3b8;
    transition: background 0.25s, border-color 0.25s, color 0.25s, box-shadow 0.25s;
    z-index: 1; line-height: 1;
}
.tgp-faq-item.is-open .tgp-faq-timeline-num {
    background: linear-gradient(135deg, var(--tgp-faq-accent), var(--tgp-faq-accent2));
    border-color: transparent; color: #fff;
    box-shadow: 0 4px 14px color-mix(in srgb, var(--tgp-faq-accent) 45%, transparent);
}


/* ══════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════ */
@media (max-width: 768px) {
    .tgp-faq-title    { font-size: 22px; }
    .tgp-faq-subtitle { font-size: 14px; }
    .tgp-faq-wrap .tgp-faq-item .tgp-faq-question { padding: 14px 16px; }
    .tgp-faq-question-text { font-size: 14px; }
    .tgp-faq-answer-inner  { padding: 4px 16px 16px; }
    .tgp-faq-style-classic .tgp-faq-wrap .tgp-faq-item .tgp-faq-question,
    .tgp-faq-style-minimal .tgp-faq-wrap .tgp-faq-item .tgp-faq-question { padding-left: 0; padding-right: 0; }
    .tgp-faq-style-classic .tgp-faq-answer-inner,
    .tgp-faq-style-minimal .tgp-faq-answer-inner { padding-left: 0; padding-right: 0; }
    .tgp-faq-style-timeline .tgp-faq-list  { padding-left: 42px; }
    .tgp-faq-style-timeline .tgp-faq-list::before { left: 11px; }
    .tgp-faq-timeline-num { left: -42px; width: 26px; height: 26px; font-size: 10px; }
    .tgp-faq-tab { padding: 6px 14px; font-size: 12px; }
    .tgp-faq-style-rounded .tgp-faq-item:hover,
    .tgp-faq-style-rounded .tgp-faq-item.is-open { transform: none; }
}