.guia-universitaris {
    max-width: 68rem;
    margin: 0 auto;
}

.guia-titol {
    font-family: var(--font-title), sans-serif;
    font-weight: 600;
    font-size: 1.35rem;
    color: var(--color-secondary);
    text-align: center;
    margin-bottom: 1rem;
}

/* ===== The heading, and every colla's escut under it ===== */
.guia-cap {
    margin: 1rem auto 2rem;
    max-width: 44rem;
    text-align: center;

    h1 {
        margin-bottom: 0.75rem;
    }

    p {
        margin: 0;
        line-height: 1.6;
        color: var(--color-gray-darkest);
        text-wrap: pretty;
    }
}

.guia-mur {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 0.75rem;
    max-width: 52rem;
    margin: 0 auto 3rem;
    padding: 0;
    list-style: none;
}

.guia-mur-colla {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    width: 5rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-black);
    text-align: center;
    text-decoration: none;

    &:hover .guia-escut {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

    @media (prefers-reduced-motion: reduce) {
        &:hover .guia-escut {
            transform: none;
        }
    }
}

.guia-escut {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background-color: var(--colla);
    box-shadow: var(--shadow-sm);
    transition: transform 200ms ease, box-shadow 200ms ease;

    img {
        width: 78%;
        height: 78%;
        object-fit: contain;
    }
}

.guia-escut-petit {
    width: 2.5rem;
    height: 2.5rem;
    box-shadow: none;
}

/* ===== The archive in figures ===== */
.guia-xifres {
    margin-bottom: 2.5rem;

    ul {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
        margin: 0;
        padding: 0;
        list-style: none;

        @media (width >= 768px) {
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 1rem;
        }
    }

    li {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 0.25rem;
        padding: 1rem 1.25rem;
        border-radius: 1rem;
        background-color: var(--color-white);
        box-shadow: var(--shadow-sm);
    }

    strong {
        font-family: var(--font-title), sans-serif;
        font-size: 1.75rem;
        line-height: 1.1;
        color: var(--color-black);
    }

    span {
        font-size: 0.85rem;
        line-height: 1.35;
        color: var(--color-gray-darkest);
    }

    .estadistiques-castell {
        min-width: 0;
        font-size: 1.1rem;
    }
}

/* ===== The sostre, the next diades and the latest first times ===== */
.guia-destacats {
    display: grid;
    gap: 1rem;
    margin-bottom: 3rem;

    @media (width >= 992px) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
        gap: 1.25rem;
    }
}

/* The sostre, and the estrenes under it */
.guia-destacats-columna {
    display: flex;
    flex-direction: column;
    gap: 1rem;

    @media (width >= 992px) {
        gap: 1.25rem;
    }
}

.guia-card {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    border-radius: 1rem;
    background-color: var(--color-white);
    box-shadow: var(--shadow-sm);

    h2 {
        margin: 0 0 0.25rem;
        font-family: var(--font-title), sans-serif;
        font-size: 1.15rem;
        font-weight: 600;
    }

    /* Narrower than in the statistics: whole names, and the date under them when it does not fit */
    .estadistiques-llista {
        box-shadow: none;

        li {
            flex-wrap: wrap;
            gap: 0.25rem 0.625rem;
            padding-inline: 0;
        }

        .estadistiques-colla {
            flex-shrink: 0;
        }

        .estadistiques-cops {
            display: none;
        }
    }
}

.guia-card-subtitol {
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: var(--color-gray-darkest);
}

.guia-card-enllac {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;

    svg {
        width: 0.85rem;
        height: 0.85rem;
        fill: currentColor;
    }
}

/* ===== The questions ===== */
.guia-preguntes {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    max-width: 52rem;
    margin: 0 auto;
}

.guia-pregunta {
    border-radius: 1rem;
    background-color: var(--color-white);
    box-shadow: var(--shadow-xs);

    summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        padding: 1rem 1.25rem;
        cursor: pointer;
        list-style: none;

        &::-webkit-details-marker {
            display: none;
        }

        &::after {
            content: "+";
            flex-shrink: 0;
            font-size: 1.35rem;
            line-height: 1;
            color: var(--color-secondary);
        }

        h2 {
            margin: 0;
            font-family: var(--font-title), sans-serif;
            font-size: 1.1rem;
            font-weight: 600;
            color: var(--color-black);
        }
    }

    &[open] summary::after {
        content: "−";
    }
}

.guia-resposta {
    padding: 0 1.25rem 1.25rem;
    line-height: 1.6;
    color: var(--color-gray-darkest);

    p:last-child {
        margin-bottom: 0;
    }
}

.guia-enllacos {
    margin: 0;
    padding-left: 1.25rem;
}

.guia-mes {
    margin-top: 0.75rem;
}

/* ===== The colles of each university ===== */
.guia-universitats {
    display: grid;
    gap: 0.75rem;

    @media (width >= 768px) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }
}

.guia-universitat {
    padding: 0.875rem 1rem;
    border: 1px solid var(--color-gray-lighter);
    border-radius: 0.75rem;

    h3 {
        margin: 0 0 0.625rem;
        font-size: 0.95rem;
        font-weight: 600;
        color: var(--color-black);
    }

    ul {
        display: flex;
        flex-direction: column;
        gap: 0.625rem;
        margin: 0;
        padding: 0;
        list-style: none;
    }
}

.guia-colla {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.guia-colla-inactiva {
    opacity: 0.55;
}

.guia-colla-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.3;

    a {
        font-weight: 600;
        color: var(--color-black);
        text-decoration: none;

        &:hover {
            text-decoration: underline;
        }
    }

    span {
        font-size: 0.8rem;
        color: var(--color-gray-darkest);
    }
}

.guia-colla-xarxes {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;

    a {
        color: var(--color-gray-darker);

        &:hover {
            color: var(--color-black);
        }
    }

    svg {
        width: 1.05rem;
        height: 1.05rem;
        fill: currentColor;
    }
}

/* The hardest castells, one a line with its label */
.guia-sostre {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;

    li {
        display: flex;
        align-items: flex-start;
        gap: 0.75rem;
    }

    /* All as wide, so the texts line up */
    .estadistiques-castell {
        flex-shrink: 0;
        width: 5.5rem;
        margin-top: 0.1rem;
    }
}
