:root {
    --primary-blue: #0b1e48;
    --accent-blue: #0056b3;
    --text-dark: #222222;
    --text-muted: #666666;
    --bg-light: rgb(243, 244, 248);
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --green-accent: #0f766e;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background-color: #ffffff;
    color: var(--text-dark);
    line-height: 1.5;
}

body {
    background: #ffffff;
}

/* --- HEADER & NAVIGATION --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-lum {
    font-size: 1.8rem;
    font-weight: 900;
    color: #8b0000;
    line-height: 0.9;
}

.logo-lum img {
    display: block;
    width: 240px;
    max-width: 100%;
    height: auto;
}

.logo-lum span {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-dark);
    letter-spacing: 1px;
    margin-top: 2px;
}

nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--accent-blue);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-icon {
    cursor: pointer;
    width: 18px;
}

.erasmus-logo {
    display: flex;
    align-items: center;
    height: 35px;
    width: 160px;
}

.erasmus-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    font-size: 0.7rem;
    font-weight: bold;
    color: #003399;
    text-align: right;
}

.erasmus-text span {
    font-weight: normal;
    color: #555;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.page-content {
    padding-top: 2rem;
    color: var(--text-muted);
    font-weight: 400;
}
/* --- HERO BANNER --- */
.hero {
    position: relative;
    background: linear-gradient(135deg, rgba(231, 240, 247, 0.4), rgba(255, 255, 255, 0.55)),
                url('../images/header1.jpeg') center/cover no-repeat;
    min-height: 420px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem 1rem 2rem;
}

.hero-content {
    position: relative;
    isolation: isolate;
    width: min(1200px, calc(100% - 3rem));
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-content::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 50%;
    left: 50%;
    width: min(1050px, calc(100% + 2rem));
    height: 160%;
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.78) 42%, rgba(255, 255, 255, 0) 75%);
    filter: blur(8px);
    pointer-events: none;
}

.hero h1 {
    color: var(--primary-blue);
    font-size: clamp(2rem, 2.8vw, 3.8rem);
    line-height: 0.95;
    max-width: 1000px;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.02em;
}

.hero h1 .highlight {
    font-size: clamp(1.1rem, 1.9vw, 2.2rem);
    display: block;
    color: #0a5d88;
    margin-top: 0.45rem;
    font-weight: 500;
    letter-spacing: 0.03em;
}

.hero h2 {
    color: var(--primary-blue);
    font-size: clamp(2.5rem, 4.1vw, 5.6rem);
    font-weight: 700;
    margin: 1rem 0 0.75rem;
    letter-spacing: 0.03em;
    line-height: 0.9;
}

.hero .subtitle {
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 2.2px;
    color: var(--primary-blue);
    font-weight: 600;
    margin-top: 1.5rem;
}



/* --- TITLE BANNER --- */
.title-banner {
    position: relative;
    /* stronger white overlay to make banner lighter */
    background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.88)),
              url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?q=80&w=1200') center/cover no-repeat;
    background-blend-mode: lighten;
    padding: 1.25rem 1rem;
    min-height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.title-banner h1,
.title-banner h2 {
    width: min(1200px, calc(100% - 3rem));
    margin: 0 auto;
    text-align: left;
    color: var(--text-muted);
    font-size: clamp(1.2rem, 1.5vw, 1.8rem);
    font-weight: 500;
    line-height: 1.25;
    box-sizing: border-box;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.container-page > h1,
.container-page > h2 {
    width: min(1200px, calc(100% - 3rem));
    margin: 0 auto;
    text-align: left;
    color: rgba(34,34,34,0.9);
    font-size: clamp(1.4rem, 1.6vw, 2rem);
    font-weight: 600;
    line-height: 1.15;
    box-sizing: border-box;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.container-page > h1 {
    margin-bottom: 1rem;
}

/* --- MAIN CONTENT & CARDS --- */
main.container {
    width: 100%;
    max-width: none;
    background-color: var(--bg-light);
    padding-left: 0;
    padding-right: 0;
    margin-bottom: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem 0;
    background-color: var(--bg-light);
}


.container-footer {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem 0;
}


.container-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem 3rem;
}


main.container > .grid-layout,
main.container > .partners-section,
main.container > .card {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.grid-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

.about-box {
    background-color: transparent;
    padding-right: 1rem;
}

.about-box h3 {
    color: var(--primary-blue);
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.about-box p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.btn-primary {
    display: inline-block;
    background-color: var(--primary-blue);
    color: #fff;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-primary:hover {
    background-color: var(--accent-blue);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

main.container > .card {
    margin-top: 3rem;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.card-header i {
    color: var(--green-accent);
}

.card-header h4 {
    color: var(--green-accent);
    font-size: 1.1rem;
}

.card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.card-link {
    text-decoration: none;
    color: var(--green-accent);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* --- PARTNERS SECTION --- */
.partners-section {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    margin-top: 2rem;
    text-align: center;
}

.partners-title {
    font-size: 0.9rem;
    color: var(--primary-blue);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.partners-logos {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.partner-item {
    flex: 1 1 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 90px;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 300;
}

.partner-item img {
    display: block;
    height: 48px;
    width: auto;
    max-width: 100px;
    object-fit: contain;
    margin-bottom: 0.5rem;
    filter: grayscale(20%);
}

.partner-item span,
.partner-item strong {
    display: block;
    line-height: 1.2;
    text-align: center;
}

.partner-anac, .partner-innovapuglia {
    color: #0056b3;
}

.partner-kings {
    color: #b30000;
}

/* --- INFO BAR FOOTER --- */
.info-bar {
    background-color: #ffffff;
    border-top: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem 1rem;
    margin-top: 3rem;
}

.info-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    text-align: left;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.info-item i {
    color: var(--primary-blue);
}

.info-text strong {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.info-text span {
    font-size: 0.85rem;
    color: var(--primary-blue);
    font-weight: 600;
}

/* --- FOOTER --- */
.site-footer {
    background-color: #ffffff !important;
    color: var(--primary-blue);
    margin-top: 0;
    border-top: 1px solid var(--border-color);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1.3fr;
    gap: 2rem;
    padding: 2.5rem 1.5rem;
}

.footer-brand img {
    display: block;
    width: 180px;
    height: auto;
    margin-bottom: 1rem;
}

.footer-brand p,
.footer-links p,
.footer-links li,
.footer-links a {
    color: var(--text-dark);
    font-size: 0.85rem;
    line-height: 1.7;
}

.footer-links h4 {
    color: var(--primary-blue);
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.footer-links ul {
    list-style: none;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-dark);
}

.footer-links a:hover {
    color: var(--accent-blue);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 1rem 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

/* --- MEDIA QUERIES (MOBILE RESPONSIVE) --- */
@media (max-width: 992px) {
    .grid-layout {
        grid-template-columns: 1fr;
    }
    .cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    .footer-inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #fff;
        border-bottom: 1px solid var(--border-color);
    }
    header {
        padding: 0.75rem 3%;
    }
    .logo-lum img {
        width: 150px;
    }
    .header-right {
        gap: 0.5rem;
    }
    .erasmus-logo {
        width: 110px;
        height: auto;
    }
    .erasmus-text {
        gap: 0;
        font-size: 0.6rem;
        text-align: center;
    }
    .nav-links {
        display: none;
    }
    .nav-links.is-open {
        display: flex;
        flex-direction: column;
        gap: 0;
        padding: 0.5rem 3%;
    }
    .nav-links.is-open li {
        border-bottom: 1px solid var(--border-color);
    }
    .nav-links.is-open li:last-child {
        border-bottom: none;
    }
    .nav-links.is-open a {
        display: block;
        padding: 0.75rem 0;
    }
    .menu-toggle {
        display: block;
    }
    .hero h1 {
        font-size: 1.5rem;
    }
    .hero h2 {
        font-size: 2.2rem;
    }
    .cards-grid {
        grid-template-columns: 1fr;
    }
    .partners-logos {
        justify-content: center;
    }
    .info-grid {
        grid-template-columns: 1fr;
    }
    .footer-inner {
        grid-template-columns: 1fr;
    }

    /* Align title-banner and page content gutters to header's 3% padding on mobile */
    .title-banner {
        padding-left: 3%;
        padding-right: 3%;
        justify-content: flex-start;
        align-items: center;
    }

    /* keep small inner gutter for page content so it's not flush to edge */
    .container-page,
    .page-content,
    .container-page > h1,
    .container-page > h2 {
        box-sizing: border-box;
        width: auto;
        max-width: 1200px;
        margin: 0;
        padding-left: 3%;
        padding-right: 3%;
        text-align: left;
    }

    /* ensure banner headings align with the content left gutter */
    .title-banner h1,
    .title-banner h2 {
        box-sizing: border-box;
        width: auto;
        max-width: 1200px;
        margin: 0;
        padding-left: 0;
        padding-right: 0;
        text-align: left;
    }
}