/* Personalizzazioni sito PRA (file separato: non viene toccato se si sostituisce style.css) */

/* Menu: hover rosa (R225 G140 B140) */
.header__nav .navbar .navbar-nav .nav-item:hover>.nav-link,
.header__nav .navbar .navbar-nav .nav-item>.nav-link:hover { background-color: rgb(225, 140, 140); }
.header__nav .navbar .navbar-nav .nav-item>.nav-link:hover .nav-link-text { color: #102c53; }

/* Fascia CTA rosa come l'header */
.frame.frame-ctab-fullwidth.frame-background-none { background-color: #ff8b8c; }

/* Card dentro i container: altezza decisa dal campo "Altezza card" del blocco */
.wp-block-uagb-container .card { min-height: 0; }

/* Card senza link (es. Avvertenza): nessun pulsante, testo piu' grande */
.card .card-footer:has(> a[href=""]) { display: none; }
.card--architettura .card-title { font-size: 2.25rem; }
.card--architettura .card-text p { font-size: 1.5rem; line-height: 1.35; }

/* Home: hero come sal.polimi.it (senza sfumatura bianca, pre-title e titolo con parola in gradiente) */
.home .hero .hero__overlay { background: none !important; }

/* Home: testo dell'hero piu' in alto, come da mockup */
.home .hero .hero__overlay > .hero__overlay__content { padding-bottom: 72px; }
.home .hero .hero__overlay__content .title { font-size: clamp(40px, 5vw, 62px); letter-spacing: -1px; line-height: 1.1; }
.home .hero .hero-accento { color: #2942db; }

/* ---------- Footer ---------- */
.site-footer .footer-logo { gap: 16px; }
.site-footer .footer-logo__scuola { border-left: 1px solid rgba(255,255,255,.55); padding-left: 16px; font-size: 12px; line-height: 1.25; letter-spacing: .02em; color: #fff; font-weight: 300; }
.site-footer .footer-logo__scuola strong { font-weight: 700; }

.site-footer .footer-columns { padding-top: 24px; padding-bottom: 24px; }
.site-footer .footer-block { margin-bottom: 32px; }
.site-footer .footer-block .widget-title { color: #67b2ff; font-size: 16px; font-weight: 600; margin: 0 0 14px; padding-left: 12px; border-left: 2px solid #67b2ff; line-height: 1.2; }
.site-footer .footer-links { margin: 0; padding: 0; }
.site-footer .footer-links li { margin: 0 0 14px; }
.site-footer .footer-links a { font-size: 14px; font-weight: 500; text-decoration: none; }
.site-footer .footer-links a.link--internal::after { color: #67b3ff; }
/* colonna "Campus": link piu' grandi come da mockup */
.site-footer .footer-columns > .col-lg-6 .footer-block:first-child .footer-links a { font-size: 18px; font-weight: 500; }
.site-footer .footer-block--bottone .footer-links a.footer-btn { display: inline-flex; font-size: 13px; padding: 8px 20px; }
.site-footer .footer-legal { font-weight: 600; font-size: 12px; }
@media (min-width: 992px) { .site-footer .footer-logo__scuola { white-space: nowrap; } }
.site-footer .footer-social { flex-wrap: wrap; }
.site-footer .footer-logo { flex-wrap: wrap; max-width: 100%; }
html, body { overflow-x: hidden; }
@media (min-width: 992px) { .site-footer .footer__header { justify-content: space-between; flex-wrap: nowrap; } .site-footer .footer__header > [class*='col-'] { flex: 0 0 auto; width: auto; max-width: none; margin-left: 0; } }

/* ===== Pulsanti dei template PHP (ricerca): pillola blu. I bottoni dei contenuti si impostano da editor (Spectra). ===== */
.wp-block-search__button,
.pra-search__submit,
.pra-search__link {
  display: inline-flex !important; align-items: center; justify-content: center; gap: 8px;
  background: transparent !important; color: #2942db !important;
  border: 1px solid #2942db !important; border-radius: 30px !important;
  padding: 10px 20px !important; font-family: "Manrope", sans-serif; font-size: 14px !important;
  font-weight: 700 !important; line-height: 1.3 !important; text-decoration: none !important;
  box-shadow: none !important; cursor: pointer; transition: background-color .2s, color .2s;
}
.wp-block-search__button:hover,
.pra-search__submit:hover,
.pra-search__link:hover {
  background: rgba(41,66,219,.08) !important; color: #2942db !important; border-color: #2942db !important;
}
.pra-search__link::after {
  content: ""; width: 14px; height: 14px; flex: none;
  background: #2942db; -webkit-mask: var(--pra-arrow) center/contain no-repeat; mask: var(--pra-arrow) center/contain no-repeat;
  --pra-arrow: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12h14M13 6l6 6-6 6'/></svg>");
}
/* barra di ricerca del blocco Cerca (pagina "Cerca") */
.wp-block-search .wp-block-search__inside-wrapper { gap: 12px; }
.wp-block-search .wp-block-search__input {
  border: 1px solid #c1c7ca; border-radius: 30px; padding: 11px 22px; font-size: 15px; font-family: "Manrope", sans-serif; color: #102c53;
}
.wp-block-search .wp-block-search__input:focus { border-color: #2942db; outline: 0; box-shadow: 0 0 0 3px rgba(41,66,219,.15); }
.wp-block-search .wp-block-search__label { font-weight: 700; color: #102c53; margin-bottom: 8px; }

/* ===== Pagina risultati di ricerca ===== */
.pra-search { padding-top: 40px; padding-bottom: 72px; max-width: 900px; }
.pra-search__form { display: flex; gap: 12px; margin-bottom: 20px; }
.pra-search__input {
  flex: 1 1 auto; min-width: 0; border: 1px solid #c1c7ca; border-radius: 30px; padding: 12px 24px;
  font-size: 16px; font-family: "Manrope", sans-serif; color: #102c53; background: #fff;
}
.pra-search__input:focus { border-color: #2942db; outline: 0; box-shadow: 0 0 0 3px rgba(41,66,219,.15); }
.pra-search__count { color: #5c6f82; margin: 0 0 28px; font-size: 15px; }
.pra-search__count strong { color: #102c53; }
.pra-search__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.pra-search__item {
  position: relative; background: #fff; border: 1px solid #e3e8ec; border-radius: 12px; padding: 24px 28px;
  margin: 0; transition: box-shadow .2s, border-color .2s;
}
.pra-search__item:hover { border-color: #c9d3ff; box-shadow: 0 8px 24px rgba(16,44,83,.08); }
.pra-search__tipo {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: #102c53; background: #e7eef3; border-radius: 4px; padding: 3px 8px; margin-bottom: 10px;
}
.pra-search__title { font-size: 22px; line-height: 1.25; font-weight: 700; margin: 0 0 8px; }
.pra-search__title a { color: #102c53; text-decoration: none; }
.pra-search__title a:hover { color: #2942db; }
.pra-search__excerpt { color: #3b4a5c; margin: 0 0 16px; font-size: 15px; line-height: 1.55; }
.pra-search__vuoto { background: #f4f7fa; border-radius: 12px; padding: 32px; text-align: center; }
.pra-search__vuoto p { margin: 0 0 16px; color: #102c53; }
.pra-search .navigation.pagination { margin-top: 36px; }
.pra-search .nav-links { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.pra-search .page-numbers {
  min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #c1c7ca; border-radius: 30px; padding: 0 14px; color: #102c53; text-decoration: none; font-weight: 700;
}
.pra-search .page-numbers.current, .pra-search .page-numbers:hover { border-color: #2942db; color: #2942db; background: rgba(41,66,219,.08); }
@media (max-width: 575px) { .pra-search__form { flex-direction: column; } .pra-search__item { padding: 20px; } }

/* News singola: nessuna riga autore/data e nessun commento */
.single-post .entry-header .entry-meta,
.single-post .entry-header.ast-no-title,
.single-post #comments,
.single-post .comments-area { display: none !important; }

/* ===== News singola (come sport.polimi.it) ===== */
.single-post-hero-wrap { max-width: 900px; padding-top: 32px; }
.single-post-hero { width: 100%; aspect-ratio: 16 / 7; background-size: contain; background-position: center; border-radius: 0; background-repeat: no-repeat; }
.single-post-content { max-width: 900px; margin: 0 auto; padding: 32px 0 72px; }
.single-post-category {
  display: inline-block; background: #102c53; color: #fff !important; font-weight: 700; font-size: 13px;
  padding: 8px 20px; text-decoration: none; margin-bottom: 8px;
}
.single-post-category:hover { background: #1c3f73; }
.single-post-title { font-size: clamp(32px, 4.5vw, 48px); line-height: 1.1; font-weight: 700; color: #102c53; margin: 24px 0 16px; }
.single-post-date { font-size: 12px; font-weight: 700; color: #5c6f82; margin-bottom: 32px; }
.single-post-text { font-size: 18px; line-height: 1.6; font-weight: 500; color: #102c53; }
.single-post-text p { margin: 0 0 1.4em; }
.single-post-text img { max-width: 100%; height: auto; }
.single-post-back { margin-top: 16px; }
@media (max-width: 575px) { .single-post-hero { aspect-ratio: 4 / 3; } .single-post-text { font-size: 16px; } }

/* ===== Mobile ===== */
@media (max-width: 767px) {
  .home .hero .hero__overlay .hero__overlay__content { padding-bottom: 24px !important; }
  .dettaglio-corso.dettaglio-corso { min-height: 0; gap: 6px; padding-bottom: 8px; }
  .wp-block-uagb-container { max-width: 100%; }
  .hero.hero--page[class*="hero--page-"] { height: 240px !important; min-height: 0 !important; }
  .hero.hero--page[class*="hero--page-"] .hero__background-image { height: 100%; }
  .hero.hero--page[class*="hero--page-"] .hero__overlay { height: 100%; }
  .hero.hero--page[class*="hero--page-"] .title { font-size: 34px; line-height: 1.1; }
  .home .hero.hero--page[class*="hero--page-"], .home .hero { height: auto !important; min-height: 0 !important; }
  .home .hero.hero--page[class*="hero--page-"] .hero__background-image { height: 180px; }
  .home .hero.hero--page[class*="hero--page-"] .hero__overlay { height: auto !important; }
  .home .hero .hero__background-image { height: 180px; }
  .home .hero .hero__overlay { position: relative !important; height: auto !important; padding-top: 16px; }
  .home .hero .hero__overlay .hero__overlay__content { padding-top: 0; }
  img, video, iframe { max-width: 100%; }
  .wp-block-image img { height: auto; }
  .single-post-content, .pra-search { padding-left: 4px; padding-right: 4px; }
}

@media (max-width: 991px) {
  .site-footer .footer__header > [class*='col-'] { margin-bottom: 20px; }
  .site-footer .footer-logo { margin-bottom: 8px; }
  .site-footer .footer-logo__scuola { display: block; height: auto; line-height: 1.3; padding-top: 2px; padding-bottom: 2px; }
  .site-footer .footer-social { margin-top: 12px; }
}
@media (max-width: 575px) { .site-footer .footer-social { gap: 14px !important; flex-wrap: nowrap; } .site-footer .footer-social a { font-size: 22px; } }

/* Home hero: parola in evidenza in blu pieno (leggibile sopra la foto, senza sfumatura) */
.home .hero .title i { background: none !important; -webkit-background-clip: border-box !important; background-clip: border-box !important; -webkit-text-fill-color: #2942db !important; color: #2942db !important; }

/* Card con foto: effetto hover rosa del tema al posto del blu */
.card.card--photographic .card-img-overlay::after {
  background: linear-gradient(0deg, rgba(255, 139, 140, 0.9) 0%, rgba(255, 139, 140, 0) 60%);
}
.home .hero .hero-pretitolo { color: #2942db; font-size: 22px; font-weight: 700; line-height: 24px; margin: 0 0 8px; }

/* Voce di menu "Cerca" mostrata solo come icona (lente), come su polimi.it. Si attiva con la classe CSS "menu-icona-cerca" sulla voce di menu. */
.navbar .menu-icona-cerca > a { font-size: 0 !important; width: 40px; height: 40px; padding: 0 !important; display: inline-flex; align-items: center; justify-content: center; }
.navbar .menu-icona-cerca > a::before {
  content: ""; width: 20px; height: 20px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='M20 20l-4-4'/></svg>") center/contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='M20 20l-4-4'/></svg>") center/contain no-repeat;
}
.navbar .menu-icona-cerca .nav-link-text { font-size: 0 !important; }

/* Logo in alto (SVG): larghezza fluida fino a 380px */
.header__logo.poli img { width: 100%; max-width: 380px; height: auto; }

/* Header sempre sopra ai contenuti (le card usano z-index fino a 10) */
header.header { z-index: 1030 !important; }

/* Logo nel footer (SVG bianco) */
.site-footer .footer-logo__img { width: 100%; max-width: 360px; height: auto; max-height: none; }

/* Carosello hero in home */
.hero-carousel{position:absolute;inset:0;overflow:hidden}
.hero-carousel .hero-slide{position:absolute;inset:0;opacity:0;transition:opacity 1s ease}
.hero-carousel .hero-slide.is-active{opacity:1}
.hero-carousel .hero-slide img{display:block;width:100%;height:100%;object-fit:cover}
.hero-carousel__dots{position:absolute;right:24px;bottom:20px;z-index:6;display:flex;gap:8px}
.hero-carousel__dot{width:12px;height:12px;border-radius:50%;border:2px solid #2942db;background:#fff;padding:0;cursor:pointer;opacity:.7}
.hero-carousel__dot.is-active{background:#2942db;opacity:1}
@media (prefers-reduced-motion:reduce){.hero-carousel .hero-slide{transition:none}}

/* Hero con carosello: foto scure, testo chiaro */
.home .hero:has(.hero-carousel) .hero__overlay .title,
.home .hero:has(.hero-carousel) .hero__overlay .hero-pretitolo{color:#fff!important}
.home .hero:has(.hero-carousel) .hero__overlay .title i{color:#fff!important;background:none!important;-webkit-text-fill-color:#fff!important}
.home .hero:has(.hero-carousel) .hero__overlay{background:linear-gradient(90deg,rgba(16,44,83,.55),rgba(16,44,83,0) 70%)!important}

/* Mobile: il selettore IT/EN non deve finire sotto il pulsante del menu */
@media (max-width: 767.98px) {
  .header__top .tools #language_menu { margin-right: 64px !important; }
}

/* Card con immagine: tutta la card cliccabile */
.card-immagine-polimi:has(a[href]:not([href="#"])){cursor:pointer}

/* Pagina Struttura (IT e EN): schemi piu' piccoli e blocchi degli anni piu' distanziati */
.page-id-172 .wp-block-image, .page-id-271 .wp-block-image { max-width: 60%; margin: 2.5rem auto 0; }
.page-id-172 .wp-block-image img, .page-id-271 .wp-block-image img { display: block; margin: 0 auto; max-width: 100%; height: auto; }
.page-id-172 .uagb-is-root-container, .page-id-271 .uagb-is-root-container { margin-bottom: 72px; }
@media (max-width: 767.98px) {
  .page-id-172 .wp-block-image, .page-id-271 .wp-block-image { max-width: 100%; }
  .page-id-172 .uagb-is-root-container, .page-id-271 .uagb-is-root-container { margin-bottom: 40px; }
}

/* Home: card rosa grande (come l'altezza delle due card scure accanto, titolo grande) */
.home .uagb-block-a1720532 .card.card--architettura { height: 100% !important; }
.home .uagb-block-a1720532 .card.card--architettura .card-body .card-title { font-size: 2.25rem !important; line-height: 1.15 !important; }
.home .uagb-block-a1720532 .card.card--architettura .card-body .card-text p { font-size: 1.25rem !important; line-height: 1.4 !important; }
