@charset "utf-8";

/* --- CSS Document --- */

:root{
--bg-main:#f4f1ea;
--bg-alt:#ffffff;
--text-main:#2e2e2e;
--text-soft:#6a6a6a;
--accent:#9c6b3d;
--border-soft:#e5e0d8;
}

*{margin:0;padding:0;box-sizing:border-box;}

body{
font-family:'Inter',sans-serif;
background:var(--bg-main);
color:var(--text-main);
line-height:1.7;
}

h2{
font-family:'Playfair Display',serif;
font-size:2.3rem;
margin-bottom:40px;
}

h3{
font-family:'Playfair Display',serif;
margin:50px 0 20px;
color:var(--accent);
	font-size:2rem;
}

.section{
padding:120px 0;
}

.alt{
background:var(--bg-alt);
}

.container{
width:90%;
max-width:1100px;
margin:auto;
text-align:center;
}



/* --- HERO/SLIDE  --- */

.hero{
min-height:100vh;
position:relative;
overflow:hidden;
display:flex;
align-items:center;
justify-content:center;
}

.hero-slider{
position:absolute;
inset:0;
}

.slide{
position:absolute;
inset:0;
background-size:cover;
background-position:center;
opacity:0;
transition:opacity 1.5s ease;
}

.slide.active{
opacity:1;
}

.overlay{
position:absolute;
inset:0;
background:rgba(255,255,255,0.6);
}

.dots{
position:absolute;
inset:0;
background-image: radial-gradient(rgba(255,255,255,1) 1px, transparent 1px);
background-size:3px 3px;
}

.img_fondo {
	width: 100%;
}



/* --- INTRO --- */

.logo-hero{
width:700px;
position:relative;
z-index:3;
}

.hero-content{
position:relative;
z-index:5;
display:flex;
flex-direction:column;
align-items:center;
text-align:center;
gap:15px;
}

.hero-intro{
font-family:'Playfair Display',serif;
font-size:3rem;
letter-spacing:0px;
text-transform:none;
color:#000;
opacity:1;
}

.scroll-indicator{
margin-top:40px;
font-size:50px;
color:#000;
text-decoration:none;
animation:scrollFloat 2.5s ease-in-out infinite;
}

.scroll-indicator:hover{
color:#7d5431;
}

@keyframes scrollFloat{
0%{transform:translateY(0);}
50%{transform:translateY(12px);}
100%{transform:translateY(0);}
}

@media(max-width:900px){
.section {padding:80px 0;}
nav ul {flex-direction:column;}
.logo-hero {width:85%; }
.hero {min-height:100vh;}
.hero-intro{font-size:1.5rem;}
.scroll-indicator{font-size:35px;}
}




/* --- SEDE --- */

.sede-principal{
width:100%;
border-radius:8px;
margin:60px 0;
box-shadow:0 15px 40px rgba(0,0,0,0.08);
}

.galeria{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
gap:15px;
}

.galeria img{
width:100%;
border-radius:6px;
}

.sede-intro .lead{
font-size:1.15rem;
color:var(--text-main);
max-width:750px;
margin:0 auto 25px auto;
font-weight:500;
}



/* --- IMAGEN FULL WIDTH MÁS ELEGANTE --- */

.sede-imagen-full{
width:100%;
margin:70px 0;
}

.sede-imagen-full img{
width:100%;
display:block;
max-height:650px;
object-fit:cover;
}



/* --- SUBTÍTULO --- */

.subtitulo-seccion{
margin-bottom:50px;
font-size:1.6rem;
color:var(--accent);
}



/* --- GALERÍA MÁS EDITORIAL --- */

.galeria{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
gap:30px;
}

.galeria figure{
margin:0;
text-align:center;
}

.galeria img{
width:100%;
border-radius:6px;
box-shadow:0 8px 20px rgba(0,0,0,0.06);
transition:.4s ease;
}

.galeria img:hover{
transform:scale(1.04);
}

.galeria figcaption{
margin-top:10px;
font-size:0.85rem;
color:var(--text-soft);
}




/* --- MAPA --- */


.mapa-wrapper{
margin:0px 0px 0px 0px;
}

.mapa-wrapper iframe{
width:100%;
height:500px;
border:0;
display:block;
}




/* --- EQUIPO --- */

.equipo-general{
width:100%;
margin: 50px 0;
border-radius:8px;
}

.miembros{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
gap:40px;
margin-top:40px;
}

.card{
background:white;
padding:30px 30px;
border-radius:12px;
box-shadow:0 8px 25px rgba(0,0,0,0.1);
}

.card img{
width:140px;
height:140px;
border-radius:50%;
object-fit:cover;
}

.card h4{
margin-top:15px;
}

.card span{
display:block;
font-size:0.9rem;
color:var(--text-soft);
}



/* --- LABORATORIOS 

.lab-grid{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
gap:40px;
}

.lab-card{
padding:40px;
background:white;
border:1px solid var(--border-soft);
border-radius:12px;
text-decoration:none;
color:inherit;
transition:.3s;
}

.lab-card:hover{
border-color:var(--accent);
box-shadow:0 10px 30px rgba(0,0,0,0.07);
}
.bg_labs {
	background: url("img/.jpg") center scroll;
}
--- */







/* LABORATORIOS */

.laboratorios{
display:grid;
grid-template-columns:repeat(4,1fr);
gap:40px;
padding:0px 10%;
}

.lab-col h3{
font-size: 1.5rem;
text-align:center;
margin-bottom:30px;
font-weight:600;
color:var(--accent);
}

.lab-card{
background:white;
border-radius:6px;
overflow:hidden;
box-shadow:0 4px 12px rgba(0,0,0,0.08);
margin-bottom:20px;
display:flex;
flex-direction:column;
height:auto;
padding: 0px;
width: 100%;
}

.lab-card img{
width:100%;
height:60%;
object-fit:cover;
}

.lab-card-title{
display:flex;
align-items:center;
justify-content:center;
text-align:center;
padding:20px 20px 20px 20px;
font-size:16px;
font-weight:500;
line-height:20px;

}

.lab-card-text{

display:flex;
align-items:center;
justify-content:center;
text-align:center;
padding:0px 20px 30px 20px;
font-size:13px;
font-weight:1;
line-height: 16px;
}

@media (max-width:900px){

.laboratorios{
grid-template-columns:1fr;
gap:60px;
}

.lab-col{
max-width:400px;
margin:auto;
}

}




/* --- BOTONES --- */

.botones{
display:flex;
justify-content:center;
gap:20px;
flex-wrap:wrap;
margin-bottom:60px;
}

button{
padding:15px 30px;
border:none;
background:var(--accent);
color:white;
cursor:pointer;
border-radius:6px;
transition:.3s;
}

button:hover{
background:#7d5431;
}




/* --- FORMULARIO --- */

form{
max-width:600px;
margin:40px auto;
display:flex;
flex-direction:column;
gap:20px;
}

input, textarea{
padding:15px;
border:1px solid var(--border-soft);
border-radius:6px;
font-family:'Inter';
}

textarea{min-height:120px;}

footer{
background:#1f1f1f;
color:#ddd;
padding:80px 0;
text-align:center;
}

.footer-logos img{
max-height:60px;
margin:10px;
filter:grayscale(100%);
opacity:0.8;
}

.pointer {
	top: 5px;
	height: 15px;
	margin-right: 5px;
}
txt_big{
	font-size: 2rem;
}



/* --- LIGHTBOX NIVEL MUSEO --- */


#lightbox{
position:fixed;
inset:0;
background:rgba(10,10,10,0.92);
backdrop-filter:blur(6px);
display:flex;
align-items:center;
justify-content:center;
opacity:0;
visibility:hidden;
transition:.4s ease;
z-index:3000;
}

#lightbox.active{
opacity:1;
visibility:visible;
}

.lightbox-content{
position:relative;
text-align:center;
max-width:95%;
max-height:95%;
}

#lightbox-img{
max-width:90vw;
max-height:75vh;
border-radius:4px;
box-shadow:0 25px 80px rgba(0,0,0,0.6);
transform:scale(.92);
opacity:0;
transition:.4s ease;
}

#lightbox.active #lightbox-img{
transform:scale(1);
opacity:1;
}

.caption{
margin-top:20px;
font-size:0.95rem;
color:#ddd;
letter-spacing:.5px;
}

.cerrar{
position:absolute;
top:-50px;
right:0;
font-size:35px;
color:#fff;
cursor:pointer;
opacity:.8;
transition:.3s;
}

.cerrar:hover{opacity:1;}

.nav{
position:absolute;
top:50%;
transform:translateY(-50%);
background:none;
border:none;
color:white;
font-size:40px;
cursor:pointer;
padding:20px;
opacity:.6;
transition:.3s;
}

.nav:hover{opacity:1;}

.prev{left:-70px;}
.next{right:-70px;}

@media(max-width:900px){
.prev{left:-40px;}
.next{right:-40px;}
#lightbox-img{max-height:65vh;}
}






/* --- SECCIÓN SOBRE --- */

.sobre-section{
background:var(--bg-main);
}

.objetivos-grid{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
gap:40px;
margin-top:60px;
margin-bottom:90px;
}

.objetivo-card{
background:var(--bg-alt);
padding:50px;
border-radius:10px;
box-shadow:0 10px 30px rgba(0,0,0,0.04);
text-align:left;
position:relative;
}

.objetivo-label{
display:inline-block;
font-family:'Playfair Display',serif;
font-size:1.3rem;
margin-bottom:25px;
color:var(--accent);
border-bottom:2px solid var(--accent);
padding-bottom:8px;
}

.objetivo-card p{
font-size:1rem;
color:var(--text-soft);
line-height:1.8;
}

/* --- MARCO NORMATIVO --- */

.marco-institucional{
border-top:1px solid var(--border-soft);
padding-top:60px;
text-align:center;
}

.marco-institucional h3{
margin-bottom:40px;
font-size:1.6rem;
}

.normativas{
display:flex;
flex-direction:column;
gap:20px;
max-width:700px;
margin:0 auto;
}

.normativas a{
text-decoration:none;
padding:18px 25px;
border:1px solid var(--border-soft);
border-radius:6px;
background:white;
transition:.3s ease;
font-size:0.95rem;
color:var(--text-main);
}

.normativas a:hover{
border-color:var(--accent);
box-shadow:0 10px 25px rgba(0,0,0,0.05);
transform:translateY(-3px);
}





/* --- BOTÓN VOLVER ARRIBA --- */

#backToTop{
font-family:'Playfair Display',serif;
position:fixed;
right:20px;
bottom:20px;
width:45px;
height:45px;
padding: 25px 30px 25px 30px;
border-radius:50px;
border:none;
background:var(--accent);
color:white;
font-size:3rem;
font-weight: normal;
cursor:pointer;
display:flex;
align-items:center;
justify-content:center;
box-shadow:0 8px 25px rgba(0,0,0,0.5);
opacity:0;
visibility:hidden;
transform:translateY(20px);
transition:all .3s ease;
z-index:1500;
}

#backToTop:hover{
background:#7d5431;
transform:translateY(0) scale(1.05);
}

#backToTop.show{
opacity:1;
visibility:visible;
transform:translateY(0);
}

@media(max-width:900px){
#backToTop{right:20px;bottom:20px;width:45px;height:45px;}
}






/* --- NAV MENU --- */

#nav-mobile {visibility: hidden; display: none;}
#nav-full {visibility: visible;}

nav{
position:sticky;
width: 100%;
top:0;
background:rgba(255,255,255,1);
backdrop-filter:blur(6px);
border-bottom:1px solid var(--border-soft);
z-index:999;
height: auto;
padding: 0px;
}

nav ul{
display:flex;
justify-content:center;
gap:10px;
padding:20px 0px 20px 0px;
list-style:none;
}
nav li{

}

nav a{
text-decoration:none;
line-height: 3rem;
font-size:0.8rem;
text-transform:uppercase;
letter-spacing:1px;
color:var(--accent);
transition: all .3s ease;
padding: 0px 15px 0px 15px;
}

nav a:hover{
color:var(--text-main);
padding: 37px 15px 37px 15px;
background-color: var(--bg-main);
}

nav img{
width: 90px;
padding-top: 0px;
vertical-align: middle;	
}


.nav-toggle {
	width: 50px;
    display: none;
    flex-direction: column;
    gap: 5px;
    background: var(--accent);
    border: none;
    cursor: pointer;
	position: fixed;
    right: 20px;
	color: #000;
	margin-top: 15px;
	border-radius: 50px;
	z-index:1000;
	box-shadow:0 8px 25px rgba(0,0,0,0.5);
}

.nav-toggle span {
    width: 20px;
    height: 3px;
    background: white;
    border-radius: 2px;
}

.logoCIRAT_mobile img {
	position: fixed;
	left: 15px;
	top: 15px;
	width: 100px;
	padding: 15px 15px 15px 20px;
	border-radius: 25px;
	z-index: 1500;
	background: white;
	visibility: hidden;
	box-shadow:0 8px 25px rgba(0,0,0,0.5);
	
}

@media (max-width:900px) {
    .nav-container {justify-content: center;}
    .nav-toggle {display: flex;margin-right: auto;margin-left: auto;align-items: center;}
    .nav-menu {position: relative;top: 0px;left: 0;width: 100%;height: 100vh;font-size: 1.8rem;line-height: 3rem;background: #fff;flex-direction: column;align-items: center;gap: 30px;padding: 60px 0;display: none;}
    .nav-menu.active {display: flex;height: 100vh;}
	.nav {padding: 10px 0px 10px 0px;}
	nav a {font-size: 1.5rem;}
	#nav-mobile {visibility: visible; display: block;}
	#nav-full {visibility: hidden;}
	.logoCIRAT_mobile img {visibility: visible;}

}





/* TIMELINE */


/* TIMELINE MUSEO */

.timeline-museo{
background:var(--bg-main);
padding:0px;
overflow:hidden;
z-index: 2000;
	height: 1000px;
	display: flex;
	
}

/* contenedor scroll */

.timeline-scroll{

overflow-x:auto;
padding:600px 0px 700px 0px;
scroll-behavior:smooth;
}

/* track largo */

.timeline-track{
position:relative;
display:flex;
justify-content:space-between;
align-items:center;
margin-top:120px;
}

/* línea */

.timeline-line{
position:absolute;
top:50%;
left:0;
width:100%;
height:2px;
background:var(--border-soft);
transform:translateY(-50%);
}

.timeline-progress{
position:absolute;
top:50%;
left:0;
height:2px;
background:var(--accent);
width:0%;
transform:translateY(-50%);
transition:.4s ease;
}
/* evento */

.timeline-event{
position:relative;
display:flex;
flex-direction:column;
align-items:center;
min-width:120px;
}

/* punto */

.timeline-dot{
width:18px;
height:18px;
background:white;
border:3px solid var(--accent);
border-radius:50%;
z-index:2;
cursor:pointer;
transition:.3s;
}

.timeline-dot:hover{
background:var(--accent);
transform:scale(1.2);
}

/* año */

.timeline-year{
margin-top:15px;
font-size:.9rem;
color:var(--text-soft);
letter-spacing:1px;
}

/* card */

.timeline-card{
position:absolute;
width:280px;
background:white;
border-radius:10px;
box-shadow:0 25px 60px rgba(0,0,0,0.15);
padding:20px;
transition:.35s;
}

/* imagen */

.timeline-card img{
width:100%;
height:140px;
object-fit:cover;
border-radius:5px 5px 0px 0px;
margin-bottom:0px;
}

/* texto */

.timeline-card h3{
margin:0px 0px 0px 0px;
font-size:1.1rem;
color:var(--accent);
}

.timeline-card p{
margin:0px 10px 20px 10px;
font-size:.9rem;
color:var(--text-soft);
line-height:1.5;
}

/* hover */

.timeline-event:hover .timeline-card{
opacity:1;
transform:translateY(0);
pointer-events:auto;
}

/* scrollbar elegante */

.timeline-scroll::-webkit-scrollbar{
height:30px;
}

.timeline-scroll::-webkit-scrollbar-thumb{
background:var(--border-soft);
border-radius:3px;
}













/* EVENTOS */

.timeline-event{
position:relative;
display:flex;
flex-direction:column;
align-items:center;
width:120px;
}

/* animación al entrar */

.timeline-event.visible{
opacity:1;
transform:translateY(0);
}

/* CARDS */

.timeline-card{
position:absolute;
width:240px;
background:white;
border-radius:8px;
box-shadow:0 20px 45px rgba(0,0,0,0.12);
padding:0px;
opacity:1;
transition:.3s;
pointer-events:none;
}

.timeline-event:hover .timeline-card{
opacity:1;
}

.timeline-event.top .timeline-card{
bottom:70px;
}

.timeline-event.bottom .timeline-card{
top:70px;
}

/* punto */

.timeline-dot{
width:18px;
height:18px;
border-radius:50%;
border:3px solid var(--accent);
background:white;
cursor:pointer;
transition:.3s;
}

.timeline-dot:hover{
background:var(--accent);
transform:scale(1.2);
}

/* fondo histórico */

.timeline-museo{
background:var(--bg-main);
padding:140px 0;
position:relative;
overflow:hidden;
}

.timeline-museo::before{
content:"";
position:absolute;
inset:0;
background:url("img/mapa_historia.png") center/cover no-repeat;
opacity:0.08;
pointer-events:none;
}

.timeline-event{
opacity:0;
transform:translateY(50px);
transition:.7s ease;
}

.timeline-event.visible{
opacity:1;
transform:translateY(0);
}

@media(max-width:768px){

.timeline-track{
flex-direction:column;
gap:80px;
margin-top:80px;
}

.timeline-line{
width:2px;
height:100%;
left:50%;
top:0;
transform:none;
}

.timeline-event{
width:auto;
}

.timeline-event .timeline-card{
position:relative;
opacity:1;
margin-top:20px;
pointer-events:auto;
}

.timeline-event.top .timeline-card,
.timeline-event.bottom .timeline-card{
top:auto;
bottom:auto;
}

}