/* Visual refinement: original typography, palette and page structure. */
html { height: auto; overflow: visible; }
.ap-page { background: #f7f9fa; overflow: visible; }
.ap-aside { top: var(--sidebar-top, 20px); }
@media (min-width: 761px) {
  .ap-main { display: grid; grid-template-columns: minmax(0, 1fr) 310px; column-gap: 20px; align-items: start; }
  .ap-breadcrumb, .ap-source { grid-column: 1 / -1; }
  .ap-intro { grid-column: 1; grid-row: 2; }
  .ap-layout { display: contents; }
  .ap-content { grid-column: 1; grid-row: 3; }
  .ap-aside { grid-column: 2; grid-row: 2 / 4; }
}
@media (min-width: 1001px) {
  .ap-main, .ap-header-inner { max-width: 1760px; padding-left: 32px; padding-right: 32px; }
  .ap-main { grid-template-columns: minmax(0, 1fr) clamp(400px, 32vw, 520px); column-gap: 28px; }
  .ap-footer { max-width: 1696px; margin-left: max(32px, calc((100% - 1696px) / 2)); margin-right: max(32px, calc((100% - 1696px) / 2)); }
}
.ap-header { box-shadow: none; }
.ap-header-inner { min-height: 72px; padding-top: 12px; padding-bottom: 12px; }
.ap-header nav a { padding: 8px 20px; border-radius: 8px; font-weight: 500; letter-spacing: .1px; }
.ap-login, .ap-register { color: #023047; }
.ap-breadcrumb { padding: 28px 0 22px; font-size: 16px; }
.ap-breadcrumb a { color: #023047; }
.ap-breadcrumb a:hover { text-decoration: underline; }
.ap-intro { margin-bottom: 32px; }
.ap-category { margin-bottom: 14px; padding: 5px 11px; border-radius: 5px; font-size: 15px; letter-spacing: .5px; }
.ap-page h1 { font-size: 27px; line-height: 1.4; letter-spacing: -.35px; }
.ap-layout { gap: 28px; }
.ap-card { border: 1px solid rgba(2,48,71,.09); border-radius: 16px; box-shadow: 0 3px 14px rgba(2,48,71,.025); }
.ap-page h2 { margin-bottom: 20px; letter-spacing: -.15px; }
.ap-page h3 { margin-bottom: 9px; font-size: 16px; }
/* Brand blue adds emphasis while keeping headings readable on white. */
.ap-page h1, .ap-page h2, .ap-page h3,
.ap-details summary { color: #087696 !important; }
.ap-page p { margin-bottom: 16px; line-height: 1.65; }
.ap-page p:last-child { margin-bottom: 0; }
.ap-summary { padding: 24px 28px; }
.ap-summary > div + div { padding-left: 28px; border-left-color: rgba(2,48,71,.1); }
.ap-summary strong { margin: 5px 0; }
.ap-summary > div > span:last-child { font-size: 16px; color: #4b5860; }
.ap-label { font-size: 16px; }
.ap-section-nav { gap: 4px; margin: 12px 0 0; padding: 5px 0; border: 0; font-size: 16px; }
.ap-section-nav a { padding: 10px 14px; border-radius: 7px; transition: background-color .15s; }
.ap-section-nav a:first-child { margin-left: -14px; }
.ap-section-nav a:hover { background: rgba(2,48,71,.06); text-decoration: none; }
.ap-section { margin-top: 20px; padding: 28px; }
.ap-section-top > span { font-size: 16px; }
.ap-program li { padding: 24px 0 24px 48px; border-bottom-color: rgba(2,48,71,.08); }
.ap-program li:first-child { padding-top: 4px; }
.ap-program li:last-child { padding-bottom: 0; }
.ap-program li::before { content: counter(parts, decimal-leading-zero); top: 22px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: rgba(142,202,230,.2); font-size: 16px; }
.ap-program li:first-child::before { top: 2px; }
.ap-program li::before { background: rgba(253,158,2,.16); color: #023047; }
.ap-program p { color: #33434b; }
.ap-details summary { padding: 12px 0; font-weight: 600; }
.ap-details summary > span { display: grid; place-items: center; flex-shrink: 0; width: 28px; height: 28px; padding: 0; border-radius: 50%; background: rgba(253,158,2,.12); color: #023047; font-size: 0; }
.ap-details summary > span::before { content: ''; width: 16px; height: 16px; background: currentColor; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 5.5 8 10.5 13 5.5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; transition: transform .15s; }
.ap-details summary > span { position: relative; }
.ap-details summary > span::before { position: absolute; inset: 6px; }
.ap-details[open] summary > span { transform: none; }
.ap-details[open] summary > span::before { transform: rotate(180deg); }
.ap-detail-body { padding-top: 14px; color: #33434b; }
.ap-detail-body li { margin-bottom: 13px; }
.ap-qualification { margin-top: 18px; padding-top: 22px; border-top-color: rgba(2,48,71,.08); }
.ap-qualification p { color: #33434b; }
#descrizione { padding-top: 18px; padding-bottom: 18px; }
.ap-page .review-container { border-top-color: rgba(2,48,71,.08); }
.ap-enroll { box-shadow: 0 8px 30px rgba(2,48,71,.07); }
.ap-course-image { height: 155px; }
.ap-enroll-content h2 { margin-bottom: 18px; }
.ap-date-list { font-size: 16px; }
.ap-date-list dd { font-weight: 600; }
.ap-price-block { margin-bottom: 20px; padding: 18px 16px 14px; border: 1px solid rgba(142,202,230,.22); border-radius: 10px; background: rgba(142,202,230,.08); }
.ap-page .ap-early-label { margin-bottom: 7px; font-size: 16px; font-weight: 600; }
.ap-main-price strong { font-size: 32px; letter-spacing: -.8px; }
.ap-main-price > span { font-size: 16px; }
.ap-page .ap-deadline { margin-top: 8px; color: #4b5860; font-size: 16px; }
.ap-other-prices { margin: 17px 0 0; padding-top: 12px; border-top: 1px solid rgba(2,48,71,.09); font-size: 15px; }
.ap-page .ap-other-prices p { margin-bottom: 5px; }
.ap-enroll-button { gap: 14px; border-radius: 9px; color: #023047 !important; box-shadow: 0 2px 5px rgba(253,158,2,.18); font-weight: 600; letter-spacing: .1px; transition: background-color .15s, box-shadow .15s; }
.ap-enroll-button::after { content: '→'; font-size: 20px; font-weight: 400; line-height: 1; }
.ap-enroll .ap-enroll-button { min-height: 62px; padding: 16px 20px; font-size: 22px; line-height: 1.3; font-weight: 700; }
.ap-enroll .ap-enroll-button::after { font-size: 26px; }
.ap-enroll-button:hover { background: #ffad25; box-shadow: 0 4px 10px rgba(253,158,2,.22); }
.ap-page .ap-access-note { margin-bottom: 18px; font-size: 15px; }
.ap-closing { border-top-color: rgba(2,48,71,.08); font-size: 15px; }
.ap-closing strong { font-size: 16px; }
.ap-source { padding: 28px 0 !important; }
.ap-footer { padding: 24px 0; border-top-color: rgba(2,48,71,.1); }
/* Repeat the brand palette across information, materials and enrollment. */
.ap-summary { background: #e5f3f9; border-color: #bddde9; }
.ap-summary .ap-label { color: #087696; }
.ap-section-nav a { background: #fff; color: #075974; box-shadow: inset 0 0 0 1px #bddde9; }
.ap-section-nav a:hover { background: #cde8f3; }
.ap-section { border-top: 4px solid #8ecae6; }
#obiettivi { background: #fff9ed; border-top-color: #fd9e02; }
#programma { border-top-color: #087696; }
.ap-program li::before { background: #ffe4b3; }
#materiali { background: #f4f9e9; border-color: #dbe8bf; border-top-color: #99cc33; }
#materiali h2, #materiali h3, #materiali summary { color: #45651b !important; }
#materiali .ap-details summary > span { background: #e0edc6; }
#descrizione { background: #edf6fa; }
.ap-teacher { background: #fff; border-top-color: #8ecae6; }
.ap-teacher img { outline: 3px solid #8ecae6; outline-offset: 3px; }
#recensioni { background: #fff9ed; border-top-color: #fd9e02; }
.ap-review-score > strong { color: #087696; }
.ap-enroll { border-color: #8ecae6; }
.ap-price-block { background: #fff5e2; border-color: #f6d494; }
.ap-other-prices { border-top-color: #f0d6a9; }
.ap-closing { background: #e5f3f9; border: 0; border-radius: 9px; padding: 14px; }
@media (max-width: 1000px) {
  .ap-layout { gap: 20px; }
  .ap-summary { padding: 22px; }
  .ap-summary > div + div { padding: 14px 0 0; border-left: 0; border-top-color: rgba(2,48,71,.1); }
  .ap-section { padding: 24px; }
  .ap-section-nav { gap: 0; }
  .ap-section-nav a { padding: 10px; }
  .ap-section-nav a:first-child { margin-left: -10px; }
  .ap-price-block { padding: 16px 12px 12px; }
}
@media (max-width: 760px) {
  .ap-header-inner { min-height: 60px; padding: 10px 16px; }
  .ap-header nav a { padding: 6px 10px; }
  .ap-breadcrumb { padding: 22px 0 18px; }
  .ap-page h1 { font-size: 23px; line-height: 1.4; letter-spacing: -.2px; }
  .ap-intro { margin-bottom: 24px; }
  .ap-layout { gap: 22px; }
  .ap-course-image { height: 145px; }
  .ap-date-list { margin-bottom: 18px; }
  .ap-date-list dd { margin-top: 4px; }
  .ap-page .ap-main-price strong { font-size: 30px; }
  .ap-price-block { padding: 18px 16px 14px; }
  .ap-summary { padding: 20px; }
  .ap-summary > div + div { padding: 0 0 0 15px; border-top: 0; border-left: 1px solid rgba(2,48,71,.1); }
  .ap-summary > div > span:last-child { font-size: 16px; }
  .ap-section-nav { padding: 6px 0; font-size: 16px; }
  .ap-section { margin-top: 18px; padding: 23px; }
  .ap-program li { padding-left: 44px; }
  .ap-section-top { margin-bottom: 20px; }
  .ap-source { padding-bottom: 18px !important; }
  .ap-footer { padding: 20px 0 110px; }
  .ap-mobile-cta { padding-bottom: max(12px,env(safe-area-inset-bottom)); border-top-color: rgba(2,48,71,.1); box-shadow: 0 -4px 20px rgba(2,48,71,.04); }
  .ap-mobile-cta .ap-enroll-button { padding: 12px 16px; gap: 10px; font-size: 18px; font-weight: 700; }
}
@media (prefers-reduced-motion: reduce) { .ap-page * { transition: none !important; } }
