/* Variables de Tema */
:root {
    --primary-color: #1a3a5f;
    --secondary-color: #e9b44c;
    --accent-color: #2a628f;
    --light-color: #f8f9fa;
    --dark-color: #16262e;
    --text-color: #333;
    --card-bg: #ffffff;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --transition: all 0.3s ease;
    --success-color: #38a169;
    --bg-color: #f5f7fa;
    --border-color: #e2e8f0;
    --category-text-light: #1a3a5f; /* Color para modo claro */
    --category-text-dark: #f0f0f0;  /* Color claro para modo oscuro */
}

body.dark {
    --primary-color: #5aa9e6;
    --secondary-color: #ffb74d;
    --accent-color: #4dabf7;
    --text-color: #e0e0e0;
    --light-color: #1e1e1e;
    --dark-color: #f8f9fa;
    --card-bg: #2d2d2d;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    --bg-color: #121212;
    --border-color: #444;
    --category-text-light: #f0f0f0; /* Mantiene el color claro en modo oscuro */
}

/* Estilos Generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    padding: 0;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary-color);
    position: relative;
}

body.dark .section-title {
    color: #5aa9e6;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--secondary-color);
    margin: 15px auto 30px;
    border-radius: 2px;
}

/* Estilos específicos para FAQ */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.search-container {
    max-width: 700px;
    margin: 0 auto 30px;
    position: relative;
}

.search-box {
    position: relative;
}

#faq-search {
    width: 100%;
    padding: 14px 20px 14px 50px;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 16px;
    transition: var(--transition);
    box-shadow: var(--shadow);
    background-color: var(--card-bg);
    color: var(--text-color);
}

#faq-search:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(42, 98, 143, 0.2);
}

#faq-search::placeholder {
    color: #a0aec0;
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-color);
    font-size: 18px;
}

.results-counter {
    text-align: right;
    font-size: 0.9rem;
    color: var(--text-color);
    margin-top: 8px;
    min-height: 24px;
    opacity: 0.8;
}

.results-counter .count {
    font-weight: 600;
    color: var(--accent-color);
}

/* CORRECCIÓN PRINCIPAL - Texto claro en modo oscuro */
.faq-category {
    margin-top: 40px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--secondary-color);
    color: var(--category-text-light); /* Usa la variable específica */
    font-size: 1.3rem;
    display: flex;
    align-items: center;
}

body.dark-mode .faq-category {
    color: #5aa9e6 !important;
}

.category-icon {
    width: 28px;
    height: 28px;
    margin-right: 12px;
    filter: invert(30%) sepia(40%) saturate(1500%) hue-rotate(180deg) brightness(90%);
    transition: var(--transition);
}

body.dark .category-icon {
    filter: invert(80%) sepia(30%) saturate(1500%) hue-rotate(180deg) brightness(120%);
}

.faq-item {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 15px;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.faq-item:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.faq-item.active {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-color);
}

.faq-question {
    padding: 20px 60px 20px 25px;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-color);
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
}

body.dark .faq-question {
    color: var(--secondary-color);
}

.question-icon {
    width: 24px;
    height: 24px;
    margin-right: 15px;
    filter: invert(40%) sepia(60%) saturate(1000%) hue-rotate(180deg);
    transition: var(--transition);
}

body.dark .question-icon {
    filter: invert(80%) sepia(40%) saturate(1000%) hue-rotate(180deg);
}

.faq-item.active .question-icon {
    filter: invert(60%) sepia(90%) saturate(1000%) hue-rotate(180deg);
}

body.dark .faq-item.active .question-icon {
    filter: invert(100%) sepia(90%) saturate(1000%) hue-rotate(180deg);
}

.toggle-indicator {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    width: 24px;
    height: 24px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-indicator::before {
    content: '';
    width: 12px;
    height: 12px;
    border-right: 3px solid var(--accent-color);
    border-bottom: 3px solid var(--accent-color);
    transform: rotate(45deg);
    margin-top: -4px;
    transition: var(--transition);
}

.faq-item.active .toggle-indicator {
    transform: translateY(-50%) rotate(180deg);
}

.faq-item.active .toggle-indicator::before {
    margin-top: 4px;
}

.faq-answer {
    padding: 0 25px 0 60px;
    max-height: 0;
    overflow: hidden;
    transition: var(--transition);
    color: var(--text-color);
    border-top: 1px solid transparent;
    opacity: 0.9;
}

.faq-item.active .faq-answer {
    padding: 0 25px 25px 60px;
    max-height: 500px;
    border-top: 1px solid var(--border-color);
}

.no-results {
    text-align: center;
    padding: 40px 30px;
    color: var(--text-color);
    display: none;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    margin-top: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.no-results i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    opacity: 0.7;
}

.no-results h4 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

body.dark .no-results h4 {
    color: var(--secondary-color);
}

.no-results p {
    margin-bottom: 20px;
    opacity: 0.8;
}

.no-results .btn-contact {
    display: inline-block;
    padding: 10px 24px;
    background-color: var(--accent-color);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid var(--accent-color);
}

.no-results .btn-contact:hover {
    background-color: transparent;
    color: var(--accent-color);
}

.no-results.show {
    display: block;
}

.faq-item.hidden {
    display: none;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--accent-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px);
}

/* Botón de modo oscuro */
.theme-toggle {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--card-bg);
    color: var(--text-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    z-index: 1000;
    border: 1px solid var(--border-color);
}

.theme-toggle i {
    font-size: 1.2rem;
    transition: var(--transition);
}

/* Responsive */
@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .faq-question {
        padding-right: 50px;
        font-size: 1rem;
    }

    .faq-answer, 
    .faq-item.active .faq-answer {
        padding-left: 25px;
        padding-right: 25px;
    }
}

@media (max-width: 576px) {
    .faq-question {
        padding: 18px 45px 18px 15px;
    }
    
    .toggle-indicator {
        right: 15px;
    }
    
    .faq-item.active .faq-answer {
        padding: 0 15px 20px;
    }

    .question-icon {
        margin-right: 10px;
        width: 20px;
        height: 20px;
    }

    .search-icon {
        left: 15px;
    }

    #faq-search {
        padding-left: 45px;
    }

    .theme-toggle {
        bottom: 90px;
        left: 15px;
        width: 40px;
        height: 40px;
    }
}


/* Items FAQ */
body.dark .faq-item {
    background: #2e2e2e !important;
}

/* Barra de búsqueda */
body.dark .search-box {
    background: #2e2e2e;
}

body.dark #faq-search {
    background: #2e2e2e;
    border-color: #444;
}










/* Añadir al final del archivo */
body.dark .faq-item {
    background: #2e2e2e !important;
}

body.dark .faq-question {
    color: #6ba3d8 !important;
}

body.dark .faq-answer {
    color: #e0e0e0 !important;
}











body.dark-mode .faq-item {
    background: #2e2e2e !important;
}

body.dark-mode .faq-question {
    color: #6ba3d8 !important;
}

body.dark-mode .faq-answer {
    color: #e0e0e0 !important;
}