/* ============================================
   BASE.CSS — Stili fondamentali e componenti comuni

   BREAKPOINT SCALE CANONICA (allineata a omnigate.css):
     1024px  tablet / griglie multi-col -> 2 col
      768px  mobile: nav -> hamburger, griglie -> 1 col
      480px  small phone: padding ridotti, popover full-width
      360px  floor anti-overflow (guard per 320px)
   ============================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body, 'Inter', sans-serif);
  color: #1a1a2e;
  background: #ffffff;
  line-height: 1.6;
}

iframe.dest-map {
    border: 1px solid #9E9E9E !important;
    /* box-shadow: 0 0 4px black; */
    border-radius: 7px;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ============================================
   NAVBAR
   ============================================ */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(10, 10, 30, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  z-index: 900;
  color: white;
}

.navbar__container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.navbar__logo {
  font-family: var(--font-heading, 'Playfair Display', serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  text-decoration: none;
  flex-shrink: 0;
}

.navbar__logo-img {
  height: 36px;
  width: auto;
}

.navbar__links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex: 1;
}

.navbar__link {
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.navbar__link:hover {
  color: white;
  text-decoration: none;
}

.navbar__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.navbar__btn {
  padding: 0.45rem 1.1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.navbar__btn--primary {
  background: var(--color-primary);
  color: white;
  border: 1px solid var(--color-primary);
}

.navbar__btn--primary:hover {
  background: var(--color-primary-dark);
  text-decoration: none;
}

.navbar__btn--outline {
  background: transparent;
  color: white;
  border: 1px solid rgba(255,255,255,0.4);
}

.navbar__btn--outline:hover {
  border-color: white;
  text-decoration: none;
}

.btn--danger {
  background: #dc2626;
  color:white
}

.btn--danger:hover {
  background: #b91c1c;
}

.navbar__user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.navbar__user-link {
  color: rgba(255,255,255,0.8);
  font-size: 0.875rem;
}

.navbar__hamburger {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  min-width: 44px;  /* touch target (WCAG 2.5.8) */
  min-height: 44px;
}

.navbar__hamburger span {
  width: 24px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s;
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
  padding-top: 60px;
  min-height: calc(100vh - 60px);
}

/* ============================================
   MESSAGES / TOAST
   ============================================ */

.messages {
  position: fixed;
  left: 1.25rem;
  bottom: 1.25rem;
  z-index: 9999;

  display: flex;
  flex-direction: column;
  gap: 0.65rem;

  width: min(480px, calc(100vw - 2rem));
  padding: 0;
  background: transparent;

  pointer-events: none;
}

.message {
  padding: 1rem 1.2rem;
  border-radius: 12px;

  font-size: 1rem;
  font-weight: 500;
  line-height: 1.45;

  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.16);
  border: 1px solid rgba(15, 23, 42, 0.08);

  pointer-events: auto;
  animation: message-slide-in 0.25s ease-out;
}

.message--success {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

.message--error {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.message--warning {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}

.message--info {
  background: #eff6ff;
  color: #1e40af;
  border-color: #bfdbfe;
}

@keyframes message-slide-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   SECTION COMUNE
   ============================================ */

.section {
  padding: 5rem 0;
}

.section__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section__title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 2.5rem;
  color: #1a1a2e;
}

.section--stories {
  background: #f8f9fa;
}

.section--destinations {
  background: white;
}

/* ============================================
   GRIDS
   ============================================ */

.stories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.destinations-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.destinations-grid--large {
  grid-template-columns: repeat(3, 1fr);
}

/* ============================================
   STORY CARD
   ============================================ */

.story-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.story-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.story-card__image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.story-card__image--placeholder {
  height: 200px;
  background: linear-gradient(135deg, #e0e0e0, #f0f0f0);
}

.story-card__body {
  padding: 1.25rem;
}

.story-card__badge {
  display: inline-block;
  background: var(--color-primary);
  color: white;
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: 10px;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.story-card__category {
  display: inline-block;
  color: var(--color-accent);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.story-card__title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.story-card__title a {
  color: #1a1a2e;
}

.story-card__title a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.story-card__excerpt {
  font-size: 0.875rem;
  color: #666;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.story-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #888;
}

/* ============================================
   DESTINATION CARD
   ============================================ */

.destination-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4/3;
  display: block;
  cursor: pointer;
  text-decoration: none;
}

.destination-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.destination-card:hover .destination-card__image {
  transform: scale(1.05);
}

.destination-card__image--placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.destination-card__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color: white;
}

.destination-card__badge {
  display: inline-block;
  background: var(--color-primary);
  color: white;
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: 10px;
  margin-bottom: 0.5rem;
}

.destination-card__name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.destination-card__desc {
  font-size: 0.8rem;
  opacity: 0.8;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.destination-card__meta {
  font-size: 0.75rem;
  opacity: 0.65;
  font-style: italic;
  margin-bottom: 0.5rem;
  display: block;
}

/* Filters bar */
.filters-bar {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  padding: 0.75rem 1.25rem;
  background: white;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.filters-bar__group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filters-bar__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted, #6b7280);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.filters-bar__select {
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 8px;
  padding: 0.45rem 2rem 0.45rem 0.85rem;
  font-size: 0.9rem;
  font-family: var(--font-body);
  background: #f8f9fa url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 0.65rem center;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  min-width: 160px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.filters-bar__select:hover {
  border-color: var(--color-primary);
}

.filters-bar__select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 15%, transparent);
}

.filters-bar__divider {
  width: 1px;
  height: 28px;
  background: rgba(0,0,0,0.1);
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .filters-bar {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  .filters-bar__divider { display: none; }
  .filters-bar__select { min-width: 120px; }
}

/* Filtri a pill (attrazioni) — dropdown custom */
.og-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin: 0 auto 44px;
}

.og-dd { position: relative; }

.og-dd__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text, #1e293b);
  background: #fff;
  border: 1px solid rgba(0,0,0,0.14);
  border-radius: 999px;
  padding: 0.65rem 1.25rem;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.18s, box-shadow 0.18s, color 0.18s, background 0.18s;
}

.og-dd__btn:hover { border-color: var(--color-primary); }

.og-dd__caret {
  width: 12px;
  height: 8px;
  color: #94a3b8;
  transition: transform 0.2s, color 0.18s;
}

.og-dd.is-open .og-dd__btn {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 14%, transparent);
}

.og-dd.is-open .og-dd__caret { transform: rotate(180deg); }

.og-dd.is-active .og-dd__btn {
  border-color: var(--color-primary);
  color: var(--color-primary);
  font-weight: 600;
  background: color-mix(in srgb, var(--color-primary) 8%, #fff);
}

.og-dd.is-active .og-dd__caret { color: var(--color-primary); }

.og-dd__panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  min-width: 100%;
  width: max-content;
  max-width: 280px;
  max-height: 320px;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(15,23,42,0.14);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.16s, transform 0.16s;
}

.og-dd.is-open .og-dd__panel {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.og-dd__opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0.85rem;
  font-size: 0.9rem;
  color: var(--color-text, #334155);
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
}

.og-dd__opt:hover {
  background: color-mix(in srgb, var(--color-primary) 10%, #fff);
  color: var(--color-primary);
}

.og-dd__opt.is-selected {
  color: var(--color-primary);
  font-weight: 600;
}

.og-dd__opt.is-selected::after {
  content: "\2713";
  font-size: 0.85rem;
}

@media (max-width: 480px) {
  .og-filters { gap: 0.5rem; }
  .og-dd { flex: 1 1 auto; }
  .og-dd__btn { width: 100%; justify-content: space-between; padding: 0.6rem 1rem; font-size: 0.9rem; }
  .og-dd__panel { width: 100%; min-width: 0; max-width: none; }
}

/* ============================================
   AUTH CARD (login / register / verify / profile)
   Sostituisce i wrapper inline max-width:420px dei template accounts/
   ============================================ */

.auth-card {
  max-width: 420px;
  margin: clamp(2rem, 8vw, 4rem) auto;
  padding-inline: 1.5rem;
}
.auth-card--wide { max-width: 600px; }
.auth-card__title {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 5vw, 1.75rem);
  margin-bottom: 2rem;
  text-align: center;
}
.auth-card__box {
  background: #fff;
  border-radius: 16px;
  padding: clamp(1.25rem, 5vw, 2rem);
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.auth-card__submit { width: 100%; margin-top: 0.5rem; justify-content: center; text-align: center; }
.auth-card__alt { text-align: center; margin-top: 1.25rem; font-size: 0.875rem; color: #666; }
.auth-card__intro { margin-bottom: 1.5rem; font-size: 0.9375rem; color: #555; }
.auth-card__forgot { text-align: right; margin-top: 0.5rem; margin-bottom: 1rem; font-size: 0.875rem; }

/* ============================================
   FOOTER
   ============================================ */

.footer {
  background: #0a0a1e;
  color: rgba(255,255,255,0.6);
  padding: 2rem;
  text-align: center;
  font-size: 0.875rem;
}

.footer__copy {
  margin-bottom: 0.25rem;
}

.footer__logo {
  display: block;
  max-width: 180px;
  height: auto;
  margin: 0 auto 0.75rem;
}

.footer__brand {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.2s;
}

.btn--primary {
  background: var(--color-primary);
  color: white;
}

.btn--primary:hover {
  background: var(--color-primary-dark);
  color: white;
  text-decoration: none;
}

.btn--outline {
  background: transparent;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
}

.btn--outline:hover {
  background: var(--color-primary);
  color: white;
  text-decoration: none;
}

.btn--light {
  border-color: rgba(255,255,255,0.6);
  color: white;
}

.btn--light:hover {
  border-color: white;
  background: rgba(255,255,255,0.1);
}

.btn--large {
  padding: 1rem 2.5rem;
  font-size: 1.05rem;
}

/* ============================================
   FORM
   ============================================ */

.form__input,
.form__textarea,
.form__select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  color: #1a1a2e;
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form__input:focus,
.form__textarea:focus,
.form__select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form__textarea {
  resize: vertical;
  min-height: 100px;
}

.form__label {
  display: block;
  font-weight: 500;
  font-size: 0.875rem;
  color: #374151;
  margin-bottom: 0.4rem;
}

.form__group {
  margin-bottom: 1.25rem;
}

.form__group--checkbox {
  display: flex;
  align-items: center;
  margin-top: 1rem;
}

.form__checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  cursor: pointer;
}

.form__checkbox {
  width: 18px;
  height: 18px;
}
/* ============================================
   BREADCRUMB
   ============================================ */

.breadcrumb {
  padding: 1rem 1.5rem;
  font-size: 0.85rem;
  color: #666;
  max-width: 1200px;
  margin: 0 auto;
  overflow-wrap: break-word;
}

.breadcrumb__link {
  color: var(--color-primary);
}

.breadcrumb__sep {
  margin: 0 0.5rem;
}

.breadcrumb__current {
  color: #1a1a2e;
  font-weight: 500;
}

/* ============================================
   EMPTY STATE
   ============================================ */

.empty-state {
  padding: 3rem;
  text-align: center;
  color: #888;
  font-style: italic;
  grid-column: 1 / -1;
}

/* ============================================
   PAGE HEADER
   ============================================ */

.page-header {
  background: linear-gradient(135deg, #1a1a3e 0%, #2d2d6e 100%);
  color: white;
  padding: 4rem 0 3rem;
}

.page-header__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.page-header__title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.page-header__subtitle {
  font-size: 1rem;
  opacity: 0.8;
}

/* ============================================
   TENANTS GRID (main portal)
   ============================================ */

.tenants-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.tenant-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: #1a1a2e;
  text-decoration: none;
}

.tenant-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  text-decoration: none;
}

.tenant-card__logo {
  height: 50px;
  margin: 0 auto 1rem;
  object-fit: contain;
}

.tenant-card__name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.tenant-card__tagline {
  font-size: 0.875rem;
  color: #666;
  line-height: 1.5;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1023px) {
  .stories-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .destinations-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tenants-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .navbar__links {
    display: none;
  }

  .navbar__hamburger {
    display: flex;
  }

  .navbar__links.is-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(10,10,30,0.98);
    padding: 1.5rem;
    gap: 1rem;
  }

  .stories-grid {
    grid-template-columns: 1fr;
  }

  .destinations-grid {
    grid-template-columns: 1fr;
  }

  .tenants-grid {
    grid-template-columns: 1fr;
  }

  .section__title {
    font-size: 1.6rem;
  }
}

/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   RATE LIMIT MODAL
   ============================================ */

.rl-modal-backdrop,
.ui-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 30, 0.6);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.rl-modal-backdrop.is-visible, 
.ui-modal-backdrop.is-visible {
  display: flex;
}

.rl-modal,
.ui-modal {
    max-width: 520px;
    width: 100%;

    padding: 2rem;

    background: color-mix(
        in srgb,
        var(--color-primary, #2563eb) 6%,
        #ffffff
    );

    border: 1px solid color-mix(
        in srgb,
        var(--color-primary, #2563eb) 18%,
        transparent
    );

    border-radius: 16px;

    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);

    position: relative;
    text-align: center;
}

.rl-modal__icon,
.ui-modal__icon {
    display: block;

    margin-bottom: 1rem;

    font-size: 3rem;
    line-height: 1;
}

.rl-modal__title,
.ui-modal__title {
    margin: 0 0 1rem;

    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.3;

    color: #111827;
}

.rl-modal__text,
.ui-modal__text {
    max-width: 420px;
    margin: 0 auto 2rem;

    color: #666;
    font-size: 1rem;
    line-height: 1.7;
}

.ui-modal__actions,
.rl-modal__actions {
    display: flex;
    justify-content: center;
    gap: 1rem;

    margin-top: 2rem;
}

.ui-modal__btn,
.rl-modal__btn {
    min-width: 140px;

    padding: 0.85rem 1.4rem;

    border-radius: 999px;

    font-size: 0.92rem;
    font-weight: 600;

    border: none;
    cursor: pointer;

    transition:
        transform .15s ease,
        box-shadow .15s ease,
        background .15s ease;
}

.ui-modal__btn--primary,
.rl-modal__btn--primary {
    background: var(--color-primary, #2563eb);
    color: white;

    box-shadow:
        0 6px 16px rgba(37,99,235,.25);
}

.ui-modal__btn--primary:hover,
.rl-modal__btn--primary:hover {
    transform: translateY(-1px);

    box-shadow:
        0 10px 24px rgba(37,99,235,.35);
}

.ui-modal__btn--secondary,
.rl-modal__btn--secondary {
    background: white;

    border: 1px solid rgba(37,99,235,.2);

    color: var(--color-primary, #2563eb);
}

.ui-modal__btn--secondary:hover,
.rl-modal__btn--secondary:hover {
    background: rgba(37,99,235,.05);
}

.rl-modal__btn--close, 
.ui-modal__btn--close {
  background: transparent;
  border: 1.5px solid #ddd;
  color: #888;
  font-weight: 400;
}

.rl-modal__close, 
.ui-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: #aaa;
  line-height: 1;
  padding: 0.25rem;
}

.ui-modal__btn--danger,
.rl-modal__btn--danger {
    background: #ef4444;
    color: white;

    box-shadow:
        0 6px 16px rgba(239,68,68,.25);
}

.ui-modal__btn--danger:hover,
.rl-modal__btn--danger:hover {
    background: #dc2626;

    transform: translateY(-1px);

    box-shadow:
        0 10px 24px rgba(239,68,68,.35);
}

/* pagine di errore */

.error-page {
    background: #f8f9fa;
}

.error-main {
    min-height: calc(100vh - 60px - 120px);
}

.error-section {
    display: flex;
    align-items: center;
}

.error-card {
    max-width: 680px;
    margin: 0 auto;
    padding: 3rem;
    background: color-mix(in srgb, var(--color-primary, #2563eb) 6%, #ffffff);
    border: 1px solid color-mix(in srgb, var(--color-primary, #2563eb) 18%, transparent);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    text-align: center;
}

.error-card__code {
    display: block;
    margin-bottom: 1rem;
    color: var(--color-primary, #2563eb);
    font-size: clamp(4rem, 10vw, 5rem);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.05em;
}

.error-card__title {
    margin-bottom: 1rem;
}

.error-card__text {
    max-width: 520px;
    margin: 0 auto 2rem;
    color: #666;
    font-size: 1rem;
    line-height: 1.7;
}

.error-card__actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.error-card__actions .btn {
    min-width: 170px;
}

@media (max-width: 767px) {
    .error-card {
        padding: 2rem 1.25rem;
    }

    .error-card__actions {
        flex-direction: column;
    }

    .error-card__actions .btn {
        width: 100%;
    }
}

.error-card__actions .btn--outline {
    background: #ffffff;
    border: 1px solid var(--color-primary, #2563eb);
    color: var(--color-primary, #2563eb);
}

.error-card__actions .btn--outline:hover {
    background: var(--color-primary, #2563eb);
    border-color: var(--color-primary, #2563eb);
    color: #ffffff;
    text-decoration: none;
}

.error-card {
    position: relative;
}

.secret-mask-trigger {
    position: absolute;
    right: 12px;
    bottom: 12px;

    width: 2px;
    height: 2px;

    border: 0;
    background: transparent;

    cursor: pointer;
    z-index: 20;
}

.secret-mask {
    position: fixed;
    right: 32px;
    bottom: 32px;
    z-index: 9999;

    display: flex;
    align-items: flex-end;
    gap: 14px;

    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(0.96);
    pointer-events: none;

    transition:
        opacity 180ms ease,
        visibility 180ms ease,
        transform 180ms ease;
}

.secret-mask.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.secret-mask__image {
    width: 150px;
    height: auto;
    display: block;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.45));
}

.secret-mask__bubble {
    position: relative;
    max-width: 260px;
    padding: 14px 16px;

    background: #fff;
    color: #111;
    border: 2px solid #111;
    border-radius: 14px;

    font-size: 0.95rem;
    line-height: 1.35;
    font-weight: 600;

    box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.25);
}

.secret-mask__bubble::before {
    content: "";
    position: absolute;
    left: -13px;
    bottom: 24px;

    width: 22px;
    height: 22px;

    background: #fff;
    border-left: 2px solid #111;
    border-bottom: 2px solid #111;

    transform: rotate(45deg);
}

@media (max-width: 640px) {
    .secret-mask {
        right: 16px;
        bottom: 16px;
        gap: 10px;
    }

    .secret-mask__image {
        width: 105px;
    }

    .secret-mask__bubble {
        max-width: 190px;
        font-size: 0.82rem;
        padding: 10px 12px;
    }
}
/* pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
}

.pagination__info {
  font-size: 0.95rem;
  color: #666;
}


/* password login */
.password-field {
  position: relative;
}

.password-field input {
  width: 100%;
  padding-right: 2.75rem;
}

.password-field__toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;

  width: 1.5rem;
  height: 1.5rem;
  padding: 0;

  background: transparent;
  border: 0;
  color: #666;
  cursor: pointer;
}

.password-field__toggle:hover {
  color: #222;
}

.password-field__toggle:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 999px;
}

.password-field__icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.password-field__icon--eye-off {
  display: none;
}

.password-field.is-visible .password-field__icon--eye {
  display: none;
}

.password-field.is-visible .password-field__icon--eye-off {
  display: flex;
}

.password-match-message {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  color: #b00020;
}

.password-field.has-error input {
  border-color: #b00020;
}

/* errori pw registrazione */

.form__errors {
  margin-top: 0.4rem;
  color: #b00020;
  font-size: 0.85rem;
}

.form__errors p {
  margin: 0.25rem 0 0;
}

.password-match-message {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  color: #b00020;
}

.password-field.has-error input {
  border-color: #b00020;
}
/* ==========================================================
   Pagine legali (privacy / cookie)
   ========================================================== */

.legal-page {
  padding: 3rem 1.5rem 4rem;
}

.legal-page__inner {
  max-width: 760px;
  margin: 0 auto;
}

.legal-page__inner h1 {
  font-size: 2rem;
  margin: 0 0 0.5rem;
}

.legal-page__inner h2 {
  font-size: 1.2rem;
  margin: 2rem 0 0.5rem;
}

.legal-page__inner p,
.legal-page__inner li {
  line-height: 1.65;
  color: #374151;
}

.legal-page__updated {
  font-size: 0.85rem;
  color: #6b7280;
}

.legal-page__draft {
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: #78350f;
}

/* ==========================================================
   Skip link (accessibilità tastiera)
   ========================================================== */

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 3000;
  background: var(--color-secondary, #273348);
  color: #fff;
  padding: 0.6rem 1.1rem;
  border-radius: 0 0 8px 8px;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.15s;
}

.skip-link:focus {
  top: 0;
  outline: 2px solid #fff;
  outline-offset: -4px;
}

/* Testo solo per screen reader */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Indicatore campo obbligatorio + help (a11y form) */
.form__required { color: #b91c1c; font-weight: 700; }
.form__help { display: block; margin-top: 0.3rem; font-size: 0.8rem; color: #555; }
.form__errors { margin-top: 0.4rem; color: #b00020; font-size: 0.85rem; }
.form__errors p { margin: 0.25rem 0 0; }

/* ==========================================================
   Focus visibile globale (WCAG 2.4.7 / 2.4.11)
   ========================================================== */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--color-secondary, #273348);
  outline-offset: 2px;
}
