

/*Estils generals per a totes les pàgines*/

body{
    font-family: Tahoma, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
	}

main{
    width: 90%;
    margin: 20px auto;
    background-color: white;
    padding: 25px;
    border-radius: 10px;
	}

main h2{
    font-size: 35px;
    color: black;
    margin-bottom: 15px;
	}

figure{
    margin: 0;
	}


/*CAPÇALERA (Inclou el títol principal i el logo dels jocs olimpics)*/

header{
    position: relative;
    background: linear-gradient(to bottom, #ffffff, #f1f1f1);
    color: black;
    padding: 45px 20px;
    text-align: center;
    border-bottom: 4px solid #0085C7;
	}

header h1{
    margin: 0;
    font-size: 52px;
    letter-spacing: 2px;
    font-weight: bold;
	}

header p{
    margin-top: 10px;
    font-size: 18px;
    color: #555;
	}

/*Logo situat a l'esquerra de la capçalera*/
.logo-header{
    position: absolute;
    left: 35px;
    top: 50%;
    transform: translateY(-50%);
}

.logo-header img{
    width: 140px;
    height: auto;
	}


/* MENÚ DE NAVEGACIÓ (El menú és igual en totes les pàgines*/

nav{
    background-color: black;
    padding: 10px;
	}

nav ul{
    list-style: none;
    padding: 0;
    text-align: center;
	}

nav ul li{
    display: inline;
    margin: 0 15px;
	}

nav ul li a{
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: bold;
	}

.active{
    background-color: #0085C7;
	}

/*Al passar el cursor pel menú apereix un color diferent per representar l'estil olimpic*/

nav ul li:nth-child(1) a:hover{
    background-color: #0085C7;
	}

nav ul li:nth-child(2) a:hover{
    background-color: #009F3D;
	}

nav ul li:nth-child(3) a:hover{
    background-color: #F4C300;
    color: black;
	}

nav ul li:nth-child(4) a:hover{
    background-color: #DF0024;
	}

nav ul li:nth-child(5) a:hover{
    background-color: #444;
	}

nav ul li:nth-child(6) a:hover{
    background-color: #FF6B00;
	}

nav ul li:nth-child(7) a:hover{
    background-color: #7a5cff;
	}


/*PÀGINA D'INICI*/
   
/*Caixes principals de presentació del projecte*/
.caixes-section{
    margin-top: 30px;
	}

.caixes{
    display: flex;
    gap: 20px;
	}

.caixa{
    background-color: #f5f5f5;
    padding: 30px;
    border-radius: 16px;
    width: 50%;
    transition: 0.3s;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    border-top: 5px solid #0085C7;
	}

.caixa:hover{
    transform: translateY(-3px);
}

.caixa h3{
    font-size: 30px;
    margin-top: 0;
    color: #0085C7;
}

/*Millora la lectura dels textos dins les caixes*/
.caixa p,
.caixa li{
    line-height: 1.7;
	}

.bloc-text,
.bloc-dades{
    margin-top: 20px;
	}

.bloc-dades h4{
    margin-bottom: 10px;
	}


/* CARRUSSELL DE LA PÀGINA D'INICI*/

.carrussell{
    margin-top: 20px;
    text-align: center;
	}

.slides{
    position: relative;
    height: 260px;
    overflow: hidden;
	}

.slides .slide{
    display: none;
    position: absolute;
    width: 100%;
	}

/* Mostra la primera imatge del carrussell per defecte*/
.slides .slide:nth-of-type(8){
    display: block;
	}

/* Amaga totes les imatges quan es selecciona un punt*/
#slide1:target ~ .slide,
#slide2:target ~ .slide,
#slide3:target ~ .slide,
#slide4:target ~ .slide,
#slide5:target ~ .slide,
#slide6:target ~ .slide,
#slide7:target ~ .slide{
    display: none;
	}

/* Mostra només la imatge seleccionada */
#slide1:target ~ .slide:nth-of-type(8){
    display: block;
	}

#slide2:target ~ .slide:nth-of-type(9){
    display: block;
	}

#slide3:target ~ .slide:nth-of-type(10){
    display: block;
	}

#slide4:target ~ .slide:nth-of-type(11){
    display: block;
	}

#slide5:target ~ .slide:nth-of-type(12){
    display: block;
	}

#slide6:target ~ .slide:nth-of-type(13){
    display: block;
	}

#slide7:target ~ .slide:nth-of-type(14){
    display: block;
	}


.slide img{
    max-width: 100%;
    height: 260px;
    object-fit: contain;
	}

/*Punts de navegació del carrussell*/
.navegacio{
    margin-top: 10px;
	}

.navegacio a{
    display: inline-block;
    width: 12px;
    height: 12px;
    background-color: #ccc;
    border-radius: 50%;
    margin: 5px;
    overflow: hidden;
    text-indent: -9999px;
	}

.navegacio a:hover{
    background-color: #666;
	}

.peu-imatge{
    font-size: 14px;
    color: #333;
	}


/* TAULES GENERALS*/

table{
    font-family: Arial, Helvetica, sans-serif;
    border-collapse: collapse;
    width: 100%;
	}

td,
th{
    border: 1px solid #ddd;
    padding: 8px;
	}

tr:nth-child(even){
    background-color: #f2f2f2;
	}

tr:hover{
    background-color: #ddd;
	}

th{
    padding-top: 12px;
    padding-bottom: 12px;
    text-align: left;
    background-color: #04AA6D;
    color: white;
	}


/*PÀGINA RÈCORDS*/

.seccio-record{
    background-color: #ffffff;
    border-radius: 14px;
    padding: 25px;
    margin-top: 35px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
	}

/* Taula específica de rècords */
.taula-records{
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 25px 0;
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #dcdcdc;
	}

.taula-records th{
    background-color: #0085C7;
    color: white;
    text-align: left;
    padding: 12px;
	}

.taula-records td{
    padding: 10px;
    border-bottom: 1px solid #ddd;
	}

.taula-records tr:nth-child(even){
    background-color: #f4f4f4;
	}

.taula-records tr:hover{
    background-color: #e8f4fb;
	}

/*Imatges de la secció de rècords*/
.imatge-seccio{
    text-align: center;
    margin: 25px 0 30px 0;
	}

.imatge-seccio img{
    width: 75%;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
    border: 3px solid #333;
    display: block;
    margin: 0 auto;
	}

/*Peu de foto per explicar el contingut de la imatge*/
.imatge-seccio figcaption{
    margin-top: 12px;
    font-size: 15px;
    color: #666;
    font-style: italic;
	}

/*Caixa final amb informació destacada*/
.info-records{
    margin-top: 30px;
    background-color: #eef7fc;
    border-left: 6px solid #0085C7;
    padding: 20px 25px;
    border-radius: 10px;
	}

.info-records h3{
    margin-top: 0;
    margin-bottom: 15px;
	}

.info-records p{
    margin-bottom: 12px;
    line-height: 1.6;
	}


/*CARRUSSELL D'ALTRES ESPORTS (Segon carrussell en la pàgina de rècords)*/

.altres-esports{
    margin-top: 35px;
    background-color: #f5f5f5;
    padding: 25px;
    border-radius: 14px;
	}

.altres-esports article{
    margin-top: 20px;
	}

.altres-esports h4{
    margin-bottom: 10px;
	}

.carrussell-esports{
    margin-top: 30px;
    text-align: center;
	}

.slides-esports{
    position: relative;
    height: 350px;
    text-align: center;
	}

.slides-esports .slide-esport{
    display: none;
    position: absolute;
    width: 100%;
	}

.slide-esport img{
    max-width: 70%;
    max-height: 350px;
    object-fit: contain;
    border-radius: 12px;
    border: 2px solid #333;
    display: inline-block;
	}


.slides-esports .slide-esport:nth-of-type(4){
    display: block;
	}


#esport1:target ~ .slide-esport,
#esport2:target ~ .slide-esport,
#esport3:target ~ .slide-esport{
    display: none;
	}

#esport1:target ~ .slide-esport:nth-of-type(4){
    display: block;
	}

#esport2:target ~ .slide-esport:nth-of-type(5){
    display: block;
	}

#esport3:target ~ .slide-esport:nth-of-type(6){
    display: block;
	}

.navegacio-esports{
    margin-top: 15px;
	}

.navegacio-esports a{
    display: inline-block;
    width: 14px;
    height: 14px;
    background-color: #bdbdbd;
    border-radius: 50%;
    margin: 6px;
    overflow: hidden;
    text-indent: -9999px;
    transition: 0.3s;
	}

.navegacio-esports a:hover{
    background-color: #0085C7;
    transform: scale(1.15);
	}


/*PÀGINA MEDALLES*/

.intro-medalles{
    margin-bottom: 30px;
	}

.podi-section{
    margin-top: 30px;
	}

/* Distribució del podi*/
.podi{
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 25px;
    margin: 35px 0;
	}

.podi-card{
    width: 28%;
    padding: 25px;
    border-radius: 14px;
    text-align: center;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    border: 2px solid #ddd;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
	}

/*Capa blanca per llegir bé el text sobre les banderes*/
.podi-card::before{
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.88);
	}

/*Situa el text per sobre de la capa blanca*/
.podi-card *{
    position: relative;
    z-index: 2;
	}

.podi-card h4{
    font-size: 24px;
    margin: 10px 0;
	}

/*Banderes de fons dels països del podi, no es posa en el html perquè formen part del background*/
.usa{
    background-image: url("../img/bandera-usa.png");
	}

.xina{
    background-image: url("../img/bandera-xina.webp");
	}

.japo{
    background-image: url("../img/bandera-japo.svg");
	}

/*Posicions dins del podi*/
.posicio{
    display: inline-block;
    font-size: 30px;
    font-weight: bold;
    padding: 10px 18px;
    border-radius: 50%;
    margin-bottom: 10px;
	}

.primer{
    min-height: 280px;
    border-color: #ddd;
    border-top: 6px solid #F4C300;
	}

.primer .posicio{
    background-color: #F4C300;
    color: black;
	}

.segon{
    min-height: 230px;
    border-color: #ddd;
    border-top: 6px solid #bfc1c2;
	}

.segon .posicio{
    background-color: #bfc1c2;
    color: black;
	}

.tercer{
    min-height: 210px;
    border-color: #ddd;
    border-top: 6px solid #cd7f32;
	}

.tercer .posicio{
    background-color: #cd7f32;
    color: white;
	}

.total{
    font-weight: bold;
    color: #0085C7;
    font-size: 18px;
	}

/*Taula del medaller*/
.taula-medalles{
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 25px 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #dcdcdc;
	}

.taula-medalles th{
    background-color: #0085C7;
    color: white;
    padding: 12px;
    text-align: left;
	}

.taula-medalles td{
    padding: 10px;
    border-bottom: 1px solid #ddd;
	}

.taula-medalles tr:nth-child(even){
    background-color: #f4f4f4;
	}

.taula-medalles tr:hover{
    background-color: #e8f4fb;
	}

/*Caixa informativa de dades de medalles*/
.dades-medalles{
    margin-top: 30px;
    background-color: #eef7fc;
    border-left: 6px solid #0085C7;
    padding: 20px 25px;
    border-radius: 10px;
	}

.dades-medalles ul{
    margin-left: 20px;
	}

.dades-medalles li{
    margin-bottom: 10px;
	}


/*PÀGINA TENDÈNCIES*/

.intro-tendencies{
    margin-bottom: 30px;
	}

.comparativa-tendencies{
    margin-top: 30px;
	}

/*Targetes per comparar potències olímpiques*/
.targetes-tendencies{
    display: flex;
    gap: 25px;
    margin: 30px 0;
	}

.targeta-potencia{
    width: 33%;
    padding: 25px;
    border-radius: 14px;
    background-color: #f4f4f4;
    border-top: 6px solid #0085C7;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
    transition: 0.3s;
	}

.targeta-potencia:hover{
    transform: translateY(-4px);
	}

.targeta-potencia h4{
    font-size: 24px;
    margin-top: 0;
	}

/*Colors diferents segons el país*/
.usa-tendencia{
    border-top-color: #0085C7;
	}

.xina-tendencia{
    border-top-color: #DF0024;
	}

.russia-tendencia{
    border-top-color: #222;
	}

/*Imatge de la pàgina de tendències*/
.imatge-tendencies{
    text-align: center;
    margin: 35px 0;
	}

.imatge-tendencies img{
    width: 75%;
    max-width: 1100px;
    height: 320px;
    object-fit: cover;
    border-radius: 12px;
    border: 4px solid #333;
	}

.imatge-tendencies figcaption{
    margin-top: 8px;
    font-size: 14px;
    color: #555;
	}

/*Taules de tendències*/
.taula-tendencies{
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 25px 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #dcdcdc;
	}

.taula-tendencies th{
    background-color: #0085C7;
    color: white;
    padding: 12px;
    text-align: left;
	}

.taula-tendencies td{
    padding: 10px;
    border-bottom: 1px solid #ddd;
	}

.taula-tendencies tr:nth-child(even){
    background-color: #f4f4f4;
	}

.taula-tendencies tr:hover{
    background-color: #e8f4fb;
	}

/*Caixa final amb conclusions de la comparativa*/
.conclusions-tendencies{
    margin-top: 30px;
    background-color: #eef7fc;
    border-left: 6px solid #0085C7;
    padding: 20px 25px;
    border-radius: 10px;
	}

.conclusions-tendencies ul{
    margin-left: 20px;
	}

.conclusions-tendencies li{
    margin-bottom: 10px;
	}


/*PÀGINA EDICIONS*/

.intro-edicions{
    margin-bottom: 30px;
	}

.llista-edicions{
    margin-top: 30px;
	}

/*Targeta horitzontal amb text i imatge*/
.edicio-card{
    display: flex;
    align-items: center;
    gap: 25px;
    background-color: #f5f5f5;
    border-radius: 14px;
    padding: 30px 40px;
    margin: 0 auto 35px auto;
    width: 88%;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
	}

.edicio-text{
    width: 58%;
	}

.edicio-text h3{
    margin-top: 0;
    color: #0085C7;
	}

.edicio-text h4{
    margin-bottom: 8px;
	}

.edicio-text ul{
    margin-left: 20px;
	}

.edicio-text li{
    margin-bottom: 6px;
	}

.edicio-imatge{
    width: 42%;
    display: flex;
    justify-content: center;
    align-items: center;
	}

/*Imatge de cada edició*/
.edicio-imatge img{
    width: 100%;
    max-width: 520px;
    height: auto;
    border-radius: 14px;
    border: 3px solid #333;
    display: block;
	}


/*PÀGINA ATLETES*/

.intro-atletes{
    margin-bottom: 35px;
	}

/* Estructura principal (llista d'atletes + aside lateral)*/
.contingut-atletes{
    display: flex;
    gap: 30px;
    align-items: flex-start;
	}

.llista-atletes{
    width: 72%;
	}

/*Targeta individual de cada atleta*/
.atleta-card{
    display: flex;
    gap: 25px;
    background-color: #f5f5f5;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: 0.3s;
	}

.atleta-card:hover{
    transform: translateY(-4px);
	}

.atleta-imatge{
    width: 35%;
	}

.atleta-imatge img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 14px;
    border: 3px solid #333;
	}

.atleta-text{
    width: 65%;
	}

.atleta-text h3{
    margin-top: 0;
    margin-bottom: 15px;
    color: #0085C7;
    font-size: 28px;
	}

.atleta-text p{
    line-height: 1.6;
    margin-bottom: 10px;
	}

/*Caixa lateral amb dades complementàries*/
.aside-atletes{
    width: 28%;
    background-color: #eef7fc;
    border-left: 6px solid #0085C7;
    padding: 25px;
    border-radius: 14px;
    position: sticky;  /*Manté l'aside visible mentre es fa scroll per la pàgina */
    top: 20px;
	}

.aside-atletes h3{
    margin-top: 0;
    margin-bottom: 20px;
	}

.aside-atletes article{
    margin-bottom: 25px;
	}

.aside-atletes h4{
    margin-bottom: 8px;
    color: #0085C7;
	}

.aside-atletes p{
    line-height: 1.5;
	}

/*Taula d'altres atletes destacats*/
.taula-atletes-section{
    margin-top: 40px;
	}

.taula-atletes{
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #dcdcdc;
	}

.taula-atletes th{
    background-color: #0085C7;
    color: white;
    padding: 12px;
    text-align: left;
	}

.taula-atletes td{
    padding: 10px;
    border-bottom: 1px solid #ddd;
	}

.taula-atletes tr:nth-child(even){
    background-color: #f4f4f4;
	}

.taula-atletes tr:hover{
    background-color: #e8f4fb;
	}

/*Resum final de la pàgina d'atletes*/
.resum-atletes{
    margin-top: 40px;
    background-color: #f5f5f5;
    padding: 25px;
    border-radius: 14px;
    border-left: 6px solid #FF6B00;
	}

.resum-atletes h3{
    margin-top: 0;
	}
	
.resum-atletes ul{
    margin-left: 20px;
	}

.resum-atletes li{
    margin-bottom: 12px;
    line-height: 1.6;
	}


/*PÀGINA CONTACTE*/

.intro-contacte{
    margin-bottom: 35px;
	}

.intro-contacte h2{
    font-size: 40px;
    margin-bottom: 15px;
    color: black;
	}

/*Distribució principal (aside a l'esquerra i formulari a la dreta)*/
.contacte-principal{
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin-top: 30px;
    flex-direction: row-reverse;
	}

/*Caixa del formulari*/
.formulari-contacte{
    width: 65%;
    background-color: #f5f5f5;
    padding: 30px;
    border-radius: 16px;
    border-top: 5px solid #0085C7;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
	}

.formulari-contacte h3{
    margin-top: 0;
    margin-bottom: 25px;
    color: #0085C7;
    font-size: 28px;
	}

/*Formulari en columna per facilitar la lectura*/
form{
    display: flex;
    flex-direction: column;
	}

form label{
    font-weight: bold;
    margin-bottom: 8px;
    margin-top: 15px;
	}

form input,
form select,
form textarea{
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-family: Tahoma, Verdana, sans-serif;
    font-size: 15px;
	}

/*Efecte visual quan l'usuari selecciona un camp*/
form input:focus,
form select:focus,
form textarea:focus{
    outline: none;
    border-color: #0085C7;
    box-shadow: 0 0 6px rgba(0,133,199,0.35);
	}

form textarea{
    resize: vertical;
	}

form button{
    margin-top: 25px;
    padding: 14px;
    background-color: #0085C7;
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
	}

form button:hover{
    background-color: black;
    transform: translateY(-2px);
	}

/*Caixa lateral amb dades de contacte*/
.info-contacte{
    width: 35%;
    background-color: #eef7fc;
    border-left: 6px solid #0085C7;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
	}

.info-contacte h3{
    margin-top: 0;
    margin-bottom: 25px;
	}

.info-contacte article{
    background-color: white;
    padding: 18px;
    border-radius: 12px;
    margin-bottom: 18px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
	}

.info-contacte h4{
    margin-top: 0;
    margin-bottom: 8px;
    color: #0085C7;
	}

.info-contacte p{
    margin-bottom: 0;
    line-height: 1.5;
	}

/*Caixes inferiors amb informació complementària*/
.caixes-contacte{
    display: flex;
    gap: 25px;
    margin-top: 40px;
	}

.contacte-card{
    width: 33%;
    background-color: #f5f5f5;
    padding: 25px;
    border-radius: 16px;
    border-top: 5px solid #0085C7;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: 0.3s;
	}

.contacte-card:hover{
    transform: translateY(-4px);
	}

.contacte-card h3{
    margin-top: 0;
    color: #0085C7;
    font-size: 24px;
	}

.contacte-card p,
.contacte-card li{
    line-height: 1.6;
	}

.contacte-card ul{
    margin-left: 20px;
	}

.contacte-card li{
    margin-bottom: 8px;
	}

.contacte-card a{
    color: #0085C7;
    font-weight: bold;
    text-decoration: none;
	}

.contacte-card a:hover{
    text-decoration: underline;
	}


/*PEU DE PÀGINA*/

footer{
    background-color: black;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 30px;
	}

/*Enllaç a la memòria final del projecte*/
footer a{
    color: white;
    font-weight: bold;
    text-decoration: underline;
	}

footer a:hover{
    color: #0085C7;
	}

a

/* ARREGLO RESPONSIVE FINAL */

*{
    box-sizing: border-box;
}

body{
    margin: 0;
    overflow-x: hidden;
}

img{
    max-width: 100%;
    height: auto;
}

/* HEADER */
header{
    position: relative;
}

@media screen and (max-width: 900px){

    header{
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px 10px;
    }

    .logo-header{
        position: static !important;
        transform: none !important;
        margin-bottom: 10px;
    }

    .logo-header img{
        width: 90px;
    }

    header h1{
        font-size: 28px;
        line-height: 1.2;
        margin: 10px 0;
    }

    header p{
        font-size: 15px;
        margin: 0;
    }

    /* NAV */
    nav ul{
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0;
        margin: 0;
    }

    nav ul li{
        display: block;
        width: 100%;
        margin: 0;
        text-align: center;
    }

    nav ul li a{
        display: block;
        width: 100%;
        padding: 12px;
    }

    /* MAIN */
    main{
        width: 95%;
        margin: 20px auto;
        padding: 15px;
    }

    /* CAIXES INDEX */
    .caixes{
        display: flex;
        flex-direction: column;
        gap: 25px;
    }

    .caixa{
        width: 100% !important;
    }

    /* CARRUSSELL */
    .carrussell{
        width: 100%;
        overflow: hidden;
    }

    .slides{
        width: 100%;
        display: block;
    }

    .slide{
        width: 100%;
    }

    .slide figure{
        margin: 0;
        width: 100%;
    }

    .slide img{
        width: 100%;
        max-height: 260px;
        object-fit: contain;
        display: block;
        margin: auto;
    }

    .navegacio{
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        margin-top: 15px;
    }

    .navegacio a{
        padding: 8px 10px;
    }

    footer{
        text-align: center;
        padding: 20px 10px;
    }
}