/* =========================================================
   HTL — Health Teaching & Learning
   Stile della home page (riproduce la bozza Photoshop)
   ========================================================= */

:root {
    --teal:        #1aa6b6;
    --teal-dark:   #0e8090;
    --teal-strong: #1496a6;
    --blue:        #1f5aa6;
    --blue-dark:   #16356b;
    --footer-blue: #0E4C85;
    --gray-bg:     #ececec;
    --text:        #333;
    --white:       #fff;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
    color: var(--text);
    background: #fff;
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #00869F;
    box-shadow: 0 1px 6px rgba(0,0,0,.15);
}

.header-inner {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 32px;
    height: 70px;
    display: flex;
    align-items: center;
    gap: 24px;
}

/* Logo (immagine) — ridotto del 20% */
.logo { display: inline-flex; align-items: center; }
.logo-img {
    height: 36px;   /* 45px - 20% */
    width: auto;
    display: block;
}

/* Navigazione */
.main-nav { margin-left: auto; }

.nav-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-item { position: relative; }

.nav-item > a {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 24px 16px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
    transition: background .2s;
}
.nav-item > a:hover { background: rgba(255,255,255,.12); }
.nav-item .fa-caret-down { font-size: 12px; opacity: .9; }

/* Sottomenu a tendina */
.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    list-style: none;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,.18);
    border-top: 3px solid var(--teal);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all .2s ease;
}
.nav-item.has-children:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.submenu li a {
    display: block;
    padding: 12px 18px;
    color: #444;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
    transition: background .15s, color .15s;
}
.submenu li a:hover { background: #f3fbfc; color: var(--teal-strong); }

/* Azioni (utente / ricerca) */
.header-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-left: 14px;
}
.action-icon {
    color: #fff;
    font-size: 19px;
    transition: opacity .2s;
}
.action-icon:hover { opacity: .75; }

/* Hamburger (mobile) */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 6px;
}
.mobile-toggle span {
    width: 26px; height: 3px;
    background: #fff; border-radius: 2px;
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
    position: relative;
    min-height: 620px;
    display: flex;
    align-items: center;
    background: #0f2e5c url('../images/hero.jpg') right center / contain no-repeat;
    overflow: hidden;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg,
        rgba(20,48,99,.96) 0%,
        rgba(23,58,116,.90) 32%,
        rgba(26,70,140,.55) 52%,
        rgba(26,70,140,.05) 70%);
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    padding: 0 32px;
}
.hero-content > * { max-width: 720px; }

.hero-title {
    color: #fff;
    font-size: 46px;
    font-weight: 800;
    line-height: 1.18;
    text-transform: uppercase;
    margin-bottom: 26px;
}
.hero-text {
    color: #dfe7f2;
    font-size: 16px;
    line-height: 1.65;
    margin-bottom: 34px;
    max-width: 560px;
}

/* Bottone */
.btn {
    display: inline-block;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    cursor: pointer;
    transition: background .2s, transform .15s;
}
.btn-hero {
    background: var(--teal);
    color: #fff;
    padding: 18px 40px;
    font-size: 15px;
    border-radius: 2px;
}
.btn-hero:hover { background: var(--teal-dark); transform: translateY(-2px); }

/* =========================================================
   CATEGORIE
   ========================================================= */
.categories {
    background: var(--gray-bg);
    padding: 70px 32px 90px;
}
.categories-head {
    text-align: center;
    margin-bottom: 56px;
}
.section-eyebrow {
    display: block;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 14px;
    color: #8a8a8a;
    margin-bottom: 10px;
}
.section-title {
    font-size: 38px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--teal-strong);
    letter-spacing: 1px;
}

.cat-grid {
    max-width: 1500px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}
.cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.cat-img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #c9d2da center / cover no-repeat;
    box-shadow: 0 4px 14px rgba(0,0,0,.12);
    transition: transform .25s, box-shadow .25s;
}
.cat-card:hover .cat-img {
    transform: translateY(-6px);
    box-shadow: 0 12px 26px rgba(0,0,0,.20);
}
.cat-label {
    margin-top: 22px;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--teal-strong);
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
    background: var(--footer-blue);
    color: #dce6f5;
    padding: 56px 32px;
}
.footer-inner {
    max-width: 1600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 40px;
    align-items: start;
}
.footer-logo-img {
    height: 52px;   /* 65px - 20% */
    width: auto;
    display: block;
}
.footer-logo-sub {
    display: block;
    font-size: 13px;
    letter-spacing: 1px;
    margin: 4px 0 16px;
    color: #cdd9ee;
}
.footer-text { font-size: 12.5px; line-height: 1.7; color: #b9c7e0; max-width: 320px; }

.footer-links ul { list-style: none; padding-top: 6px; }
.footer-links li { margin-bottom: 14px; }
.footer-links a {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #e3ebf8;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color .2s;
}
.footer-links a:hover { color: #fff; }
.footer-links .fa-caret-right { font-size: 13px; }

.footer-svp { display: flex; gap: 14px; align-items: flex-start; }
.svp-logo-img {
    width: 70px;
    height: auto;
    display: block;
    border-radius: 4px;
    flex-shrink: 0;
}
.svp-text { font-size: 12px; line-height: 1.5; color: #cdd9ee; padding-top: 6px; }

.footer-legal { text-align: right; }
.privacy-link {
    text-transform: uppercase;
    letter-spacing: .5px;
    font-size: 14px;
    color: #e3ebf8;
}
.privacy-link:hover { color: #fff; }
.legal-text { font-size: 13px; margin-top: 8px; color: #cdd9ee; }

/* =========================================================
   HERO RIDOTTO (pagine interne)
   ========================================================= */
.hero--page {
    min-height: 300px;
}
.hero-eyebrow {
    display: block;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 14px;
    font-weight: 600;
    color: #bcd2ef;
    margin-bottom: 10px;
}
.hero--page .hero-title { font-size: 40px; margin-bottom: 0; }

/* =========================================================
   CONTENUTO PAGINA
   ========================================================= */
.page-content {
    background: #fff;
    padding: 64px 32px 80px;
}
.content-wrap {
    max-width: 820px;
    margin: 0 auto;
}
.content-head { margin-bottom: 34px; }
.content-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--blue-dark);
    line-height: 1.3;
}
.content-subtitle {
    font-size: 20px;
    font-weight: 700;
    color: var(--teal-strong);
    margin: 30px 0 14px;
}
.content-paragraph {
    font-size: 16.5px;
    line-height: 1.8;
    color: #3a3a3a;
    margin: 24px 0;
}
.content-list {
    list-style: none;
    margin: 0 0 8px;
    padding: 0;
}
.content-list li {
    position: relative;
    padding: 8px 0 8px 30px;
    font-size: 16.5px;
    line-height: 1.55;
    color: #3a3a3a;
    border-bottom: 1px solid #f0f0f0;
}
.content-list li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 17px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--teal);
}

/* CTA / pulsante PDF */
.content-cta { margin-top: 40px; }
.btn-pdf {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--blue);
    color: #fff;
    padding: 15px 30px;
    font-size: 15px;
    border-radius: 3px;
}
.btn-pdf:hover { background: var(--blue-dark); transform: translateY(-2px); }
.btn-pdf .fa-file-pdf { font-size: 18px; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
    .nav-item > a { padding: 24px 11px; font-size: 12.5px; }
    .hero-title { font-size: 38px; }
}

@media (max-width: 900px) {
    .mobile-toggle { display: flex; margin-left: auto; }
    .header-actions { order: 2; padding-left: 0; }
    .main-nav {
        order: 3;
        position: absolute;
        top: 70px; left: 0; right: 0;
        background: var(--teal-dark);
        margin: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height .3s ease;
    }
    body.nav-open .main-nav { max-height: 80vh; overflow-y: auto; }
    .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
    .nav-item > a { padding: 16px 24px; }
    .submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: 0;
        background: rgba(0,0,0,.15);
        display: none;
    }
    .nav-item.has-children:hover .submenu { display: block; }
    .submenu li a { color: #eaf7f9; border-bottom-color: rgba(255,255,255,.1); }
    .submenu li a:hover { background: rgba(255,255,255,.08); color: #fff; }

    .cat-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .footer-legal { text-align: left; }
}

@media (max-width: 560px) {
    .header-inner { padding: 0 18px; }
    .hero { min-height: 520px; }
    .hero-title { font-size: 30px; }
    .section-title { font-size: 28px; }
    .cat-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; }
}

/* =========================================================
   POPUP VIDEO
   ========================================================= */
.video-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.video-modal.is-open { display: flex; }

.video-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(7, 22, 45, .8);
    backdrop-filter: blur(2px);
}
.video-modal__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 900px;
    max-height: 92vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
    animation: modalIn .25s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.video-modal__close {
    position: absolute;
    top: -44px;
    right: 0;
    background: none;
    border: 0;
    color: #fff;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    transition: opacity .2s;
}
.video-modal__close:hover { opacity: .7; }

.video-modal__player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 6px 6px 0 0;
    overflow: hidden;
}
.video-modal__player iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.video-modal__desc {
    padding: 24px 28px 28px;
}
.video-modal__desc h3 {
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--blue-dark);
    margin-bottom: 8px;
}
.video-modal__desc p {
    font-size: 15px;
    line-height: 1.55;
    color: #444;
    margin: 2px 0;
}
.video-modal__desc .video-modal__authors {
    font-weight: 600;
    color: var(--teal-strong);
    margin-top: 10px;
}

@media (max-width: 560px) {
    .video-modal { padding: 16px; }
    .video-modal__close { top: -40px; }
    .video-modal__desc h3 { font-size: 17px; }
}
