/* CSS Document */
:root {
    --MORADOOSCURO: #333;/*cabecera*/
	--LILAOSCURO:#494998;/*fondo botón inicio*/
	--LILACLARO:#B9B9FF;
	--LILATABLA_1:#C6C6FF;
	--LILATABLA_2:#D5D5FF;
	--ROSA:#DEB9FF;
    --NEGRO: #000000; /*texto en el body*/
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: sans-serif;
    background-color: var(--MORADOOSCURO);
    color: var(NEGRO);
}

/* Header */
.main-header {
	height: 60px;
	background-color: var(--MORADOOSCURO);
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0 20px;
	position: sticky;
	top: 0;
	z-index: 1000;
}

/* Hamburguesa */
.menu-toggle {
    background: none;
	color:var(--LILACLARO);
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.line {
    width: 30px;
    height: 3px;
    background-color: var(--LILACLARO);
    transition: var(--transition);
}

/* Animación a X */
.menu-toggle.active .line:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.menu-toggle.active .line:nth-child(2) { opacity: 0; }
.menu-toggle.active .line:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* Layout Principal */
.layout {
    display: flex;
    min-height: calc(100vh - 60px);
}

/* Sidebar Nav */
.nav-menu {
    width: 250px;
    background-color: var(--MORADOOSCURO);
    color: var(--LILACLARO);
    transform: translateX(-100%); /* Escondido por defecto */
    transition: var(--transition);
    position: absolute;
    min-height: 100vh;
}

.nav-menu.active { transform: translateX(0); position: relative; }
.nav-menu ul { list-style: none; padding: 10px; }
.nav-menu a { color: var(--LILACLARO); text-decoration: none; display: block; padding: 10px; }
.nav-menu a:hover { background-color: var(--LILAOSCURO); }

.submenu { padding-left: 20px; font-size: 0.9em; }

/* Main Content */
main {
	flex-grow: 1;
    padding: 0px;
	margin: 0px;
	height: auto;
	background-color: var(--MORADOOSCURO);
}




.main-header #btn-home {
}
.home-button {
	border-radius: 2rem;
	color: var(--LILACLARO);
	background-color: var(--LILAOSCURO);
	border-collapse: collapse;
	height: 1.4rem;
	width: 4rem;
	font-weight: bolder;
	font-size: 0.8rem;
	border-width: 0rem;
	letter-spacing: 0.1rem;
}
.contenedor-años {
  display: flex; /* Activa flexbox */
  justify-content: center; /* Centra las imágenes horizontalmente */
  flex-wrap: wrap; /* Permite que las imágenes bajen a la siguiente línea si no hay espacio */
  gap: 15px; /* Espacio uniforme entre imágenes */
}

.contenedor-años img {
  width: 200px; /* Tamaño definido para las imágenes */
  height: auto; /* Mantiene la proporción */
  border-radius: 8px; /* Opcional: bordes redondeados */
}


/***************************************CAROUSEL****************/
.gallery {
  display: grid;
  grid-template-columns: 40vw 60vw;
  gap: 30px;
  align-items: start;
}

/* Imagen principal */
.viewer img {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
  height: auto;
  display: block;
  cursor: pointer;
}

figcaption{
	font-size: 1rem;
	color: var(--LILACLARO);
	text-align: center;
}
figcaption span{
	font-size: 1.6rem;
	font-style: italic;
	color: var(--ROSA);
}

/* Miniaturas */
.thumbnails {
  display: grid;
  grid-template-columns: 10vw 10vw 10vw 10vw 10vw;
  gap: 12px;
}

.thumbnails figure {
  margin: 0;
  border: 0;
  cursor: pointer;
}

.thumbnails img {
  width: 50%;
  height: auto;
  display: block;
}

/* Ocultar títulos en miniaturas */
.thumbnails figcaption {
  display: none;
}

/* Thumb activo */
.thumbnails figure.active {
  border-color: none;
}

/***************************************TABLA TRAYECTORIA****************/

table {
	border-collapse: collapse;
	vertical-align: middle;
	letter-spacing: 0.04rem;
	line-height: 1.5;
	font-size: 1.2rem;
	
}
table td:first-child {
    font-weight: bold;
}
td{
	padding: 2rem;
}
tr:nth-child(odd) {
    background-color: var(--LILATABLA_1);
}

tr:nth-child(even) {
    background-color: var(--LILATABLA_2);
}

/***************************************PAGINA INICIO****************/
.TITULOGAL {
	text-align: center;
	font-size: 3rem;
	color: var(--LILATABLA_2);
}

.INICIO {
	padding: 10rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

/* Estilo opcional del contenedor padre */
.NIVEL_1 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
	background: #C7C2C2;
}

/***************************************4 imágenes por fila dentro del contenedor hijo****************/

.NIVEL_2 {
display:grid;
place-items:center;	
overflow: hidden;
/*background:#CEF2F8;*/
background:var(--MORADOOSCURO);	
}

.NIVEL_2 img {
	width: 80%;
	padding: 0.5rem;
	max-height:  15rem;
	right: 0rem;
	aspect-ratio: 1 / 1;
	object-fit: contain;
}

/***************************************ADAPTACIONES PARA MÓVILES****************/


@media (max-width: 768px) {

    /* Header */
    .main-header {
        padding: 0 10px;
    }

    .home-button {
        width: 3.5rem;
        font-size: 0.7rem;
    }

    /* Layout */
    .layout {
        flex-direction: column;
    }

    /* Menú lateral */
    .nav-menu {
        width: 100%;
        position: absolute;
        z-index: 999;
    }

    /* Galería */
    .gallery {
        grid-template-columns: 1fr;
        gap: 15px;
    }
	
	.viewer {
		display: grid;
		height: 50vh;
		place-items: center;
	}

    .viewer img {
        max-height: 50vh;
    }

    .thumbnails {
		margin-top: 2.5rem;
		display: grid;
		width: 100%;
		place-items: center;
		text-align: center;
		grid-template-columns: repeat(4, 1fr);
		gap: 0rem;
    }
	.thumbnails figure {
    display: flex;
    justify-content: center; /* Centrado horizontal */
    align-items: center; 
	}
	

	
	.thumbnails img {
		display: block;
		width: 90%;
  		object-fit: cover; /* Rellena el área sin deformarse */
    }

    /* Contenedor años */
    .contenedor-años img {
        width: 120px;
		margin: 0rem;
		padding: 0rem;
    }

    /* Tabla */
    table {
        font-size: 0.9rem;
    }

    td {
        padding: 1rem;
    }

	


	
    /* Página inicio */
    .INICIO {
		padding: 1rem;

        grid-template-columns: repeat(2, 1fr);
        padding: 0rem;
    }

    .TITULOGAL {
        font-size: 2rem;
    }

    /* Niveles */
    .NIVEL_1 {
        grid-template-columns: repeat(2, fr);
    }

    .NIVEL_2 img {
        width: 20vw;
    }
}

/* Móviles pequeños */
/*
@media (max-width: 480px) {

    .thumbnails {
        grid-template-columns: repeat(2, 1fr);
    }

    .contenedor-años img {
        width: 100px;
    }

    .home-button {
        width: 3rem;
        font-size: 0.6rem;
    }

    .TITULOGAL {
        font-size: 1.6rem;
    }
}
*/