/* Estils i configuració generals */
:root {
    --max-width: 1000px;
    --col-bg:    #fff;
    --col-fg:    #000;
    --col-title: #1F9ADE;
    --col-gray1: #d8d8d8;
    --col-gray2: #bbb;
    --col-gray3: #888;
}
::selection {
    color: var(--col-bg);
    background-color: var(--col-gray3);
}
@font-face {
    font-family: 'Raleway';
    src: url('/Raleway-Variable.ttf');
}
* {
	font-family: "Raleway";
    box-sizing: border-box;
}
body {
    padding: 0;
    margin: 0;
	font-size: 18px;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--bg);
    overflow-x: hidden;
    min-height: 100vh;
}
a {
    text-decoration: none;
    color: var(--col-fg);
}
svg {
    width: 1.2em;
    margin: .1em;
}

/* Capçalera */
header {
    width: 100%;
    background: var(--col-gray1);
    border-bottom: 3px solid var(--col-fg);
}
header > div {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2em;

    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    grid-template-areas:
        "title  langs"
        "title  social"
        "links  links";
}
.header-titol {
    grid-area: title;
}
.header-titol h1 {
    color: var(--col-title);
    font-size: 2em;
}
.header-langs {
    grid-area: langs;
    display: table;
}
.header-langs span {
    display: table-cell;
    vertical-align: bottom;
    text-align: right;
    padding: .1em;
}
.header-langs span a {
    transition: all .4s;
}
.header-langs span a:hover {
    opacity: .5;
}
.lang-active {
    font-weight: bold;
    opacity: 1 !important;
}
.header-social {
    grid-area: social
}
.header-social a {
    transition: all .4s;
}
.header-social a:hover {
    opacity: .5;
}
.header-links {
    grid-area: links;
    display: flex;
}
.header-links a {
    flex-grow: 1;
    text-align: center;
    padding: .7em 0;
    transition: all .4s;
}
.header-links a:hover {
    background-color: var(--col-gray2);
    border-radius: 30% 0;
}
.header-link-sel {
    color: var(--col-bg);
    background-color: var(--col-fg) !important;
    border-radius: 30% 0;
}
.menu-toggle,
.header-menu-mobil,
.header-links-title,
.header-links-overlay {
    display: none;
}

/* Peu de pàgina */
footer {
    margin-top: auto;
    width: 100%;
    background-color: var(--col-gray3);
    border-top: 3px solid var(--col-fg);
    display: flex;
    padding: .8em;
    font-size: .9em;
}
footer span {
    flex-grow: 1;
    text-align: center;
}

/* Pàgina d'inici */
.index-galeria-portada {
    display: grid;
    grid-template-columns: 30% 1fr 1fr 1fr;
    gap: 0;
    width: 100%;
}
.index-galeria-abaix {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    width: 100%;
    margin-bottom: -2px;
}
.index-portada {
    grid-column: 1;
    grid-row: 1 / 3;
    width: 100%;
    aspect-ratio: .964;
    display: block;
    position: relative;
}
.index-portada img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    border-bottom: 2px solid;
    border-right: 2px solid;
}
.index-portada span {
    position: absolute;
    z-index: 1;
    right: .3rem;
    bottom: .3rem;
    font-size: .8em !important;
}
.index-galeria-foto {
    width: 100%;
    height: auto;
    aspect-ratio: 1.5;
    object-fit: cover;
    object-position: top;
    display: block;
    border-bottom: 2px solid;
    border-right: 2px solid;
}

/* Pàgina de "Sobre mí" */
#sobremi {
    position: relative;
    width: 100%;
}
#sobremi-background {
    position: absolute;
    background-image: url("/res/fons.png");
    background-repeat: no-repeat;
    background-size: auto 100%;
    background-attachment: fixed;
    width: 100%;
    height: 100%;
    left: 0;
}
#sobremi-overlay {
    position: absolute;
    background: var(--col-bg);
    opacity: .7;
    width: 100%;
    height: 100%;
    left: 0;
}
#sobremi-content {
    max-width: var(--max-width);
    margin: 0 auto;
    line-height: 1.5em;
    z-index: 2;
    position: relative;
    padding: 0 2em;
}
#sobremi a {text-decoration: underline}
#sobremi h2, h3 {color: var(--col-gray3)}
#sobremi h3 {
    margin: 0;
    font-size: 1.1em;
}
#sobremi img {
    height: 4.5em;
    display: inline-block;
    padding: 1em;
}
#sobremi svg {
    width: 1em;
    margin: 0 .1em;
    display: inline-block;
}

/* Regles per les pestanyes */
.tabs {
    display: flex;
    justify-content: space-between;
    max-width: var(--max-width);
    width: 100%;
    padding: 0 2em;
    margin: 0 auto;
}
.tab-radio {display: none}
.tab-label {
    margin: 1em .5em;
    font-weight: bold;
    font-size: 1.2em;
    flex-grow: 1;
    text-align: center;
    color: var(--col-gray3);
    border-radius: 10%;
    border-bottom: 8px solid var(--col-bg);
    transition: all .4s;
    cursor: pointer;
}
.tab-label:hover {
    border-color: var(--col-gray2);
}
#tab-pub:checked  ~ .tabs #label-pub,
#tab-fic:checked  ~ .tabs #label-fic,
#tab-clip:checked ~ .tabs #label-clip {
    color: var(--col-fg);
    border-color: var(--col-gray3);
}
#tab-pub:checked  ~ #tab-content-pub,
#tab-fic:checked  ~ #tab-content-fic,
#tab-clip:checked ~ #tab-content-clip {
    display: grid;
}

/* Pàgina de la galeria */
.galeria {
    display: none;
    grid-template-columns: repeat(5, 1fr);
}
.galeria a:hover > img {
    background-color: var(--col-bg);
    opacity: .6;
}

.galeria img {
    display: block;
    width: 100%;
    aspect-ratio: 1.2;
    object-fit: cover;
    border-right: 2px solid var(--col-fg);
    border-top: 2px solid var(--col-fg);
    transition: all .4s;
}

/* Pàgina dels vídeos */
.video {
    display: none;
    grid-template-columns: repeat(4, 1fr);
    gap: .5em;
    width: 90%;
    margin: 0 auto;
    padding: 0 2em 1em 2em;
}
.video iframe, video {
    display: block;
    width: 100%;
    aspect-ratio: 1.5;
    border: 2px solid var(--col-fg);
    background: var(--col-fg);
}
