/* ============================
   ESTILOS BASE
   ============================ */
html, body{
	overflow-x: hidden;
}

body {
    background: #f4f7fb;
    font-family: 'Nunito', sans-serif;
    color: #333;
    margin: 0;
    padding: 0;
}

body.no-scroll {
    overflow: hidden;
}

.oculto {
    display: none !important;
}

.btn{
	background-color: #CFDE01 !important;
	border-color: #CFDE01 !important;
	color: #1C2677 !important;
	border-radius: 50px;
}
/* ============================
   CONTENEDOR
   ============================ */

.test-container {
    max-width: 650px;
    width: 100%;
    margin: 0 auto;
    padding: 16px;
}

/* ============================
   HEADER
   ============================ */

.header-background {
    background-image: url('https://www.escuelaactiva.es/test-habitos-estudio/images/cabecera-fondo-nuevo-degradado.png');
	/*background-color: linear-gradient(45deg, #1C2677, #1C4F8F, #1A7AAA, #129FC0, #03C0D3);*/
    background-size: contain;
    background-position: center;
    background-repeat: repeat-y;
    padding: 15px;
    color: #fff;
}

/* ============================
   NAVBAR
   ============================ */

.navbar {
    background: transparent !important;
    box-shadow: none !important;
    padding: 0;
    margin-bottom: 10px;
}

.navbar-brand img {
    max-width: 280px;
}

/*enlaces*/
.navbar-nav .nav-link{
	position: relative; /*nuevo*/
	color: #ffffff;
	font-weight: 400;
	margin-left: 20px;
	padding-bottom: 6px; /*nuevo*/
	transition: opacity 0.2s ease;
}

.navbar-nav .nav-link::after{ /*nuevo*/
	content: ""; /*nuevo*/
	position: absolute; /*nuevo*/
	left: 0; /*nuevo*/
	bottom: 0; /*nuevo*/
	width: 0; /*nuevo*/
	height: 2px; /*nuevo*/
	background-color: #FFFFFF; /*nuevo*/
	transition: width 0.3s ease; /*nuevo*/
}

.navbar-nav .nav-link:hover{ /*nuevo*/
	opacity: 0.8; /*nuevo*/
	/*color: #03C0D3; /*nuevo*/
}

/*Elemento activo*/
.navbar-nav .nav-link-active{
	/*color: #03c0d3;*/
}

.navbar-nav .nav-link-active::after{
	width: 100%;
}

.navbar-nav .nav-link:hover::after{
	width: 100%;
}

/*Menú hamburguesa*/
.navbar-toggler {
    border: none !important;
}

.navbar-toggler-icon{
	filter: invert(1);
	background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba%280, 0, 0, 1%29' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

/*Quitar el menú hamburguesa*/
.navbar-toggler:focus,
.navbar-toggler:active,
.navbar-toggler:focus-visible {
    outline: none;
    box-shadow: none;
    border: none;
}

/* ============================
   CARD DE PREGUNTA
   ============================ */

.card {
    position: relative;
	border-radius: 18px !important;
    padding: 20px !important;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    border: none !important;
	min-height: 92vh;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-image: url("https://www.escuelaactiva.es/test-habitos-estudio/images/fondo-preguntas-desenfocada.png"); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
/*Overlay oscuro*/

.card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 0;
}
/* Aseguramos que el contenido esté por encima */

.card > * {
    position: relative;
    z-index: 1;
}

.card img {
    max-width: 140px;
    margin: 0 auto 15px;
    display: block;
}

.card-title {
    font-size: 1.5rem;
    margin: 36px auto;
    line-height: 1.5;
	color: #ffffff;
}

.card-body{
	color: #ffffff;
	position: relative;
}

/* ============================
   RESPUESTAS
   ============================ */

.respuesta1 {
    position: relative;
	background: rgba(251, 253, 254, 0.5);
    padding: 14px 18px;
    margin-bottom: 14px;
	border: 2px solid transparent;
    border-radius: 14px;
    font-size: 16px;
    color: #fff;
    cursor: pointer;
    display: block;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
	padding-left: 48px;
}

/* Respuesta seleccionada */
.respuesta1:has(input:checked) {
    border: 4px solid #CFDE01;
    background: rgba(251, 253, 254, 0.35);
    box-shadow: 0 0 0 2px rgba(207, 222, 1, 0.4);
	animation: pulse 0.35s ease;
}
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

/* Icono check */
.respuesta1:has(input:checked)::before {
    content: "✔";
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: #CFDE01;
    font-weight: bold;
}

.respuesta1:hover {
    background: rgba(251, 253, 254, 0.35);
}

.respuesta1:active {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(207, 222, 1,0.2);
	background: rgba(251, 253, 254, 0.35);
}

.respuesta1 input {
    transform: scale(1.4);
    margin-right: 12px;
}

/*Ocultar botones radio*/
.respuesta1 input[type="radio"] {
    display: none;
}

/* ============================
   STEP / PANTALLAS
   ============================ */

.step {
    position: absolute;
    /*inset: 0;*/
	
	width: 100%;
    left: 0;
    top: 0;
	
    opacity: 0;
    /*transform: translateX(40px); Transición original */
    /*transition: opacity 0.45s ease, transform 0.45s ease; Transición original */
	transform: translateY(0px) scale(1);
    transition: opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.step.active {
    position: relative;
    opacity: 1;
    /*transform: translateX(0); Transición original */
	transform: translateY(0) scale(1);
    pointer-events: auto;
}

/*
.step {
    display: none;
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.35s ease-in-out;
}

.step.active {
    display: block;
    opacity: 1;
    transform: translateX(0);
}
*/

/* ============================
   PROGRESO
   ============================ */

.progress {
    height: 25px !important;
    border-radius: 12px !important;
    overflow: hidden !important;
	background: rgba(143, 152, 185, 0.15);
}

.progress-bar {
    font-size: 14px;
    padding-top: 2px;
    transition: width 0.5s ease-in-out;
	font-weight: 800;
	color: #1c2677;
}

/*Modificación de utilities.scss, línea 64*/
.bg-warning{
	background-color: rgba(207, 222, 1, 0.8) !important;
}

/* ============================
   NAVEGACIÓN
   ============================ */

.nav-buttons img {
    width: 55px;
}

/* Navegación fija inferior */
.nav-buttons-fixed {
    position: fixed;
    bottom: 0;
    left: 50%;
	max-width: 100vw;
	box-sizing: border-box;
    transform: translateX(-50%);
    z-index: 999;
    display: flex;
    gap: 15px;
	background: rgba(0,0,0,0.35);
    padding: 10px 20px;
	margin-bottom: 5px;
    border-radius: 30px;
    backdrop-filter: blur(6px);
}

.nav-buttons-fixed button {
    background: transparent;
    border: none;
    padding: 5px;
    width: 50px;
    height: 50px;
    cursor: pointer;
}

.nav-buttons-fixed img {
    width: 100%;
    height: auto;
}

/* ============================
   CONFETI FINAL
   ============================ */

@keyframes confetti {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(600px) rotate(360deg); opacity: 0; }
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #FCBF18;
    animation: confetti 3s linear infinite;
	pointer-events: none;
}

/* ============================
   RESPONSIVE
   ============================ */

/* =====================
   DESKTOP GRANDE
   ===================== */
@media (min-width: 1200px) {

    .test-container {
        max-width: 650px;
    }

    .card-title {
        font-size: 1.6rem;
    }
}

/* =====================
   LAPTOP / TABLET HORIZONTAL
   ===================== */
@media (max-width: 1199px) {

    .test-container {
        max-width: 620px;
    }
	
	.navbar-brand img {
		max-width: 180px;
	}
}

/* =====================
   TABLET / MÓVIL GRANDE
   ===================== */
@media (max-width: 991px) {

    .test-container {
        max-width: 100%;
        padding: 14px;
    }

    .navbar-collapse {
        /*background: rgba(3,192,211,1);*/
		background: transparent;
        padding: 15px;
        border-radius: 12px;
        margin-top: 10px;
    }

    .navbar-nav .nav-link {
        margin: 8px 0;
        text-align: center;
    }

    .card {
        min-height: 90vh;
        padding: 18px !important;
    }

    .card-title {
        font-size: 1.35rem;
        margin: 28px auto;
    }
}

/* =====================
   MÓVIL
   ===================== */
@media (max-width: 767px) {

    body {
        font-size: 15px;
    }

    .card {
        min-height: 88vh;
        padding: 16px !important;
    }

    .card-title {
        font-size: 1.15rem;
        line-height: 1.4;
    }

    .respuesta1 {
        font-size: 14px;
        padding: 12px 14px 12px 46px;
    }

    .nav-buttons-fixed {
        padding: 8px 16px;
        gap: 12px;
    }

    .nav-buttons-fixed button {
        width: 44px;
        height: 44px;
    }
}

/* =====================
   MÓVIL PEQUEÑO
   ===================== */
@media (max-width: 480px) {

    .card {
        min-height: 85vh;
    }

    .card-title {
        font-size: 1.05rem;
    }

    .respuesta1 {
        font-size: 13.5px;
    }
}
