/* ════════════════════════════════════════════════════
   Tor Vergata Theme — CSS principale
   Organizzato per componenti. Usa sempre var(--token).
   Breakpoint mobile unico: @media (max-width: 680px)
   Layout: full-width
════════════════════════════════════════════════════ */

/* ── RESET ── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html { font-size: 16px; }
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }

/* ── TOKEN CSS ── */
:root {
    --ac:       #252525;
    --ac-l:     #f0f0f0;
    --tv:       #1d6f42;
    --text:     #1c1c1c;
    --text-s:   #6b6560;
    --border:   #e0dbd3;
    --bg:       #ffffff;
    --bg-soft:  #fafaf8;
    --ff: 'Inter', system-ui, sans-serif;
    --fg: 'EB Garamond', Georgia, serif;
}

/* ── PAGE SHELL ── */
body {
    background: var(--bg);
    font-family: var(--ff);
    color: var(--text);
}

.page-wrap {
    max-width: 1150px;
    margin: 0 auto;
    background: var(--bg);
    /* box-shadow: 0 4px 40px rgba(0, 0, 0, .14); */
}

.home_padding { padding-top: 5px; }

/* ════════════════════════════════════════
   UTILITY BAR
════════════════════════════════════════ */
.util-bar {
    background: #f8f7f4;
    border-bottom: 1px solid #eae6e0;
    padding: 5px 28px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
}

.util-bar a {
    font-size: 11px;
    color: #888;
    cursor: pointer;
    transition: color .2s;
}

.util-bar a:hover { color: var(--ac); }

/* Language switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
}

.lang-switcher__item {
    font-size: 11px;
    font-weight: 600;
    color: #aaa;
    cursor: pointer;
    transition: color .2s;
    text-decoration: none;
    padding: 2px 4px;
}

.lang-switcher__item:hover { color: var(--ac); }

.lang-switcher__item--active {
    color: var(--ac);
    font-weight: 700;
}

.lang-switcher__sep {
    font-size: 10px;
    color: #ccc;
}

.search-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #d8d4cc;
    border-radius: 3px;
    padding: 3px 10px;
    background: var(--bg);
}

.search-wrap input {
    border: none;
    outline: none;
    font-size: 11px;
    color: #666;
    width: 96px;
    font-family: var(--ff);
    background: transparent;
}

/* ════════════════════════════════════════
   HEADER
════════════════════════════════════════ */
.header {
    padding: 16px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Logo istituzionale */
.logo-link {
    display: flex;
    align-items: center;
}

.logo-link img {
    height: 50px;
    width: auto;
}

.logo-fallback {
    display: none; /* mostrato via JS se img fallisce */
    align-items: center;
    gap: 10px;
}

.logo-fb-box {
    width: 44px;
    height: 44px;
    background: var(--tv);
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-fb-box svg {
    width: 28px;
    height: 28px;
}

.logo-fb-text { line-height: 1.25; }

.logo-fb-text .uni {
    font-size: 9px;
    color: var(--tv);
    letter-spacing: 1px;
    text-transform: uppercase;
    display: block;
    font-family: var(--fg);
}

.logo-fb-text .name {
    font-size: 16px;
    font-weight: 700;
    color: var(--tv);
    letter-spacing: 1.5px;
    display: block;
    font-family: var(--fg);
}

.header-divider {
    width: 1px;
    height: 42px;
    background: var(--border);
    border: none;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}

.header-area {
    display: flex;
    flex-direction: column;
}

.header-area-line {
    margin: 0;
    line-height: 1.3;
}

.header-area-pre {
    font-size: 10px;
    color: #999;
    letter-spacing: .4px;
    text-transform: uppercase;
}

.header-area-name {
    font-size: 22px;
    font-weight: 600;
    font-style: italic;
    color: var(--ac);
    font-family: var(--fg);
    letter-spacing: -.2px;
    line-height: 1.15;
    transition: color .3s;
}

/* ════════════════════════════════════════
   NAVIGAZIONE
════════════════════════════════════════ */
.nav-wrap {
    background: #078052;
    border-bottom: none;
}

.nav {
    display: flex;
    padding: 0 28px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: #078052;
}

.nav::-webkit-scrollbar { display: none; }

.nav-item {
    font-size: 12.5px;
    color: rgba(255, 255, 255, .65);
    padding: 0 14px;
    height: 46px;
    display: flex;
    align-items: center;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    transition: color .15s, border-color .15s;
    font-weight: 400;
    gap: 4px;
    text-decoration: none;
}

.nav-item:hover { color: #fff; }

.nav-item.active {
    color: #fff;
    border-bottom-color: #fff;
    font-weight: 500;
}

.nav-item .chev {
    font-size: 8px;
    color: rgba(255, 255, 255, .3);
}

/* ── WordPress Navigation Block override ── */
.nav-wrap .wp-block-navigation {
    display: flex;
    padding: 0 28px;
    overflow-x: visible;
    -webkit-overflow-scrolling: touch;
    background: #078052;
    gap: 0;
}

.nav-wrap .wp-block-navigation::-webkit-scrollbar { display: none; }

.nav-wrap .wp-block-navigation__container {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    background: transparent;
}

.nav-wrap .wp-block-navigation-item__content {
    font-size: 12.5px;
    color: rgba(255, 255, 255, .65);
    padding: 0 14px;
    height: 46px;
    display: flex;
    align-items: center;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    transition: color .15s, border-color .15s;
    font-weight: 400;
    text-decoration: none;
}

.nav-wrap .wp-block-navigation-item__content:hover {
    color: #fff;
}

.nav-wrap .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content {
    color: #fff;
    border-bottom-color: #fff;
    font-weight: 500;
}

/* Reset stili default WP navigation */
.nav-wrap .wp-block-navigation-item {
    font-size: 12.5px;
    color: rgba(255, 255, 255, .65);
    padding: 0 14px;
    height: 46px;
    display: flex;
    align-items: center;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    transition: color .15s, border-color .15s;
    font-weight: 400;
    gap: 4px;
}

.nav-wrap .wp-block-navigation-item.active {
    color: #fff;
    border-bottom-color: #fff;
    font-weight: 500;
}

.nav-wrap .wp-block-navigation__responsive-container,
.nav-wrap .wp-block-navigation__responsive-container.is-menu-open {
    background: #078052;
}

/* Sottomenu dropdown */
.nav-wrap .wp-block-navigation .has-child .wp-block-navigation__submenu-container {
    background: #055a3a !important;
    border: none !important;
    padding: 6px 0;
    min-width: 220px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .2);
    border-radius: 0 0 4px 4px;
}

/* Forza visibilità al hover — specificità alta per vincere su WP core */
.nav-wrap .wp-block-navigation .has-child:hover > .wp-block-navigation__submenu-container {
    opacity: 1 !important;
    visibility: visible !important;
    height: auto !important;
    width: auto !important;
    overflow: visible !important;
}

.nav-wrap .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
    color: rgba(255, 255, 255, .8) !important;
    padding: 8px 20px;
    font-size: 13px;
    white-space: nowrap;
    border-bottom: none;
}

.nav-wrap .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, .1);
}

/* Nasconde toggle button e icona freccia — il sottomenu si apre al hover */
.nav-wrap .wp-block-navigation-submenu__toggle,
.nav-wrap .wp-block-navigation__submenu-icon {
    display: none !important;
}

/* ── Mobile hamburger (custom) ── */
.nav-hamburger {
    display: none;
    background: transparent;
    border: none;
    padding: 0 16px;
    height: 46px;
    align-items: center;
    cursor: pointer;
    color: #fff;
    font-size: 24px;
    line-height: 1;
}

@media (max-width: 680px) {
    .nav-hamburger {
        display: flex;
    }

    .nav-wrap .wp-block-navigation {
        padding: 0;
    }

    .nav-wrap .wp-block-navigation__container {
        display: none;
        flex-direction: column;
        padding: 0;
        gap: 0;
    }

    .nav-wrap.nav-open .wp-block-navigation__container {
        display: flex;
    }

    .nav-wrap .wp-block-navigation-item,
    .nav-wrap .wp-block-navigation-item__content {
        height: auto;
        padding: 12px 24px;
        border-bottom: 1px solid rgba(255, 255, 255, .15);
        font-size: 14px;
        white-space: normal;
    }

    .nav-wrap .wp-block-navigation-item__content {
        padding: 0;
        border-bottom: none;
    }

    .nav-wrap .wp-block-navigation__submenu-container {
        position: static !important;
        padding: 0 0 0 16px;
        min-width: 0 !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        background: transparent !important;
        opacity: 1 !important;
        visibility: visible !important;
        height: auto !important;
        width: auto !important;
        overflow: visible !important;
    }
}


/* ════════════════════════════════════════
   BREADCRUMB
════════════════════════════════════════ */
.breadcrumb {
    padding: 8px 28px;
    background: #faf9f7;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.breadcrumb a {
    font-size: 11px;
    color: var(--ac);
    cursor: pointer;
}

.breadcrumb a:hover { text-decoration: underline; }

.breadcrumb-sep {
    font-size: 10px;
    color: #ccc;
}

.breadcrumb-cur {
    font-size: 11px;
    color: #999;
}

/* ════════════════════════════════════════
   HERO ROW
════════════════════════════════════════ */
.hero-row {
    display: grid;
    grid-template-columns: 1fr 310px;
    min-height: 320px;
    border-bottom: 1px solid var(--border);
}

/* Slider */
.hero-slider {
    position: relative;
    overflow: hidden;
    background: #1a1a1a;
    min-height: 320px;
}

.hero-slider-track {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 320px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .6s ease;
    pointer-events: none;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(.82);
}

.hero-photo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(0, 0, 0, .5) 100%);
    pointer-events: none;
}

.hero-photo-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 22px;
    pointer-events: none;
}

.hero-photo-tag {
    font-size: 10.5px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .75);
}

/* Slider controls */
.hero-slider-controls {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 5;
}

.hero-slider-prev,
.hero-slider-next {
    background: rgba(0, 0, 0, .4);
    border: none;
    color: #fff;
    font-size: 20px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    line-height: 1;
}

.hero-slider-prev:hover,
.hero-slider-next:hover {
    background: rgba(0, 0, 0, .7);
}

.hero-slider-dots {
    display: flex;
    gap: 6px;
}

.hero-slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, .4);
    cursor: pointer;
    padding: 0;
    transition: background .2s;
}

.hero-slider-dot.active {
    background: #fff;
}

/* Offerta formativa sidebar */
.of-sidebar {
    display: flex;
    flex-direction: column;
    background: var(--bg);
    border-left: 1px solid var(--border);
}

.of-sidebar-header {
    padding: 15px 20px 13px;
    border-bottom: 2px solid var(--ac);
    transition: border-color .3s;
}

.of-sidebar-title {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--ac);
    transition: color .3s;
}

.of-sidebar-subtitle {
    font-size: 11px;
    color: #999;
    margin-top: 3px;
}

.of-sidebar-links {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.of-sidebar-link {
    padding: 14px 20px;
    border-bottom: 1px solid #f0ece6;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background .15s;
    text-decoration: none;
}

.of-sidebar-link:last-child { border-bottom: none; }
.of-sidebar-link:hover { background: #faf8f5; }

.of-sidebar-link-icon {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    background: var(--ac);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .3s;
}

.of-sidebar-link-icon svg {
    width: 16px;
    height: 16px;
}

.of-sidebar-link-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    display: block;
}

.of-sidebar-link-desc {
    font-size: 10.5px;
    color: #aaa;
    margin-top: 1px;
    display: block;
}

.of-sidebar-cta {
    padding: 14px 20px;
    border-top: 1px solid #eee;
    margin-top: auto;
}

.of-sidebar-cta a {
    font-size: 12px;
    color: var(--ac);
    font-weight: 500;
    transition: color .2s;
}

.of-sidebar-cta a:hover { text-decoration: underline; }

/* ════════════════════════════════════════
   STRIP NUMERI / KPI
════════════════════════════════════════ */
.numeri-strip {
    display: flex;
    border-bottom: 3px solid var(--border);
    background: var(--bg);
}

.num-item {
    flex: 1;
    padding: 20px 0;
    text-align: center;
    border-right: 1px solid #eee;
}

.num-item:last-child { border-right: none; }

.num-val {
    font-size: 32px;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}

.num-lbl {
    font-size: 9.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    margin-top: 5px;
}

/* ════════════════════════════════════════
   SEZIONI COMUNI
════════════════════════════════════════ */
.section {
    padding: 32px 28px;
    border-bottom: 1px solid #eee;
}

.section.bg-soft { background: var(--bg-soft); }

.section--locale {
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    padding-left: calc(50vw - 50%);
    padding-right: calc(50vw - 50%);
}

.section--ateneo {
    background: rgb(236, 239, 241);
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    padding-left: calc(50vw - 50%);
    padding-right: calc(50vw - 50%);
}

.sec-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 22px;
}

.sec-heading {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--ac);
    padding-left: 12px;
    border-left: 3px solid var(--ac);
    transition: color .3s, border-color .3s;
}

.sec-link {
    font-size: 11.5px;
    color: var(--ac);
    cursor: pointer;
    transition: color .3s;
}

.sec-link:hover { text-decoration: underline; }

/* ════════════════════════════════════════
   CARD NOTIZIE
════════════════════════════════════════ */
.news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.news-card {
    border: 1px solid var(--border);
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
    background: var(--bg);
}

.news-card:hover {
    border-color: var(--ac);
    box-shadow: 0 3px 16px rgba(0, 0, 0, .08);
}

.news-card__img {
    height: 140px;
    overflow: hidden;
    background: #e8e4de;
    position: relative;
}

.news-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(.9);
    transition: transform .4s;
}

.news-card:hover .news-card__img img { transform: scale(1.04); }

.news-card__body { padding: 14px 15px 16px; }

.news-card__cat {
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: var(--ac);
    margin-bottom: 6px;
    transition: color .3s;
    display: inline-block;
    background: var(--ac-l);
    padding: 2px 7px;
    border-radius: 2px;
}

.news-card__title {
    font-size: 13.5px;
    font-weight: 400;
    color: var(--text);
    font-family: var(--ff);
    line-height: 1.5;
    margin-bottom: 7px;
}

.news-card__date {
    font-size: 10.5px;
    color: var(--text-s);
}

/* ════════════════════════════════════════
   CARD EVENTI
════════════════════════════════════════ */
.events-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.ev-card {
    border: 1px solid var(--border);
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
    background: var(--bg);
    transition: border-color .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
}

.ev-card:hover {
    border-color: var(--ac);
    box-shadow: 0 3px 16px rgba(0, 0, 0, .08);
}

.ev-card:hover .ev-card__title { color: var(--ac); }

.ev-card__thumb {
    position: relative;
    height: 140px;
    overflow: hidden;
    background: #e8e4de;
    flex-shrink: 0;
}

.ev-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(.88);
    transition: transform .4s;
}

.ev-card:hover .ev-card__thumb img { transform: scale(1.04); }

/* Data badge sovrapposta in basso a sinistra */
.ev-date-box {
    position: absolute;
    bottom: 10px;
    left: 10px;
    text-align: center;
    background: var(--bg);
    border-radius: 3px;
    padding: 5px 8px;
    border-top: 3px solid var(--ac);
    min-width: 42px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
    transition: border-color .3s;
}

.ev-day {
    font-size: 20px;
    font-weight: 700;
    color: var(--ac);
    line-height: 1;
    transition: color .3s;
}

.ev-mon {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: #888;
    margin-top: 1px;
}

.ev-card__body {
    padding: 13px 15px 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ev-card__cat {
    display: inline-block;
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: var(--ac);
    background: var(--ac-l);
    padding: 2px 9px;
    border-radius: 2px;
    margin-bottom: 7px;
    align-self: flex-start;
    transition: color .3s, background .3s;
}

.ev-card__title {
    font-size: 13.5px;
    font-weight: 400;
    color: var(--text);
    line-height: 1.45;
    margin-bottom: 6px;
    transition: color .2s;
    flex: 1;
}

.ev-card__place {
    font-size: 10.5px;
    color: var(--text-s);
}

/* ════════════════════════════════════════
   SERVIZI DIGITALI
════════════════════════════════════════ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.svc-card {
    border-radius: 10px;
    padding: 20px 16px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    transition: transform .2s, box-shadow .2s;
    position: relative;
    overflow: hidden;
}

.svc-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .15);
}

.svc-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    transform: translate(15px, -15px);
}

.svc-card--1 { background: #1a5276; }
.svc-card--2 { background: #117a65; }
.svc-card--3 { background: #7b241c; }
.svc-card--4 { background: #6e2f8f; }

.svc-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, .22);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.svc-icon svg {
    width: 22px;
    height: 22px;
}

.svc-name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
}

.svc-desc {
    font-size: 11px;
    color: rgba(255, 255, 255, .8);
    line-height: 1.4;
}

/* ════════════════════════════════════════
   FOOTER
════════════════════════════════════════ */
.footer {
    background: #055a3a;
    padding: 34px 28px;
    display: grid;
    grid-template-columns: 1.7fr 1fr 1fr 1fr;
    gap: 26px;
}

.ft-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.ft-logo-box {
    width: 30px;
    height: 30px;
    background: var(--tv);
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ft-logo-name {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, .82);
}

.ft-desc {
    font-size: 11px;
    color: rgba(255, 255, 255, .35);
    line-height: 1.75;
}

.ft-col-title {
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .45);
    margin-bottom: 12px;
}

.ft-link {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, .4);
    margin-bottom: 6px;
    cursor: pointer;
    transition: color .15s;
}

.ft-link:hover { color: rgba(255, 255, 255, .82); }

.ft-links-list {
    list-style-type: none;
}

.footer-btm {
    background: #044a30;
    padding: 10px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-btm span {
    font-size: 10.5px;
    color: rgba(255, 255, 255, .45);
}

.footer-5x1000-banner {
    background: var(--bg);
    padding: 16px 28px;
    text-align: center;
}

.footer-5x1000-banner p {
    font-size: 15px;
    font-weight: 600;
    color: #055a3a;
    letter-spacing: .5px;
    font-family: var(--fg);
}

.footer-5x1000-banner span {
    font-size: 13px;
    font-weight: 400;
    color: #078052;
    letter-spacing: 2px;
    display: block;
    margin-top: 2px;
}

/* ════════════════════════════════════════
   OFFERTA FORMATIVA (standalone section)
════════════════════════════════════════ */
.of-section { padding: 28px; }

.of-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.of-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    gap: 16px;
    text-decoration: none;
}

.of-item:last-child { border-bottom: none; }
.of-item:hover .of-item__name { color: var(--ac); }

.of-item__name {
    font-size: 13.5px;
    font-weight: 400;
    color: var(--text);
    font-family: var(--fg);
    line-height: 1.4;
    transition: color .2s;
    flex: 1;
}

.of-item__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.of-item__tipo {
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: var(--ac);
    background: var(--ac-l);
    padding: 2px 8px;
    border-radius: 2px;
}

.of-item__cfu {
    font-size: 10px;
    color: var(--text-s);
}

/* ════════════════════════════════════════
   ARTICOLO SINGOLO
════════════════════════════════════════ */
.art-hero {
    display: grid;
    grid-template-columns: 1fr 260px;
    min-height: 340px;
    border-bottom: 1px solid var(--border);
    border-top: 1px solid var(--border);
}


/* Layout senza immagine: body a sinistra, sidebar a destra */
.art-content-row {
    display: grid;
    grid-template-columns: 1fr 260px;
    border-bottom: 1px solid var(--border);
}

.art-content-row .art-body {
    padding: 32px 28px;
}

.art-content-row .art-sidebar {
    border-left: 1px solid var(--border);
}

.art-slider {
    position: relative;
    overflow: hidden;
    background: #1a1a1a;
}

.art-slider-track {
    position: relative;
    width: 100%;
    min-height: 300px;
}

.art-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .6s ease;
    pointer-events: none;
}

.art-slide.active {
    opacity: 1;
    pointer-events: auto;
    position: relative;
}

.art-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(.9);
    display: block;
}

/* Slider controls */
.art-slider-controls {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 5;
}

.art-slider-prev,
.art-slider-next {
    background: rgba(0, 0, 0, .4);
    border: none;
    color: #fff;
    font-size: 20px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    line-height: 1;
}

.art-slider-prev:hover,
.art-slider-next:hover {
    background: rgba(0, 0, 0, .7);
}

.art-slider-dots {
    display: flex;
    gap: 6px;
}

.art-slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, .4);
    cursor: pointer;
    padding: 0;
    transition: background .2s;
}

.art-slider-dot.active {
    background: #fff;
}

.art-sidebar {
    border-left: 1px solid var(--border);
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    background: var(--bg-soft);
}

.art-sidebar-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
}

.art-info-row { margin-bottom: 8px; }

.art-info-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    display: inline;
}

.art-info-value {
    font-size: 14px;
    color: var(--text-s);
    display: inline;
    margin-left: 4px;
}

.art-cat-pill {
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid var(--border);
    color: var(--text-s);
    margin-top: 6px;
}

.art-share-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.art-share-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-s);
    cursor: pointer;
    transition: color .2s;
}

.art-share-btn:hover { color: var(--ac); }
.art-share-btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.art-body { padding: 32px 28px; }

.art-title {
    font-size: 28px;
    font-weight: 600;
    font-family: var(--ff);
    line-height: 1.3;
    color: var(--text);
    margin-bottom: 22px;
    margin-left: 22px;
    padding-top: 22px;
}

.art-text {
    font-size: 15px;
    line-height: 1.8;
    color: #2a2a2a;
    font-family: var(--ff);
}

.art-text p { margin-bottom: 18px; }
.art-text strong { font-weight: 600; }

/* ════════════════════════════════════════
   ARCHIVIO NOTIZIE
════════════════════════════════════════ */
.arch-header {
    padding: 16px 28px 14px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.arch-count {
    font-size: 13px;
    color: var(--text-s);
}

.arch-count strong { color: var(--text); }

.arch-pagination {
    display: flex;
    gap: 4px;
    align-items: center;
}

.arch-page-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border: 1.5px solid var(--border);
    border-radius: 3px;
    background: var(--bg);
    font-size: 12px;
    color: var(--text-s);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
    font-family: var(--ff);
}

.arch-page-btn.active {
    background: var(--ac);
    border-color: var(--ac);
    color: var(--bg);
    font-weight: 600;
}

.arch-page-btn:hover:not(.active) {
    border-color: var(--ac);
    color: var(--ac);
}

.arch-featured {
    margin: 22px 28px;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    cursor: pointer;
    transition: box-shadow .2s;
    background: #faf8f4;
}

.arch-featured:hover { box-shadow: 0 4px 20px rgba(0, 0, 0, .1); }

.arch-featured-body {
    padding: 28px 26px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.arch-featured-cat {
    display: inline-block;
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: var(--text-s);
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 2px 10px;
}

.arch-featured-title {
    font-size: 20px;
    font-weight: 600;
    font-family: var(--fg);
    line-height: 1.35;
    color: var(--text);
}

.arch-featured:hover .arch-featured-title { color: var(--ac); }

.arch-featured-date {
    font-size: 11px;
    color: #aaa;
    margin-top: 4px;
}

.arch-featured-img { overflow: hidden; }

.arch-featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(.92);
    transition: transform .4s;
}

.arch-featured:hover .arch-featured-img img { transform: scale(1.03); }

.arch-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    padding: 0 28px 28px;
}

.arch-card {
    border: 1px solid var(--border);
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
    background: var(--bg);
    transition: border-color .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
}

.arch-card:hover {
    border-color: var(--ac);
    box-shadow: 0 3px 16px rgba(0, 0, 0, .08);
}

.arch-card-img {
    height: 150px;
    overflow: hidden;
    background: #e8e4de;
    flex-shrink: 0;
}

.arch-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(.9);
    transition: transform .4s;
}

.arch-card:hover .arch-card-img img { transform: scale(1.04); }

.arch-card-body {
    padding: 14px 15px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.arch-card-title {
    font-size: 13.5px;
    font-weight: 400;
    color: var(--text);
    line-height: 1.5;
    margin-bottom: 10px;
    flex: 1;
}

.arch-card:hover .arch-card-title { color: var(--ac); }

.arch-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.arch-card-cat {
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: var(--text-s);
    border: 1px solid #d0ccc5;
    border-radius: 20px;
    padding: 2px 9px;
}

.arch-card-date {
    font-size: 10.5px;
    color: #aaa;
}

/* ════════════════════════════════════════
   CALENDARIO EVENTI
════════════════════════════════════════ */
.cal-wrap {
    padding: 28px;
    background: var(--bg-soft);
    min-height: 500px;
}

.cal-nav {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 9px 18px;
    margin-bottom: 24px;
}

.cal-nav-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: var(--ac);
    display: flex;
    align-items: center;
    transition: opacity .2s;
}

.cal-nav-btn:hover { opacity: .7; }

.cal-month {
    font-size: 14px;
    font-weight: 600;
    color: var(--ac);
    letter-spacing: .3px;
    min-width: 90px;
    text-align: center;
}

.cal-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cal-item {
    display: flex;
    align-items: center;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow .2s;
}

.cal-item:hover { box-shadow: 0 3px 14px rgba(0, 0, 0, .1); }

.cal-date-box {
    min-width: 90px;
    padding: 20px 14px;
    background: var(--ac);
    text-align: center;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cal-day {
    font-size: 28px;
    font-weight: 700;
    color: var(--bg);
    line-height: 1;
}

.cal-mon {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: rgba(255, 255, 255, .8);
    margin-top: 2px;
}

.cal-until {
    font-size: 9px;
    color: rgba(255, 255, 255, .7);
    margin-top: 4px;
    letter-spacing: .3px;
}

.cal-thumb {
    width: 120px;
    height: 82px;
    overflow: hidden;
    flex-shrink: 0;
}

.cal-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(.9);
    transition: transform .4s;
}

.cal-item:hover .cal-thumb img { transform: scale(1.05); }

.cal-body {
    padding: 16px 20px;
    flex: 1;
}

.cal-tag {
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: var(--ac);
    margin-bottom: 5px;
    display: block;
}

.cal-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
}

.cal-item:hover .cal-title { color: var(--ac); }

.cal-where {
    font-size: 11px;
    color: #aaa;
    margin-top: 5px;
}

/* ════════════════════════════════════════
   PAGINA LIBERA
════════════════════════════════════════ */
.free-content {
    padding: 36px 28px;
    min-height: 420px;
}

.free-page-title {
    font-size: 30px;
    font-weight: 600;
    font-family: var(--fg);
    color: var(--text);
    margin-bottom: 10px;
    line-height: 1.2;
}

.free-page-subtitle {
    font-size: 14px;
    color: var(--text-s);
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

/* ════════════════════════════════════════
   TEMPLATE DIPARTIMENTO / CORSO
════════════════════════════════════════ */
.dept-hero {
    padding: 32px 28px;
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 28px;
    align-items: start;
}

.dept-info {}

.dept-title {
    font-size: 26px;
    font-weight: 600;
    font-family: var(--fg);
    color: var(--text);
    margin-bottom: 12px;
    line-height: 1.25;
}

.dept-desc {
    font-size: 14px;
    line-height: 1.75;
    color: var(--text-s);
    margin-bottom: 20px;
}

.dept-photo {
    border-radius: 4px;
    overflow: hidden;
}

.dept-photo img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.dept-docenti {
    padding: 28px;
    border-bottom: 1px solid var(--border);
}

.dept-docenti-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 18px;
}

.docente-card {
    text-align: center;
    padding: 16px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
}

.docente-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--ac-l);
    margin: 0 auto 10px;
    overflow: hidden;
}

.docente-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.docente-name {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 3px;
}

.docente-ruolo {
    font-size: 10.5px;
    color: var(--text-s);
}

/* Corso di laurea */
.corso-header {
    padding: 32px 28px;
    border-bottom: 1px solid var(--border);
}

.corso-title {
    font-size: 26px;
    font-weight: 600;
    font-family: var(--fg);
    color: var(--text);
    margin-bottom: 8px;
}

.corso-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.corso-meta-item {
    font-size: 12px;
    color: var(--text-s);
}

.corso-meta-item strong {
    color: var(--ac);
    font-weight: 600;
}

.piano-studi {
    padding: 28px;
}

.piano-anno {
    margin-bottom: 24px;
}

.piano-anno-title {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--ac);
    border-left: 3px solid var(--ac);
    padding-left: 10px;
    margin-bottom: 12px;
}

.piano-esame {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0ece6;
    gap: 12px;
}

.piano-esame:last-child { border-bottom: none; }

.piano-esame-nome {
    font-size: 13.5px;
    color: var(--text);
    font-family: var(--fg);
    flex: 1;
}

.piano-esame-cfu {
    font-size: 11px;
    color: var(--text-s);
    white-space: nowrap;
}

/* ════════════════════════════════════════
   RESPONSIVE — @media (max-width: 680px)
════════════════════════════════════════ */
@media (max-width: 680px) {

    .page-wrap {
        box-shadow: none;
    }

    /* Header */
    .header {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .header-area-name { font-size: 18px; }

    /* Nav — scroll orizzontale */
    .nav { padding: 0 12px; }

    /* Hero */
    .hero-row {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .hero-slider,
    .hero-slider-track { min-height: 220px; }

    .of-sidebar { border-left: none; border-top: 1px solid var(--border); }

    /* Numeri */
    .numeri-strip {
        flex-wrap: wrap;
    }

    .num-item {
        flex: 0 0 50%;
        border-right: none;
        border-bottom: 1px solid #eee;
    }

    /* Sezioni */
    .section { padding: 22px 16px; }

    /* Griglie → 1 colonna */
    .news-grid,
    .events-grid,
    .services-grid,
    .arch-grid,
    .dept-docenti-grid {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer {
        grid-template-columns: 1fr;
        padding: 24px 16px;
    }

    .footer-btm {
        flex-direction: column;
        gap: 8px;
        text-align: center;
        padding: 12px 16px;
    }

    /* Archivio */
    .arch-featured {
        grid-template-columns: 1fr;
        margin: 16px;
    }

    /* Articolo singolo */
    .art-hero {
        grid-template-columns: 1fr;
    }

    .art-sidebar { border-left: none; border-top: 1px solid var(--border); }

    .art-content-row {
        grid-template-columns: 1fr;
    }

    .art-content-row .art-sidebar {
        border-left: none;
        border-top: 1px solid var(--border);
    }

    /* Dipartimento */
    .dept-hero { grid-template-columns: 1fr; }

    /* Corso */
    .corso-meta { flex-direction: column; gap: 6px; }

    /* Util bar */
    .util-bar { padding: 5px 16px; gap: 12px; }

    /* Breadcrumb */
    .breadcrumb { padding: 8px 16px; }

    /* Corsi catalogo mobile */
    .corsi-tabs { gap: 0; }
    .corsi-tab { padding: 0 12px; font-size: 11.5px; }
    .corsi-toolbar { flex-direction: column; align-items: stretch; }
    .corsi-search { min-width: unset; }
    .corso-card { grid-template-columns: 4px 1fr; }
    .corso-card-meta {
        grid-column: 2;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 0 20px 16px;
        min-width: unset;
    }
}

/* ════════════════════════════════════════
   CATALOGO CORSI DI STUDIO
════════════════════════════════════════ */
.corsi-header {
    padding: 26px 28px 0;
    border-bottom: none;
}

.corsi-tipo-badge {
    display: inline-block;
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--ac);
    background: var(--ac-l);
    padding: 4px 12px;
    border-radius: 2px;
    margin-bottom: 12px;
}

.corsi-page-title {
    font-size: 26px;
    font-weight: 600;
    font-family: var(--fg);
    color: var(--text);
    line-height: 1.2;
    margin-bottom: 8px;
}

.corsi-page-desc {
    font-size: 13.5px;
    color: var(--text-s);
    line-height: 1.65;
    max-width: 580px;
    margin-bottom: 24px;
}

/* Tab switcher */
.corsi-tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.corsi-tabs::-webkit-scrollbar { display: none; }

.corsi-tab {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-s);
    padding: 0 20px;
    height: 44px;
    display: flex;
    align-items: center;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color .15s, border-color .15s;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: var(--ff);
}

.corsi-tab:hover { color: var(--ac); }

.corsi-tab.active {
    color: var(--ac);
    border-bottom-color: var(--ac);
    font-weight: 600;
}

.corsi-tab-count {
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    background: var(--ac);
    border-radius: 20px;
    padding: 1px 7px;
    margin-left: 7px;
    transition: background .15s;
}

.corsi-tab:not(.active) .corsi-tab-count { background: #ccc; }

/* Lista corsi */
.corsi-body { padding: 24px 28px 32px; }

.corsi-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.corsi-count-label { font-size: 12px; color: var(--text-s); }
.corsi-count-label strong { color: var(--text); }

.corsi-search {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 6px 12px;
    background: #fff;
    min-width: 200px;
}

.corsi-search input {
    border: none;
    outline: none;
    font-size: 12px;
    color: #666;
    flex: 1;
    font-family: var(--ff);
    background: transparent;
}

.corsi-grid { display: flex; flex-direction: column; gap: 10px; }

.corso-card {
    display: grid;
    grid-template-columns: 4px 1fr auto;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
    text-decoration: none;
    color: inherit;
}

.corso-card:hover {
    border-color: var(--ac);
    box-shadow: 0 3px 14px rgba(0,0,0,.07);
}

.corso-card-bar { background: var(--ac); flex-shrink: 0; }

.corso-card-body { padding: 16px 20px; }

.corso-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.corso-card-tipo {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: var(--text-s);
    border: 1px solid #d8d4cc;
    border-radius: 20px;
    padding: 2px 8px;
    white-space: nowrap;
}

.corso-card-accesso {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
}

.corso-card-accesso.programmato {
    background: #fff3e0;
    color: #b45309;
    border: 1px solid #f6d28a;
}

.corso-card-accesso.libero {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.corso-card-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
    margin-bottom: 4px;
    transition: color .15s;
}

.corso-card:hover .corso-card-name { color: var(--ac); }

.corso-card-detail-row {
    display: flex;
    gap: 12px;
    font-size: 11.5px;
    color: var(--text-s);
}

.corso-card-lingua,
.corso-card-anno-accademico {
    white-space: nowrap;
}

.corso-card-meta {
    padding: 16px 20px 16px 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 8px;
    min-width: 130px;
}

.corso-card-durata {
    font-size: 11px;
    color: var(--text-s);
    text-align: right;
}

.corso-card-durata strong {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}

.corso-cta {
    font-size: 11px;
    font-weight: 600;
    color: var(--ac);
    background: var(--ac-l);
    border: 1.5px solid var(--ac);
    border-radius: 3px;
    padding: 6px 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, color .15s;
    font-family: var(--ff);
    text-decoration: none;
}

.corso-cta:hover { background: var(--ac); color: #fff; }

/* Tab content visibility */
.corsi-tab-content { display: none; }
.corsi-tab-content.active { display: block; }
