/* FAQ Page Styles */
/* Ajuste para Header Unificado Fijo */
body {
    margin: 0 !important;
    background-color: #f7f6f2 !important; /* Fondo blanco humo */
    padding-top: 180px !important; /* Aumentado significativamente para que los títulos se vean */
    margin-top: 0 !important;
}

/* Asegurar que el contenedor principal también tenga margen */
#master-scaling-container {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Forzar espacio solo en el primer título */
h1:first-of-type,
.page-title,
.faq-title {
    margin-top: 40px !important; /* Reducido para balance */
    padding-top: 10px !important; /* Reducido para balance */
}

/* Eliminar padding extra de otros elementos */
.faq-container,
.main-content,
.page-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

@media (max-width: 768px) {
    body {
        padding-top: 100px; /* Ajustado para móviles */
    }
}

.header-final,
.header-final.scrolled {
    background: #1a1a1a !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.logo-final {
    text-decoration: none !important;
    color: inherit !important;
}

/* Header tipo Productos (desktop) sin transparencia */
@media (min-width: 1025px) {
    .header-final {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100px;
        z-index: 1000;
        display: flex;
        align-items: center;
        background: #1a1a1a !important;
    }

    .header-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        max-width: 1400px;
        margin: 0 auto;
        width: 100%;
        padding: 0 10px;
    }
}

.faq-header {
    display: none; /* Desactivar estilos antiguos */
    background: #333;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-header-logo {
    display: flex;
    align-items: center;
}

.faq-header-logo img {
    height: 40px;
    margin-right: 10px;
}

.faq-header-logo span {
    font-size: 1.5rem;
    font-weight: bold;
}

.faq-header nav a {
    color: white;
    text-decoration: none;
    margin-right: 20px;
}

.faq-container {
    padding: 60px 20px 80px 20px; /* Más espacio arriba y abajo */
    max-width: 1100px;
    margin: 0 auto;
    min-height: calc(100vh - 200px); /* Asegurar altura mínima */
}

.faq-hero {
    text-align: center;
    margin-bottom: 70px; /* Más espacio después del hero */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Usa la escala tipográfica de tipografia-guia.css para H1 */
.faq-hero h1 {
    /* No cambiar font-family, font-size ni font-weight: hereda de h1 en tipografia-guia.css */
    margin-bottom: 15px;
    background: none;
    border: none;
    box-shadow: none;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

/* Mantener párrafos con la escala de la guía (p en tipografia-guia.css) */
.faq-hero p {
    /* Hereda font-family, font-size y line-height desde p en tipografia-guia.css */
    max-width: 600px;
    margin: 0 auto !important;
    text-align: center !important;
    width: 100%;
}

.faq-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 50px;
}

.faq-sidebar {
    background: white;
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(26,26,26,0.08);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.faq-sidebar h3 {
    margin-bottom: 25px;
}

.faq-sidebar ul {
    list-style: none;
    padding: 0;
}

.faq-sidebar li {
    margin-bottom: 12px;
}

.faq-sidebar a {
    color: #666;
    text-decoration: none;
    padding: 10px 15px;
    display: block;
    border-radius: 8px;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.faq-sidebar a:hover {
    background: #f8f9fa;
    border-left-color: #f9751c;
    color: #333;
}

.faq-cta-box {
    margin-top: 30px;
    padding: 20px;
    background: #f5f6f7;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    color: #333;
}

.faq-cta-box h4 {
    margin: 0 0 10px 0;
}

.faq-cta-box p {
    margin: 0 0 15px 0;
    opacity: 0.9;
}

.faq-cta-box a {
    color: #333;
    font-weight: 600;
    text-decoration: underline;
    font-size: 0.9rem;
}

.faq-content {
    background: white;
    padding: 45px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(26,26,26,0.08);
}

.faq-section {
    margin-bottom: 50px;
}

/* Usa la escala tipográfica de tipografia-guia.css para H2 */
.faq-section h2 {
    /* No cambiar font-family, font-size ni font-weight: hereda de h2 en tipografia-guia.css */
    margin-bottom: 25px;
    border-left: 4px solid #f9751c;
    padding-left: 20px;
}

.faq-item {
    margin-bottom: 30px;
    padding: 25px;
    background: #fafafa;
    border-radius: 10px;
    border-left: 4px solid #f9751c;
}

/* Usa la escala tipográfica de tipografia-guia.css para H3 */
.faq-item h3 {
    /* No cambiar font-family, font-size ni font-weight: hereda de h3 en tipografia-guia.css */
    margin-bottom: 15px;
}

.faq-item p {
    margin: 0;
}

.faq-item a {
    color: #f9751c;
    font-weight: 600;
}

/* ============================================
   RESPONSIVE DESIGN - FAQ
   ============================================ */

/* Tablet Adjustments */
@media (max-width: 1024px) {
    .faq-container {
        padding: 30px 20px;
    }

    .faq-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .faq-sidebar {
        position: static;
        width: 100%;
        padding: 25px;
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .faq-sidebar h3 {
        margin-bottom: 10px;
        text-align: center;
    }

    .faq-sidebar ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .faq-sidebar li {
        margin-bottom: 0;
    }

    .faq-sidebar a {
        padding: 8px 15px;
        background: #f8f9fa;
        border-left: none;
        border-bottom: 2px solid transparent;
        font-size: 0.9rem;
    }

    .faq-sidebar a:hover {
        border-left-color: transparent;
        border-bottom-color: #f9751c;
    }

    .faq-cta-box {
        margin-top: 10px;
        text-align: center;
    }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .faq-header {
        flex-direction: column;
        padding: 20px 15px;
        gap: 15px;
        background: #222;
    }

    .faq-header-logo img {
        height: 35px;
    }

    .faq-header nav a {
        font-size: 0.9rem;
        margin: 0 10px;
    }

    .faq-container {
        padding: 20px 15px;
    }

    .faq-hero h1 {
        font-size: 2rem !important;
        margin-bottom: 10px;
    }

    .faq-content {
        padding: 20px;
    }

    .faq-item {
        padding: 18px;
    }

    .faq-footer {
        padding: 30px 20px;
        margin-top: 30px;
    }

    .faq-footer-content {
        flex-direction: column;
        gap: 25px;
    }

    .faq-footer-logo {
        justify-content: center;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .faq-sidebar ul {
        flex-direction: column;
        width: 100%;
    }

    .faq-sidebar li {
        width: 100%;
    }

    .faq-sidebar a {
        text-align: center;
        border-left: 3px solid transparent;
        border-bottom: none;
    }

    .faq-sidebar a:hover {
        border-left-color: #f9751c;
    }
}
