/* ==============================================================
   Master e Professioni — art direction review v0.9.1-rc1
   Desktop/laptop visual refinements ONLY. All core scene logic,
   course content, commerce and server integrations remain unchanged.
   =============================================================== */

/* Search: upper-right, stacked with Fullscreen as requested. */
html[data-vmag-mode="desktop"] #vmag-search {
    top:12px;
    left:auto;
    right:18px;
    width:min(355px,calc(100vw - 38px));
    z-index:36;
}
html[data-vmag-mode="desktop"] #vmag-search .vs-panel {left:auto;right:0;top:50px;}
html[data-vmag-mode="desktop"] .fullscreen {top:63px;right:18px;z-index:34;}

/* Middle point between compact public version and oversized Local HUD.
   Only typography is eased back; cards retain their usable click areas. */
html[data-vmag-mode="desktop"] .navigation button {font-size:13.5px;letter-spacing:1px;}
html[data-vmag-mode="desktop"] .mission-meta {font-size:12.1px;}
html[data-vmag-mode="desktop"] .mission-title {font-size:20.1px;}
html[data-vmag-mode="desktop"] .description {font-size:15.4px;line-height:1.55;}
html[data-vmag-mode="desktop"] .effect-copy strong {font-size:13.5px;}
html[data-vmag-mode="desktop"] .effect-copy span {font-size:12.4px;}
html[data-vmag-mode="desktop"] .rewards-heading {font-size:12.2px;}
html[data-vmag-mode="desktop"] .reward {font-size:14px;}
html[data-vmag-mode="desktop"] #vmag-search input {font-size:13.4px;}
html[data-vmag-mode="desktop"] #vmag-faculty-dialog .fd-content p,
html[data-vmag-mode="desktop"] #vmag-faculty-dialog .fd-content li {font-size:16.3px;}

/* CHAT DOCENTI — narrower, lighter HUD with four preserved operator icons.
   The original accessible button and click-to-load Crisp integration remain. */
html[data-vmag-mode="desktop"] .operators {
    width:282px;
    height:78px;
    right:20px;
    bottom:37px;
    border-color:rgba(98,198,216,.46);
    border-left-color:rgba(113,226,240,.75);
    border-bottom-color:rgba(90,199,220,.54);
    clip-path:polygon(0 0,calc(100% - 17px) 0,100% 17px,100% 100%,13px 100%,0 calc(100% - 13px));
}
html[data-vmag-mode="desktop"] .operators::before {left:13px;right:17px;height:2px;}
html[data-vmag-mode="desktop"] .operators::after {right:15px;bottom:8px;width:38px;}
html[data-vmag-mode="desktop"] .operators .briefing {
    font-size:16.2px;
    padding:18px 17px 0;
    line-height:1.15;
    letter-spacing:.65px;
}
html[data-vmag-mode="desktop"] .operators .briefing::before {
    left:18px;top:49px;width:6px;height:6px;
}
html[data-vmag-mode="desktop"] .operators .briefing::after {
    content:"LINEA DIRETTA / ORIENTAMENTO";
    top:44px;left:32px;
    font-size:8.3px;
    letter-spacing:.52px;
}
html[data-vmag-mode="desktop"] .operators .operator-list {
    right:16px;top:20px;width:82px;height:21px;
    grid-template-columns:repeat(4,15px);gap:6px;
}
html[data-vmag-mode="desktop"] .operators .operator {
    width:15px;height:15px;
}
html[data-vmag-mode="desktop"] .operators .operator::after {
    left:-2px;right:-2px;bottom:-5px;height:5px;
}

/* Faculty: cards have a 12% larger physical footprint from facultyLayout.
   Photo composition is brighter and closer to the subject's face. */
html[data-vmag-mode="desktop"] #vmag-faculty .fc-portrait {
    border-color:rgba(108,196,211,.64);
    background:linear-gradient(116deg,#0c2635,#132e3a 67%,#09202d);
}
html[data-vmag-mode="desktop"] #vmag-faculty .fc-portrait img {
    opacity:.84;
    filter:saturate(.96) contrast(1.06);
}
html[data-vmag-mode="desktop"] #vmag-faculty .faculty-card:hover .fc-portrait img,
html[data-vmag-mode="desktop"] #vmag-faculty .fc-portrait:focus-visible img {
    opacity:1;
    filter:saturate(1.05) contrast(1.08);
}
html[data-vmag-mode="desktop"] #vmag-faculty .fc-name {
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
html[data-vmag-mode="desktop"] #vmag-faculty .faculty-pagination {z-index:3;}

/* HOME conversion HUD: leave the stage clear in CORSI / CHI SIAMO at
   every desktop resolution, not only on low-height laptops. The scene
   controllers already toggle these body classes during navigation.
   Retract/glide both panels without touching their content or pricing. */
html[data-vmag-mode="desktop"] body.vmag-front-page .mission-panel,
html[data-vmag-mode="desktop"] body.vmag-front-page .rewards {
    transform-origin:0 100%;
    opacity:1;
    visibility:visible;
    transform:translate3d(0,0,0) scale(1);
    filter:blur(0) brightness(1);
    transition:
        opacity 350ms cubic-bezier(.22,1,.36,1),
        transform 490ms cubic-bezier(.16,1,.3,1),
        filter 380ms ease,
        visibility 0s linear 0s;
}
/* Slightly delayed secondary HUD gives the panels a controlled sequence. */
html[data-vmag-mode="desktop"] body.vmag-front-page .rewards {
    transition-delay:85ms,85ms,85ms,0ms;
}
html[data-vmag-mode="desktop"] body.vmag-front-page:is(.vmag-courses-scene,.vmag-faculty-scene) .mission-panel,
html[data-vmag-mode="desktop"] body.vmag-front-page:is(.vmag-courses-scene,.vmag-faculty-scene) .rewards {
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transform:translate3d(-20px,10px,0) scale(.973);
    filter:blur(2px) brightness(.72);
    /* Visibility goes hidden only after the outgoing animation finishes. */
    transition-delay:0ms,0ms,0ms,490ms;
}
html[data-vmag-mode="desktop"] body.vmag-front-page:is(.vmag-courses-scene,.vmag-faculty-scene) .rewards {
    transform:translate3d(-10px,14px,0) scale(.973);
    transition-delay:55ms,55ms,55ms,545ms;
}
/* A single restrained scan of light when HOME's two HUD modules lock in. */
html[data-vmag-mode="desktop"] body.vmag-front-page .mission-panel::before,
html[data-vmag-mode="desktop"] body.vmag-front-page .rewards::before {
    content:"";
    position:absolute;
    z-index:8;
    inset:0;
    pointer-events:none;
    opacity:0;
    background:linear-gradient(90deg,transparent 0%,rgba(95,212,225,.025) 43%,rgba(158,227,235,.12) 50%,transparent 60%);
    transform:translateX(-105%);
}
html[data-vmag-mode="desktop"] body.vmag-front-page:not(.vmag-courses-scene):not(.vmag-faculty-scene) .mission-panel::before,
html[data-vmag-mode="desktop"] body.vmag-front-page:not(.vmag-courses-scene):not(.vmag-faculty-scene) .rewards::before {
    animation:vmag-promo-hud-scan 650ms 120ms ease-out both;
}
html[data-vmag-mode="desktop"] body.vmag-front-page:not(.vmag-courses-scene):not(.vmag-faculty-scene) .rewards::before {
    animation-delay:205ms;
}
@keyframes vmag-promo-hud-scan {
    0%   {opacity:0;transform:translateX(-105%)}
    22%  {opacity:.8}
    73%  {opacity:.65}
    100% {opacity:0;transform:translateX(105%)}
}
@media(prefers-reduced-motion:reduce){
    html[data-vmag-mode="desktop"] body.vmag-front-page .mission-panel,
    html[data-vmag-mode="desktop"] body.vmag-front-page .rewards {transition:none!important;}
    html[data-vmag-mode="desktop"] body.vmag-front-page .mission-panel::before,
    html[data-vmag-mode="desktop"] body.vmag-front-page .rewards::before {animation:none!important;}
}

/* Smaller laptop and tablet space: header and controls should not overlap. */
@media(min-width:601px) and (max-width:1000px){
    html[data-vmag-mode="desktop"] #vmag-search {top:104px;right:18px;left:auto;width:min(315px,calc(100vw - 36px));}
    html[data-vmag-mode="desktop"] .fullscreen {top:157px;right:18px;}
    html[data-vmag-mode="desktop"] .operators {width:258px;height:74px;right:13px;bottom:32px;}
    html[data-vmag-mode="desktop"] .operators .briefing {font-size:15px;padding:17px 15px 0;}
    html[data-vmag-mode="desktop"] .operators .briefing::before {left:16px;top:46px;}
    html[data-vmag-mode="desktop"] .operators .briefing::after {left:30px;top:41px;font-size:8px;}
    html[data-vmag-mode="desktop"] .operators .operator-list {right:11px;top:19px;}
}
@media(min-width:601px) and (max-height:740px){
    html[data-vmag-mode="desktop"] .operators {bottom:26px;}
    html[data-vmag-mode="desktop"] #vmag-faculty .fc-name {font-size:12.8px;}
}
/* Non-invasive enhancement to the existing mobile dossier. Responsive layout
   rebuild remains a separate task and is intentionally not bundled here. */
html[data-vmag-mode="mobile"] .mep-m-faculty-profile-photo {
    width:min(100%,370px);max-height:48dvh;
    margin:18px auto 20px;
    overflow:hidden;
    border:1px solid rgba(85,181,199,.52);
    background:linear-gradient(130deg,#051923,#102b36);
    box-shadow:0 11px 33px rgba(0,0,0,.28);
}
html[data-vmag-mode="mobile"] .mep-m-faculty-profile-photo img {
    display:block;width:100%;height:auto;max-height:48dvh;object-fit:contain;
}
@media(prefers-reduced-motion:reduce){
    html[data-vmag-mode="desktop"] .operators *,
    html[data-vmag-mode="desktop"] #vmag-faculty .fc-portrait img {transition:none!important;}
}
