.normix-materiale-app {
  --nm-green: #52b348;
  --nm-yellow: #ffc400;
  --nm-bg: #060814;
  --nm-text: #111111;
  position: relative;
  min-height: 88vh;
  color: #fff;
  background: #ffffff;
  overflow-x: hidden;
  overflow-y: visible;
  width: 100%;
  max-width: 100%;
  font-family: "Arial", sans-serif;
}

.normix-materiale-app.is-locked {
  min-height: 100vh;
  background: var(--nm-bg);
}

.normix-materiale-app.is-unlocked {
  min-height: 100vh;
  background: #ffffff;
}

/* Elementor canvas: remove default gap around shortcode (both screens) */
html:has(.normix-materiale-app),
body:has(.normix-materiale-app),
body.elementor-template-canvas:has(.normix-materiale-app) {
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden !important;
  max-width: 100% !important;
  width: 100% !important;
}

.normix-materiale-app,
.normix-materiale-app *,
.normix-materiale-app *::before,
.normix-materiale-app *::after {
  box-sizing: border-box;
}

.elementor-element:has(.normix-materiale-app),
.e-con:has(.normix-materiale-app),
.e-con:has(> .e-con-inner > .elementor-widget-shortcode .normix-materiale-app),
.e-con:has(> .elementor-widget-shortcode .normix-materiale-app),
.elementor-widget-shortcode:has(.normix-materiale-app) {
  --padding-block-start: 0px !important;
  --padding-block-end: 0px !important;
  --padding-inline-start: 0px !important;
  --padding-inline-end: 0px !important;
  --container-default-padding-block-start: 0px !important;
  --container-default-padding-block-end: 0px !important;
  --container-default-padding-inline-start: 0px !important;
  --container-default-padding-inline-end: 0px !important;
  margin: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}

.elementor-widget-shortcode:has(.normix-materiale-app) .elementor-widget-container {
  margin: 0 !important;
  padding: 0 !important;
}

.hidden {
  display: none !important;
}

.normix-bg-layer {
  position: absolute;
  inset: 0;
  background-color: #000;
  background-image: url("../images/hero-background.png");
  background-position: center center;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 1;
  z-index: 1;
}

.normix-materiale-app.is-locked .normix-bg-layer {
  background-color: var(--nm-bg);
  background-size: cover;
  background-position: center center;
}

.normix-materiale-app.is-unlocked .normix-bg-layer {
  background: #ffffff;
  opacity: 1;
}

.normix-materiale-app.is-unlocked .normix-bg-layer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 126px;
  background: #010206;
}

.normix-bottom-wave {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 100%;
  height: auto;
  z-index: 1;
  pointer-events: none;
  object-fit: cover;
}

.normix-materiale-app.is-unlocked .normix-bottom-wave {
  display: block;
}

.normix-top-logos,
.normix-content,
.normix-footer,
.normix-footer-note {
  position: relative;
  z-index: 2;
}

.normix-top-logos {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 20px;
  padding: 28px 24px 0;
}

.normix-materiale-app.is-unlocked .normix-top-logos {
  height: 126px;
  padding: 0 24px;
  align-items: center;
  justify-content: flex-end;
}

.normix-top-logos .logo-right {
  width: auto;
  max-height: 48px;
  max-width: min(240px, 27vw);
  height: auto;
}

.normix-materiale-app.is-unlocked .normix-top-logos .logo-right {
  max-height: 38px;
  max-width: min(190px, 24vw);
}

.normix-content {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 78px 24px 80px;
  overflow-x: hidden;
}

.normix-screen-materials,
.normix-segments,
.normix-material-list,
.normix-scientific-section {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.normix-screen-lock {
  max-width: 390px;
  margin-left: 0;
  margin-top: 22px;
}

.normix-screen-lock h1 {
  max-width: 520px;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.07;
  margin: 0 0 38px;
}

.normix-screen-lock h1 sup,
.normix-screen-materials h2 sup {
  font-size: 0.5em;
  line-height: 0;
  vertical-align: super;
  font-weight: 700;
}

.normix-unlock-form input[type="password"] {
  width: 353px;
  max-width: 100%;
  height: 58px;
  display: block;
  margin: 0;
  border: 2px solid #ffffff;
  border-radius: 30px;
  padding: 0 18px;
  font-size: 20px;
  font-weight: 700;
  color: #31622c;
  background: #50af47;
}

.normix-unlock-form input::placeholder {
  color: #31622c;
  opacity: 1;
}

.normix-consent {
  margin-top: 28px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.4;
  position: relative;
}

.normix-consent span {
  display: block;
  width: 100%;
  max-width: 500px;
  position: relative;
  padding-left: 24px;
}

.normix-consent input {
  display: none !important;
}

.normix-materiale-app.is-locked input[type="checkbox"] {
  display: none !important;
}

.normix-consent span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 14px;
  height: 14px;
  border: 1px solid #ffffff;
  background: transparent;
  border-radius: 2px;
}

.normix-consent input:checked + span::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 4px;
  width: 4px;
  height: 8px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.normix-unlock-form button {
  margin-top: 28px;
  border: none;
  border-radius: 999px;
  width: 100%;
  max-width: 220px;
  height: 60px;
  max-height: 60px;
  background: #ffc50c;
  color: #000;
  padding: 0 26px;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
}

.normix-error {
  min-height: 22px;
  margin-top: 12px;
  color: #ff8a8a;
  font-weight: 700;
}

.normix-screen-materials {
  color: var(--nm-text);
  background: transparent;
}

.normix-screen-materials h2 {
  margin: 10px 0 36px;
  text-align: center;
  color: var(--nm-green);
  font-size: 40px;
  font-weight: 700;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.1;
}

.normix-materiale-app--long-title .normix-screen-lock h1,
.normix-materiale-app--long-title .normix-screen-materials h2,
.normix-materiale-app--stiintifice .normix-screen-lock h1,
.normix-materiale-app--stiintifice .normix-screen-materials h2 {
  max-width: 760px;
  line-height: 1.1;
  margin-left: auto;
  margin-right: auto;
}

.normix-material-list--general + .normix-scientific-section {
  margin-top: 56px;
}

.normix-scientific-section {
  margin-top: 0;
}

.normix-scientific-title {
  margin: 10px 0 36px;
  text-align: center;
  color: var(--nm-green);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.15;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.normix-segments {
  max-width: 980px;
  margin: 0 auto;
}

.normix-segment + .normix-segment {
  margin-top: 42px;
}

.normix-segment-empty {
  margin: 0;
  padding: 8px 0 4px;
  color: #666;
  font-size: 1rem;
  font-style: italic;
}

.normix-material-list {
  max-width: 980px;
  margin: 0 auto;
}

.normix-material-item {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  column-gap: 14px;
  padding: 14px 0;
  border-bottom: 2px solid #ffc50c;
}

.normix-material-item h3,
.normix-material-item .normix-material-title {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 700;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

.normix-segment-title {
  margin: 0 0 18px;
  color: var(--nm-green);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

.material-icon {
  width: 24px;
  height: 24px;
  position: relative;
}

.material-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.material-icon--pdf::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M7 2h7l5 5v13a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2Z' fill='%23111111'/%3E%3Cpath d='M14 2v5h5' fill='%23333333'/%3E%3Cpath d='M8 17h8M8 13h8' stroke='white' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
}

.material-icon--image::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Crect x='3' y='4' width='18' height='16' rx='3' fill='%23111111'/%3E%3Ccircle cx='9' cy='10' r='2' fill='white'/%3E%3Cpath d='m7 17 3-3 2 2 3-3 2 4H7Z' fill='white'/%3E%3C/svg%3E");
}

.normix-materiale-app .preview-btn {
  border: none !important;
  width: 100%;
  max-width: 170px;
  height: 40px;
  max-height: 40px;
  background: #ffc50c !important;
  color: #000 !important;
  border-radius: 30px;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1;
  padding: 0 14px !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: none !important;
  text-transform: none !important;
}

.preview-btn-eye {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.normix-empty {
  text-align: center;
  padding: 20px;
}

.normix-footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 52px 16px 18px;
}

.normix-footer-logo {
  display: none;
}

.normix-footer-note {
  margin: 0;
  text-align: center;
  font-size: 0.95rem;
  color: #fff;
}

.normix-materiale-app.is-unlocked .normix-footer-note {
  color: #222;
}

@media (min-width: 901px) {
  .normix-materiale-app.is-unlocked .normix-top-logos .logo-right {
    display: block;
  }

  .normix-materiale-app.is-unlocked .normix-footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 50px;
    padding: 0 24px;
    text-align: center;
  }
}

.normix-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.normix-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

.normix-modal-content {
  position: relative;
  max-width: min(1020px, 92vw);
  max-height: 86vh;
  width: 100%;
  margin: 5vh auto;
  background: #fff;
  border-radius: 14px;
  padding: 22px;
  overflow: auto;
  overflow-x: hidden;
}

.normix-modal .normix-close-modal {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  z-index: 3 !important;
  width: 32px !important;
  height: 32px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #111111 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  font: inherit !important;
  line-height: 1 !important;
  text-transform: none !important;
  transition: opacity 0.15s ease !important;
}

.normix-modal .normix-close-modal:hover {
  opacity: 0.55 !important;
  background: transparent !important;
  color: #111111 !important;
}

.normix-modal .normix-close-modal:focus-visible {
  outline: 2px solid #52b348 !important;
  outline-offset: 2px !important;
}

.normix-modal .normix-close-modal-icon {
  display: block !important;
  width: 20px !important;
  height: 20px !important;
  pointer-events: none !important;
}

.normix-modal-title {
  color: #000;
  margin: 0 0 16px;
  padding-right: 44px;
}

.normix-modal-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.normix-modal-body iframe {
  width: 100%;
  max-width: 100%;
  height: 72vh;
  border: none;
  display: block;
}

.normix-pdf-canvas-host,
.normix-pdf-canvas-view {
  width: 100%;
  max-width: 100%;
}

.normix-pdf-canvas-view {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #525659;
}

.normix-pdf-page {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.normix-pdf-loading {
  margin: 0;
  padding: 24px 16px;
  text-align: center;
  color: #333;
}

body.normix-modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  left: 0;
  right: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 900px) {
  .normix-bg-layer {
    background-image: url("../images/hero-background-mobile.png");
    background-size: cover;
    background-position: center bottom;
  }

  .normix-top-logos {
    padding-top: 16px;
    justify-content: center;
  }

  .normix-materiale-app.is-unlocked .normix-bg-layer::before {
    height: 126px;
    background: #010206;
  }

  .normix-materiale-app.is-unlocked .normix-top-logos {
    height: 126px;
    padding: 0 14px;
    align-items: center;
    justify-content: center;
  }

  .normix-top-logos .logo-right {
    max-width: min(150px, 37vw);
  }

  .normix-materiale-app.is-unlocked .normix-top-logos .logo-right {
    display: block;
  }

  .normix-materiale-app.is-locked .normix-top-logos {
    justify-content: center;
    padding: 18px 16px 0;
  }

  .normix-materiale-app.is-locked .normix-top-logos .logo-right {
    display: block;
    max-width: min(180px, 52vw);
  }

  .normix-content {
    padding-top: 40px;
  }

  .normix-screen-lock {
    max-width: 100%;
    margin-top: 20px;
  }

  .normix-materiale-app.is-locked .normix-content {
    max-width: 420px;
    padding: 34px 16px 220px;
    text-align: center;
  }

  .normix-materiale-app.is-locked .normix-screen-lock h1 {
    max-width: 320px;
    margin: 0 auto 26px;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.08;
  }

  .normix-materiale-app.is-locked .normix-unlock-form {
    text-align: left;
  }

  .normix-materiale-app.is-locked .normix-unlock-form input[type="password"] {
    width: 100%;
    max-width: 350px;
    font-size: 20px;
    margin: 0 auto;
  }

  .normix-materiale-app.is-locked .normix-consent {
    margin-top: 22px;
    gap: 8px;
    font-size: 11px;
  }

  .normix-materiale-app.is-locked .normix-consent span {
    max-width: 100%;
  }

  .normix-materiale-app.is-locked .normix-unlock-form button {
    margin: 28px auto 0;
    display: block;
    max-width: 220px;
    font-size: 20px;
  }

  .normix-footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 16px;
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .normix-footer-logo {
    display: block;
    width: min(180px, 58vw);
    max-width: 180px;
    height: auto;
    filter: brightness(0);
  }

  .normix-materiale-app.is-locked .normix-footer-logo {
    filter: brightness(0) invert(1);
  }

  .normix-materiale-app.is-unlocked .normix-footer-logo-default {
    display: none;
  }

  .normix-materiale-app.is-unlocked .normix-footer-logo,
  .normix-materiale-app.is-unlocked .normix-footer-logo-mobile-2 {
    display: none !important;
  }

  .normix-footer-logo-mobile-2 {
    display: none;
  }

  .normix-materiale-app.is-locked .normix-footer-logo-mobile-2 {
    display: none;
  }

  .normix-footer-note {
    color: #ffffff;
    font-size: 10px;
    line-height: 1.35;
  }

  .normix-materiale-app.is-unlocked .normix-footer-note {
    color: #111111;
    font-size: 10px;
  }

  .normix-materiale-app.is-unlocked .normix-content {
    padding: 24px 16px 72px;
  }

  .normix-material-item {
    grid-template-columns: 24px 1fr;
    grid-template-rows: auto auto;
    align-items: start;
    column-gap: 10px;
    row-gap: 12px;
    padding: 16px 0;
  }

  .normix-material-item .material-icon {
    margin-top: 2px;
  }

  .normix-material-item .normix-material-title {
    font-size: 1.05rem;
    line-height: 1.35;
    word-break: break-word;
  }

  .normix-material-item .preview-btn {
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
    height: 44px;
    max-height: 44px;
    font-size: 15px !important;
  }

  .preview-btn-text {
    white-space: nowrap;
  }

  .normix-segment + .normix-segment {
    margin-top: 32px;
  }

  .normix-segment-title {
    font-size: 1.1rem;
    line-height: 1.35;
    margin-bottom: 14px;
  }

  .normix-modal-content {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    margin: 0;
    border-radius: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    overflow-x: hidden;
  }

  .normix-modal-title {
    font-size: 1rem;
    line-height: 1.35;
    margin: 0;
    padding: max(12px, env(safe-area-inset-top)) 44px 12px 12px;
    flex-shrink: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .normix-modal-body {
    flex: 1;
    min-height: 0;
    width: 100%;
    max-width: 100%;
    padding: 0;
    overflow: hidden;
    overflow-x: hidden;
  }

  .normix-modal--mobile-pdf .normix-modal-body {
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .normix-modal-body iframe {
    width: 100%;
    max-width: 100%;
    height: 100%;
    min-height: 0;
    border: none;
    display: block;
  }

  .normix-modal-body img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
  }

  .normix-modal .normix-close-modal {
    top: max(10px, env(safe-area-inset-top)) !important;
    right: max(10px, env(safe-area-inset-right)) !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    position: absolute !important;
  }

  .normix-material-item h3,
  .normix-material-item .normix-material-title {
    font-size: 1.05rem;
  }

  .normix-segment-title {
    font-size: 1.1rem;
  }

  .normix-materiale-app .preview-btn {
    max-width: none;
    height: 44px;
    max-height: 44px;
    font-size: 15px !important;
    padding: 0 16px !important;
  }

  .normix-scientific-title,
  .normix-screen-materials h2 {
    max-width: 100%;
    padding: 0 4px;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .normix-materiale-app--stiintifice .normix-screen-lock h1,
  .normix-materiale-app--stiintifice .normix-screen-materials h2 {
    max-width: 320px;
    font-size: 30px;
  }
}

@media (max-width: 560px) {
  .normix-content {
    padding: 24px 16px 52px;
  }

  .normix-materiale-app.is-locked .normix-content {
    padding: 30px 16px 220px;
  }

  .normix-materiale-app.is-locked .normix-screen-lock h1 {
    font-size: 30px;
  }

  .normix-screen-materials h2 {
    margin-top: 20px;
    font-size: 30px;
    max-width: 320px;
  }

  .normix-scientific-title {
    font-size: 22px;
    max-width: 300px;
  }

  .normix-materiale-app--stiintifice .normix-screen-materials h2 {
    max-width: 300px;
    font-size: 26px;
  }

  .normix-segment-title {
    font-size: 1rem;
  }

  .normix-material-item {
    padding: 14px 0;
  }

  .normix-material-item h3,
  .normix-material-item .normix-material-title {
    font-size: 0.98rem;
  }

  .normix-materiale-app .preview-btn {
    height: 42px;
    max-height: 42px;
    font-size: 14px !important;
  }

  .normix-footer-note {
    font-size: 10px;
  }
}
