/* VARIABLES *

/* definimos los colores que vamos a usar mediante :root */
:root {
  --blanco: #ffffff; /*color blanco*/
  --negro: #1f1f21; /*color negro*/
  --grisFondoSeccionOpiniones: #151515;
  --gris: #454545; /*color gris*/
  --Amarillo: #d5a326;
  --Azul: #496d8c;
}

/*fonts*/
@font-face {
  font-family: icomoon;
  src: url(../icons/Fonts/icomoon.woff);
}


/* General Body and Container Styles */
:root {
    --bg-dark: #1f1f21;
    --bg-medium: #2c2c2c;
    --text-light: #e0e0e0;
    --text-medium: #b0b0b0;
    --accent-yellow: #fdd835; /* A bright yellow for accents like the active level */
    --accent-blue: #007bff; /* For buttons and links */
    --border-color: #444;
    --card-bg: #3a3a3a; /* Background for the section boxes */
    --card-text: #e0e0e0;
    --card-border-radius: 8px;
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

body {
    font-family: 'Arial', sans-serif; /* Or your preferred font */
    background-color: var(--bg-dark);
    color: var(--text-light);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* CABECERA Section (Top Banner) */
.cabecera {
    padding: 30px 5%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-bottom: 1px solid var(--border-color);
}

.cabecera .section.bienvenida {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.cabecera .info.usuario h2 {
    margin: 0;
    font-size: 1.8em;
    color: var(--text-light);
}

.cabecera .info.usuario p {
    margin: 5px 0 0;
    font-size: 1.1em;
    color: var(--text-medium);
}

.cabecera .avatar img{
    width: 80px;
    display: flex;
    justify-content: left;
    align-items: left;
}

.cabecera .info.usuario .nivel {
    color: var(--accent-yellow);
    font-weight: bold;
}

.cabecera .barra.progreso {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: var(--card-border-radius);
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
    box-shadow: var(--shadow);
}

.cabecera .barra.progreso p:first-child {
    font-size: 1.3em;
    margin: 0;
    color: var(--text-light);
}

.cabecera .barra.progreso p:last-of-type {
    font-size: 1em;
    margin: 0;
    color: var(--text-medium);
}

.cabecera .btn.progreso {
    background-color: var(--accent-blue);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.cabecera .btn.progreso:hover {
    background-color: #0056b3;
}


/* Niveles Section */
.seccion.niveles {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: var(--card-border-radius);
    box-shadow: var(--shadow);
    position: relative; /* For positioning the progression icon if needed */
}

.seccion.niveles .contenedor.niveles {
    display: flex;
    justify-content: space-around; /* Distribute levels evenly */
    align-items: center;
    position: relative;
    padding-bottom: 20px; /* Space for the line below */
}

.seccion.niveles .contenedor.niveles::before {
    content: '';
    position: absolute;
    bottom: 10px; /* Adjust based on desired line position */
    left: 10%;
    right: 10%;
    height: 2px;
    background-color: var(--border-color);
    z-index: 0; /* Ensure it's behind the level circles */
}


.seccion.niveles .nivel {
    width: 80px; /* Diameter of the circle */
    height: 80px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 1.1em;
    z-index: 1; /* Bring levels to front of the line */
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--border-color); /* Default border */
    background-color: var(--bg-medium);
}

.seccion.niveles .nivel.activo {
    background-color: var(--accent-yellow);
    color: var(--bg-dark); /* Dark text on yellow background */
    border-color: var(--accent-yellow);
    box-shadow: 0 0 10px rgba(253, 216, 53, 0.5); /* Yellow glow */
}

.seccion.niveles .nivel.inactivo {
    background-color: var(--bg-medium);
    color: var(--text-medium);
    border-color: var(--border-color);
}

.seccion.niveles .nivel:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.seccion.niveles .progresion.niveles {
    font-size: 1.5em; /* Adjust icon size */
    color: var(--text-light);
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
}


.conexiones.instrumentos {
    display: flex;
    justify-content: space-around;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.conexiones.instrumentos .conexión {
    background-color: var(--bg-medium);
    border: 1px solid var(--border-color);
    border-radius: var(--card-border-radius);
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex: 1; /* Allow items to grow and shrink */
    min-width: 150px; /* Minimum width before wrapping */
    max-width: 180px; /* Max width for consistency */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.conexiones.instrumentos .conexión:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.conexiones.instrumentos .conexión i {
    font-size: 3em; /* Adjust icon size */
    color: var(--accent-yellow);
    margin-bottom: 10px;
}

.conexiones.instrumentos .conexión p {
    margin: 0;
    font-size: 0.9em;
    color: var(--text-light);
}

/* BODY Section (Grid of Information Boxes) */
.body {
    padding: 30px 5%;
}

.sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive grid */
    gap: 25px;
}

.section-box {
    background-color: var(--card-bg);
    border-radius: var(--card-border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.section-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.section-box h3 {
    color: var(--text-light);
    font-size: 1.4em;
    margin-top: 0;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.section-box h3 i {
    margin-right: 10px;
    color: var(--accent-yellow); /* Icon color for headings */
    font-size: 1.2em;
}

.section-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.section-box ul li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.section-box ul li:last-child {
    border-bottom: none;
}

.section-box ul li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-medium);
    transition: color 0.2s ease;
}

.section-box ul li a:hover {
    color: var(--accent-yellow);
    text-decoration: none;
}

.section-box ul li a i {
    color: var(--text-medium);
    font-size: 0.9em;
    transition: color 0.2s ease;
}

.section-box ul li a:hover i {
    color: var(--accent-yellow);
}

/* SECCION PREGUNTAS (Call to Action) */
.preguntas {
    background-color: var(--card-bg);
    padding: 40px 5%;
    margin: 30px 5%; /* Margin to separate from grid */
    border-radius: var(--card-border-radius);
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.preguntas h3 {
    color: var(--text-light);
    font-size: 1.8em;
    margin-bottom: 15px;
}

.preguntas p {
    color: var(--text-medium);
    font-size: 1.1em;
    max-width: 700px;
    margin: 0 auto 25px auto;
}

.preguntas .boton {
    background-color: var(--accent-blue);
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.preguntas .boton a {
    color: white;
    font-weight: bold;
    text-decoration: none;
    font-size: 1.1em;
}

.preguntas .boton:hover {
    background-color: #0056b3;
}


/* Media Queries for Responsiveness */
@media (max-width: 768px) {
    .cabecera {
        padding: 20px 3%;
    }

    .cabecera .section.bienvenida {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .cabecera .avatar img{
    width: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    }

    .cabecera .barra.progreso {
        width: calc(100% - 40px); /* Adjust for padding */
    }

    .seccion.niveles .contenedor.niveles {
        flex-direction: column;
        gap: 15px;
        padding-bottom: 0;
    }

    .seccion.niveles .contenedor.niveles::before {
        display: none; /* Hide the line in vertical layout */
    }

    .seccion.niveles .nivel {
        width: 70px;
        height: 70px;
    }

    .conexiones.instrumentos {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .conexiones.instrumentos .conexión {
        width: 50%; /* Make them take more width */
        max-width: 250px;
    }

    .body {
        padding: 20px 3%;
    }

    .sections-grid {
        grid-template-columns: 1fr; /* Single column layout */
    }

    .preguntas {
        margin: 20px 3%;
        padding: 30px 3%;
    }

    .preguntas h3 {
        font-size: 1.5em;
    }

    .preguntas p {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .cabecera .info.usuario h2 {
        font-size: 1.5em;
    }

    .cabecera .info.usuario p {
        font-size: 1em;
    }

    .cabecera .barra.progreso p:first-child {
        font-size: 1.1em;
    }

    .cabecera .barra.progreso p:last-of-type {
        font-size: 0.9em;
    }

    .section-box h3 {
        font-size: 1.2em;
    }
}