/* UPF Brand CSS - based on https://www.upf.edu/web/marca/marca */
body {
    font-family: Verdana, Arial, sans-serif;
    background: #F5F5F5;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.header {
    background: #fff;
    padding: 0;
    border-bottom: 1px solid #C8102E;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.upf-logo {
    background: url('https://www.upf.edu/o/upf-2016-theme/images/upf/logo.png') no-repeat left center;
    background-size: 168px 58px;
    width: 180px;
    height: 58px;
    margin-left: 48px;
    flex-shrink: 0;
}

.header-title {
    color: #C8102E;
    font-size: 1.2em;
    font-weight: normal;
    margin-right: 48px;
    letter-spacing: 0;
    white-space: nowrap;
}

main {
    flex: 1;
}

.intro-wrap,
.hero-banner,
.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    max-width: 1100px;
    width: 100%;
    box-sizing: border-box;
}

.intro-wrap {
    margin: 12px auto 0 auto;
    padding: 22px 32px;
}

.intro-text {
    margin: 0;
    color: #2b2b2b;
    font-size: 1.02em;
    line-height: 1.6;
    text-align: justify;
    text-justify: inter-word;
}

.hero-banner {
    margin: 20px auto 0 auto;
    height: 130px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.hero-banner-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.card {
    margin: 16px auto 0 auto;
    padding: 32px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px;
    overflow: hidden;
}

.media-tool {
    flex: 1 1 0;
    text-align: center;
    padding: 0 12px;
}

.media-link {
    text-decoration: none;
    color: #222;
    display: block;
    flex: 1 1 0;
    transition: box-shadow 0.2s;
    border-radius: 8px;
    padding: 18px 8px 18px 8px;
}

.media-link:hover {
    box-shadow: 0 0 0 2px #C8102E;
    background: #F9E6EA;
}

.logo-media {
    width: 90px;
    height: 90px;
    object-fit: contain;
    margin-bottom: 18px;
}

.title {
    color: #C8102E;
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 8px;
    font-family: Verdana, Arial, sans-serif;
}

.description {
    color: #444;
    font-size: 1em;
    margin-bottom: 0;
}

footer {
    background: #fff;
    border-top: 1px solid #C8102E;
    padding: 20px;
    margin-top: 48px; /* Increased spacing for better visibility */
    text-align: center;
    color: #333;
    font-size: 0.9em;
}

@media (max-width: 900px) {

    .intro-wrap {
        margin: 12px 12px 0 12px;
        padding: 18px 16px;
    }

    .hero-banner {
        margin: 12px 12px 0 12px;
        height: 95px;
    }

    .card {
        margin: 12px 12px 0 12px;
        padding: 18px 16px;
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 16px;
    }

    .header-title,
    .upf-logo {
        margin: 0 12px;
    }
}