* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-image: url('images/fons.jpg');
    background-size: cover;
    /* Perquè ocupi tota la pantalla */
    background-position: center;
    background-attachment: fixed;
    /* Perquè el fons no es mogui en fer scroll */
    min-height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}



.container {
    max-width: 680px;
    width: 100%;
    margin: 0 auto;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: 0.2s;
}

.profile {
    text-align: center;
    margin-bottom: 30px;
}

.profile-img {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    margin: 10px auto;
    background: #fff;
    padding: 3px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    animation: scaleIn 0.6s ease forwards;
    animation-delay: 0.4s;
}



.profile-name {
    color: white;
    font-size: 24px;
    font-weight: 600;
    margin: 15px 0 5px;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: 0.6s;
}

.profile-description {
    color: rgba(255, 255, 255, 0.85);
    font-size: 16px;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: 0.8s;
}

.links {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.link {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(8px);
    /* Això fa l'efecte vidre esmerilat */
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    padding: 15px 20px;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    text-align: left;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}




.link:hover {
    background: rgba(255, 255, 255, 1);
    /* Blanc pur en passar el ratolí */
    transform: scale(1.03) translateY(-2px) !important;
}


.links .link:nth-child(1) {
    animation-delay: 1s;
}

.links .link:nth-child(2) {
    animation-delay: 1.2s;
}

.links .link:nth-child(3) {
    animation-delay: 1.4s;
}

.links .link:nth-child(4) {
    animation-delay: 1.6s;
}

.links .link:nth-child(5) {
    animation-delay: 1.8s;
}

/* Continuem la seqüència de retard per als nous botons */
.links .link:nth-child(6) {
    animation-delay: 2s;
}

.links .link:nth-child(7) {
    animation-delay: 2.2s;
}

.links .link:nth-child(8) {
    animation-delay: 2.4s;
}


.links .link:nth-child(9) {
    animation-delay: 2.6s;
}

.links .link:nth-child(10) {
    animation-delay: 2.8s;
}

/* Ajustem la seqüència perquè el llibre surti l'últim dels links */
.links > *:nth-child(11) { animation-delay: 2.2s; } /* Taller de parlar en públic */
.links > *:nth-child(12) { animation-delay: 2.4s; } /* EL LLIBRE */

/* I ara les icones socials han de començar una mica més tard per no xocar */
.social-icons .social-icon:nth-child(1) { animation-delay: 2.7s; }
.social-icons .social-icon:nth-child(2) { animation-delay: 2.8s; }
.social-icons .social-icon:nth-child(3) { animation-delay: 2.9s; }
.social-icons .social-icon:nth-child(4) { animation-delay: 3.0s; }
.social-icons .social-icon:nth-child(5) { animation-delay: 3.1s; }

/* El footer encara més tard */
.footer { animation-delay: 3.5s; }
.link:hover {
    transform: translateY(-2px) !important;
    border-color: black;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
    background: white;
}

.link-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.link:hover .link-icon {
    transform: rotate(-10deg) scale(1.2);
    color: #6e8efb;
    /* El color de la teva marca */
    transition: transform 0.3s ease;
}

/* Això assegura que totes les icones tinguin una mida visible */
[data-lucide] {
    width: 24px;
    height: 24px;
    stroke-width: 2;
    display: inline-block;
}




.social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.social-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: #333;
    opacity: 0;
    animation: scaleIn 0.5s ease forwards;
}

.social-icons .social-icon:nth-child(1) {
    animation-delay: 2s;
}

.social-icons .social-icon:nth-child(2) {
    animation-delay: 2.1s;
}

.social-icons .social-icon:nth-child(3) {
    animation-delay: 2.2s;
}

.social-icons .social-icon:nth-child(4) {
    animation-delay: 2.3s;
}

.social-icon:hover {
    transform: translateY(-3px) !important;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
    background: white;
}


/* Això farà que apareguin totes les icones */
[data-lucide] {
    width: 20px;
    height: 20px;
    display: inline-block;
}

/* Millora específica per als cercles socials */
.social-icon i,
.social-icon svg {
    width: 20px;
    height: 20px;
    color: #333;
    /* El color de la icona */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Animación inicial del fondo */
@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

body {
    background-size: 200% 200%;
    animation: gradientAnimation 15s ease infinite;
}


/* Definim l'animació de batec */
@keyframes pulse-animation {
    0% {
        box-shadow: 0 0 0 0px rgba(110, 142, 251, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(110, 142, 251, 0);
    }

    100% {
        box-shadow: 0 0 0 0px rgba(110, 142, 251, 0);
    }
}

/* Apliquem l'estil especial al botó destacat */
.link.featured {
    border: 2px solid #6e8efb;
    /* Un color que ressalti */
    background: white;
    animation: fadeInUp 0.6s ease forwards, pulse-animation 2s infinite;
    /* Mantenim el retard original de l'animació de pujada */
    animation-delay: 1s, 2s;
}

/* Fem que en passar el ratolí encara destaqui més */
.link.featured:hover {
    background: #f0f4ff;
    transform: scale(1.05) !important;
}

.section-title {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    letter-spacing: 1.5px;
    margin: 20px 0 10px;
    text-align: left;
    padding-left: 10px;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.footer {
    margin-top: 40px;
    padding-bottom: 20px;
    text-align: center;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
    /* El retard ha de ser el més alt de tots perquè surti l'últim */
    animation-delay: 3.3s;
}

.footer p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-weight: 400;
    font-style: italic;
    letter-spacing: 0.5px;
}

/* Contenidor del vídeo */
.video-container {
    width: 100%;
    /* Ocupa tot l'ample de la llista .links */
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px 0;
    padding: 0;

    /* Animació i visibilitat */
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: 1.2s;

    /* Forcem que no es comprimeixi dins del flex de .links */
    flex-grow: 1;
}

/* L'iframe a l'ordinador i mòbil */
.video-container iframe {
    width: 100% !important;
    /* Amplada total del contenidor */
    min-width: 100%;
    /* Evita que es faci petit al PC */
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    border: none;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}