/* ============================================
   FAQ PAGE — Estilos independientes
   ============================================ */

/* ── Light Theme Variables (default) ── */
:root {
    --faq-bg-start: #ffecd2;
    --faq-bg-end: #fcb69f;
    --faq-text: #5c3d2e;
    --faq-text-muted: #5c3d2e;
    --faq-accent: #d97f4b;
    --faq-accent-light: #ff9a6c;
    --faq-card-bg: white;
    --faq-card-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    --faq-card-shadow-hover: 0 6px 25px rgba(0, 0, 0, 0.12);
    --faq-bar-bg: white;
    --faq-bar-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    --faq-hover-bg: #fff5f0;
    --faq-input-border: #e8d5c4;
    --faq-select-bg: white;
    --faq-strong: #b5582a;
    --faq-cta-bg: white;
    --faq-cta-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --faq-placeholder-bg: rgba(255, 255, 255, 0.6);
    --faq-placeholder-text: #b06030;
    --faq-transition: 0.3s;
}

/* ── Dark Theme Variables ── */
[data-theme="dark"] {
    --faq-bg-start: #1a1a2e;
    --faq-bg-end: #0f3460;
    --faq-text: #c8b9aa;
    --faq-text-muted: #9a8b7e;
    --faq-accent: #e8925a;
    --faq-accent-light: #f0a473;
    --faq-card-bg: rgba(30, 30, 50, 0.88);
    --faq-card-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    --faq-card-shadow-hover: 0 6px 25px rgba(0, 0, 0, 0.4);
    --faq-bar-bg: rgba(30, 30, 50, 0.9);
    --faq-bar-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    --faq-hover-bg: rgba(232, 146, 90, 0.12);
    --faq-input-border: rgba(200, 185, 170, 0.2);
    --faq-select-bg: rgba(25, 25, 45, 0.8);
    --faq-strong: #e8925a;
    --faq-cta-bg: rgba(30, 30, 50, 0.88);
    --faq-cta-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --faq-placeholder-bg: rgba(30, 30, 50, 0.5);
    --faq-placeholder-text: #c8956a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--faq-bg-start) 0%, var(--faq-bg-end) 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--faq-text);
    transition: background var(--faq-transition) ease, color var(--faq-transition) ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ============================================
   BARRA SUPERIOR
   ============================================ */
.config-bar {
    background: var(--faq-bar-bg);
    border-radius: 15px;
    padding: 15px 25px;
    margin-bottom: 30px;
    box-shadow: var(--faq-bar-shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    transition: background var(--faq-transition) ease, box-shadow var(--faq-transition) ease;
}

.config-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.config-group label {
    font-weight: 600;
    color: var(--faq-text);
    font-size: 0.9rem;
}

.config-select {
    padding: 8px 15px;
    border: 2px solid var(--faq-input-border);
    border-radius: 8px;
    background: var(--faq-select-bg);
    color: var(--faq-text);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.config-select:hover {
    border-color: var(--faq-accent);
}

.config-select:focus {
    outline: none;
    border-color: var(--faq-accent);
    box-shadow: 0 0 0 3px rgba(217, 127, 75, 0.1);
}

/* ============================================
   NAVEGACIÓN
   ============================================ */
.nav-links {
    display: flex;
    gap: 15px;
}

.nav-links a {
    text-decoration: none;
    color: var(--faq-text);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    background: var(--faq-hover-bg);
    color: var(--faq-accent);
}

.nav-links a.active {
    background: linear-gradient(135deg, var(--faq-accent) 0%, var(--faq-accent-light) 100%);
    color: white;
}

.lang-switch {
    font-weight: 600;
    color: var(--faq-text);
    font-size: .9rem
}

.lang-switch a {
    color: var(--faq-accent);
    text-decoration: none;
    font-weight: 700;
    padding: 6px 14px;
    border: 2px solid var(--faq-accent);
    border-radius: 8px;
    transition: all .3s ease
}

.lang-switch a:hover {
    background: var(--faq-accent);
    color: #fff
}

/* ── Theme Toggle Button ── */
.theme-toggle {
    background: var(--faq-card-bg);
    border: 1.5px solid var(--faq-input-border);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    font-size: 1.15rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    flex-shrink: 0;
    line-height: 1;
}

.theme-toggle:hover {
    border-color: var(--faq-accent);
    transform: scale(1.1);
    box-shadow: 0 2px 12px rgba(217, 127, 75, 0.2);
}

/* ============================================
   HEADER
   ============================================ */
header {
    text-align: center;
    margin-bottom: 40px;
    color: var(--faq-text);
    transition: color var(--faq-transition) ease;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* ============================================
   FAQ LAYOUT
   ============================================ */
.faq-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    align-items: start;
}

.faq-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ============================================
   FAQ ITEMS (Accordion)
   ============================================ */
.faq-item {
    background: var(--faq-card-bg);
    border-radius: 15px;
    box-shadow: var(--faq-card-shadow);
    overflow: hidden;
    transition: box-shadow 0.3s ease, background var(--faq-transition) ease;
}

.faq-item:hover {
    box-shadow: var(--faq-card-shadow-hover);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--faq-text);
    transition: color 0.3s ease;
}

.faq-question:hover {
    color: var(--faq-accent);
}

.faq-icon {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--faq-accent);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    padding: 0 25px;
}

.faq-item.active .faq-answer {
    max-height: 600px;
    padding: 0 25px 20px;
}

.faq-answer p {
    color: var(--faq-text);
    line-height: 1.7;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

.faq-answer ul,
.faq-answer ol {
    margin: 10px 0 12px 22px;
    color: var(--faq-text);
    line-height: 1.7;
}

.faq-answer li {
    margin-bottom: 6px;
    font-size: 0.93rem;
}

.faq-answer a {
    color: var(--faq-accent);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.faq-answer a:hover {
    border-bottom-color: var(--faq-accent);
}

.faq-answer strong {
    color: var(--faq-strong);
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
    background: var(--faq-cta-bg);
    border-radius: 20px;
    padding: 40px;
    margin-top: 35px;
    box-shadow: var(--faq-cta-shadow);
    text-align: center;
    transition: background var(--faq-transition) ease, box-shadow var(--faq-transition) ease;
}

.cta-section h2 {
    color: var(--faq-accent);
    font-size: 1.6rem;
    margin-bottom: 12px;
}

.cta-section p {
    color: var(--faq-text);
    font-size: 1rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--faq-accent) 0%, var(--faq-accent-light) 100%);
    color: white;
    padding: 14px 32px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 5px 15px rgba(217, 127, 75, 0.3);
    transition: all 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(217, 127, 75, 0.4);
}

/* ============================================
   ZONAS DE ANUNCIOS
   ============================================ */
.ad-container {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 10px;
}

.ad-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--faq-placeholder-bg);
    border: 2px dashed var(--faq-accent);
    border-radius: 10px;
    color: var(--faq-placeholder-text);
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    padding: 10px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.ad-placeholder:hover {
    opacity: 1;
}

.ad-top {
    width: 100%;
    max-width: 728px;
    height: 90px;
    margin: 0 auto 28px;
}

.ad-sidebar {
    width: 300px;
    height: 250px;
    position: sticky;
    top: 20px;
}

.ad-bottom {
    width: 100%;
    max-width: 728px;
    height: 90px;
    margin: 28px auto 0;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    text-align: center;
    margin-top: 40px;
    color: var(--faq-text-muted);
    font-size: 0.9rem;
    transition: color var(--faq-transition) ease;
}

/* ============================================
   PLATFORM SWITCHER
   ============================================ */
.platform-switcher {
    display: flex;
    gap: 4px;
    justify-content: center;
    background: var(--faq-hover-bg);
    border-radius: 14px;
    padding: 5px;
    border: 1.5px solid var(--faq-input-border);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
    width: fit-content;
}

.platform-link {
    text-decoration: none;
    font-weight: 700;
    font-size: 0.92rem;
    padding: 10px 28px;
    border-radius: 11px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--faq-text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.01em;
}

.platform-link:hover:not(.active) {
    background: var(--faq-hover-bg);
    color: var(--faq-text);
    transform: scale(1.03);
}

.platform-link.active {
    color: #fff;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.18), 0 1px 3px rgba(0, 0, 0, 0.08);
}

.platform-link.active[href*="shopify"] {
    background: linear-gradient(135deg, #95bf46 0%, #5e8e3e 100%);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.platform-link.active[href*="index"],
.platform-link.active[href*="es.html"]:not([href*="shopify"]) {
    background: linear-gradient(135deg, #f76b1c 0%, #e8532e 100%);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .faq-layout {
        grid-template-columns: 1fr;
    }

    .ad-sidebar {
        width: 100%;
        height: 90px;
        position: static;
    }
}

@media (max-width: 768px) {
    .config-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-links {
        justify-content: center;
    }

    header h1 {
        font-size: 1.6rem;
    }

    header p {
        font-size: 0.95rem;
    }

    .faq-question {
        font-size: 0.95rem;
        padding: 16px 18px;
    }

    .faq-answer {
        padding-left: 18px;
        padding-right: 18px;
    }

    .cta-section {
        padding: 25px;
    }

    .ad-top,
    .ad-bottom {
        height: 60px;
    }
}

/* ============================================
   ANIMACIONES
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.faq-item {
    animation: fadeIn 0.5s ease-in;
}