@import url("https://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700");

:root {
    --primary-color:  #8eab41;

    --background-color: #fff;
    --secondary-background-color: #f9f9f9;
    --font-color: #000;
    --secondary-font-color: #505050;

    --shadow-color: rgba(0,0,0,0.1);
    --border-color: #dadada;

    --background-header: #E1E4E8;
    --background-color-card: #fff;
    --background-contrast-color: #ececec; 
}

[data-theme='dark']:root {
    --background-color: #191919;
    --secondary-background-color: #222222;
    --font-color: #ffffff;
    --secondary-font-color: #d4d4d4;

    --shadow-color: rgba(255, 255, 255, 0.1);
    --border-color: #585858;

    --background-header: #2e2e2e;
    --background-color-card: #1a1919;
    --background-contrast-color: #555555; 
}

* {
    box-sizing: border-box;
}

/*------ RESET -------*/
html,
body {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

body {
    background-color: var(--background-color);
    font-size: 1em;
    font-size: var(--text-base-size, 1em);
    /* font-family: 'Open Sans', sans-serif; */
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    color: var(--font-color);
}

h1,
h2,
h3,
h4 {
    color: var(--color-contrast-higher, #1c1c21);
    line-height: 1.2;
    line-height: var(--heading-line-height, 1.2)
}

.container {
    max-width: 1300px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 10px;
    padding-right: 10px;
}

/*---------- CABECERA ---------*/

.cd-header {
    background-color: var(--background-header);
    width: 100%;
}

.cd-cabecera {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1500px;
    margin: auto;
    padding: 10px;
}

.cd-header img {
    width: 100px;
}
.cd-header h2 {
    margin: 0;
    font-weight: 600;
    color: var(--font-color);
}
body > p {
    margin-top: 40px;
    opacity: .8;
    text-align: center;
}

/* BUSCADOR */
.cd-faq-search {
    margin: auto;
    margin-top: 30px;
    margin-bottom: 20px;
    max-width: 700px;
}

.cd-faq-search h3 {
    font-size: .9em;
    color: #777777;
}

.cd-faq-search form {
    display: flex;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
}

.cd-faq-search input {
    width: 100%;
    min-width: 500px;
    outline: none;
    padding: 12px 6px;
    font-size: .9em;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    color: var(--font-color);
    background-color: transparent;
}

.cd-faq-search form:has(input:focus) {
    border-color: var(--font-color);
}

.cd-faq-search form button {
    padding: 5px 15px;
    margin-left: -12px;
    border-radius: 0 5px 5px 0;
}

.cd-faq-mensaje {
    margin-top: 60px;
    width: 100%;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}


@media (min-width: 64rem) {
    .cd-faq-search {
        margin-bottom: 0;
    }

    .cd-faq__categories {
        position: -webkit-sticky;
        position: sticky;
        -ms-flex-item-align: start;
        align-self: flex-start;
        -ms-flex-negative: 0;
        flex-shrink: 0;
        top: 20px;
        width: 20%;
        box-shadow: 0 1px 2px rgba(0, 0, 0, .085), 0 1px 8px rgba(0, 0, 0, .1);
        box-shadow: var(--shadow-sm);
        margin-top: 1.25em;
        margin-top: var(--space-md)
    }
}

@media screen and (max-width: 750px) {
    .cd-faq-search form {
        justify-content: center;
        margin: 0 15px;
    }
    .cd-faq-search > div {
        width: 100%;
        margin: 0 15px;
        margin-top: 10px;
    }
    .cd-faq-search input {
        min-width: 200px;
        width: 100%;
    }
}

@media screen and (max-width: 600px) {
    .cd-header {
        & img { width: 80px; }
        & h2 { font-size: 20px; }
    }
}

/* @media screen and (min-width: 64rem) { */
    .cd-faq-topButton {
        display: none;
    }
/* } */

.cd-faq-button {
    font-size: .8em;
    padding: 6px 8px;
    outline: none;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: opacity .2s;
}

.cd-faq-button-primary {
    background-color: var(--primary-color);
    color: #f2f2f2;
}

.cd-faq-button-secondary {
    background-color: #777777;
    color: #f2f2f2;
}

/* CONTENEDOR */
.cd-temas-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
    margin-top: 50px;
}

.cd-tema-card {
    background: var(--background-color-card);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 3px 15px var(--shadow-color);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid var(--border-color);
}

.cd-tema-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.cd-tema-card h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 8px;
    margin-bottom: 9px;
    color: var(--secondary-font-color);
    display: inline;
    line-height: 33px;
}

.cd-tema-card i {
    margin-right: 5px;
    color: var(--secondary-font-color);
}


.cd-tema-card:hover {
    & h4, & i {
        color: var(--font-color);
    }
}

.cd-tema-card-desc {
    font-size: .9em;
    opacity: .7;

    & p {
        margin: 1px 0;
    }
}

.cd-tema-card.active .category-icon {
    background: white;
    color: #667eea;
}

.category-description {
    font-size: 0.9rem;
    opacity: 0.7;
}

/*-------------- PREGUNTAS ----------------*/
.cd-faq {
    background: var(--background-color);
    border-radius: 15px;
    padding: 30px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    border: 2px solid var(--border-color);
}

.cd-faq.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cd-faq .cd-faq-tema-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 15px;
    margin-top: 10px;
    margin-bottom: 25px;
}
.cd-faq-tema-title h2 {
    font-size: 1.8rem;
    color: var(--font-color);
    margin: 0;
}
.cd-faq-tema-copiar, .cd-faq-pregunta-copiar {
    height: fit-content;
    padding: 7px;
    cursor: pointer;
    background-color: var(--secondary-background-color);
    color: var(--font-color);
    outline: none;
    border: 1px solid var(--border-color);
}

.cd-faq-item {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    scroll-margin-top: 20px;
    transition: all 0.1s ease;
}

.cd-faq-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.cd-faq-volver {
    background-color: var(--secondary-background-color);
    border: 1px solid var(--border-color);
    color: var(--font-color);
    padding: 6px 15px;
    cursor: pointer;
}

.cd-faq-pregunta {
    padding: 20px;
    background: var(--secondary-background-color);
    color: var(--font-color);
    cursor: pointer;
    opacity: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    transition: all 0.3s ease;

    & * {
        pointer-events: none;
    }
}

.cd-faq-pregunta:hover {
    opacity: .8;
}

.cd-faq-pregunta.active {
    background: var(--primary-color);
    color: white;
}

.faq-toggle {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.cd-faq-pregunta.active .faq-toggle {
    transform: rotate(180deg);
}

.cd-faq-respuesta {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background: var(--secondary-background-color);
}

.cd-faq-respuesta img, .cd-faq-respuesta video {
    max-width: 100%;
}

.cd-faq-respuesta.active {
    padding: 20px;
    max-height: 5000px;
}

.cd-faq-no-content {
    width: 100%;
    margin-top: 50px;
    display: flex;
    gap: 20px;
    flex-direction: column;
    align-items: center;
}

@media screen and (max-width: 500px) {
    .container {
        padding-left: 0;
        padding-right: 0;
    }
    .cd-faq-search {
        padding: 5px 10px;
    }
    .cd-temas-container {
        padding: 10px;
        margin-top: 20px;
    }
    .cd-faq {
        padding: 30px 10px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .cd-faq-tema-title h2 {
        font-size: 22px;
    }

    .contenedorPreguntas > .cd-faq-volver {
        margin-left: 10px;
    }
}

/* PRELOAD */
.cd-faq-skeleton {
    width: 100%;
    border-radius: 15px;
    padding: 30px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    border: 2px solid var(--background-contrast-color);
    animation: skeleton;
    animation-duration: .8s;
    animation-iteration-count: infinite;
    animation-fill-mode: forwards;
    animation-direction: alternate;
}
.cd-faq-skeleton-title {
    max-width: 400px;
    height: 30px;
    border-radius: 15px;
    background-color: var(--background-contrast-color);
}
.cd-faq-skeleton-separator {
    width: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    background-color: var(--background-contrast-color);
    height: 2px;
    margin: 10px 0;
}
.cd-faq-skeleton-items div {
    width: 100%;
    height: 60px;
    margin-top: 15px;
    border-radius: 15px;
    background-color: var(--background-contrast-color);
}

@keyframes skeleton {
    from {
        opacity: 1;
    }
    to {
        opacity: .4;
    }
}

.cms-staticButton {
    position: fixed;
    right: 20px;
    bottom: 15px;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    z-index: 101;
    background-color: var(--primary-color);
    outline: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 20px;
}

#AlternThemeButton::before {
    font: var(--fa-font-solid);
    content: '\f186';
    font-size: 1.1em;
    display: inline-block;
}

[data-theme='dark'] {
    #AlternThemeButton::before {
        content: '\f185';
    }
}

/* SWET ALERT */
.swal2-popup {
    background-color: var(--secondary-background-color) !important;
    border: 1px solid var(--border-color) !important;
}
.swal2-html-container {
    color: var(--font-color) !important; 
}