:root {
  --bronze: #cd7f32;
  --bronze-hover: #e08a3a;
  --text-light: rgba(255, 255, 255, 0.85);
  --border-light: rgba(255, 255, 255, 0.12);
  --glass-dark: rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  color: white;
}

.index-page {
  overflow: hidden;
}

.base-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #07080d 0%, #111723 55%, #1e2330 100%);
  color: white;
}

.video-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(7, 8, 13, 0.85),
    rgba(17, 23, 35, 0.85),
    rgba(30, 35, 48, 0.85)
  );
  z-index: -1;
}

.logo {
  width: 280px;
  max-width: 80vw;
  margin-bottom: 10px;
  animation: fadeIn 2s ease;
  filter: drop-shadow(0 0 10px rgba(205, 127, 50, 0.4));
}

.navbar {
  background: transparent !important;
}

.custom-navbar {
  background: rgba(8, 10, 18, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
}

.navbar-brand {
  color: white !important;
  font-weight: 700;
  letter-spacing: 1px;
}

.nav-link {
  color: var(--text-light) !important;
  position: relative;
  transition: all 0.3s ease;
}

.nav-link:hover {
  color: var(--bronze) !important;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--bronze);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  color: var(--bronze) !important;
}

.hero {
  min-height: calc(100vh - 70px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 120px 20px 40px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  margin: 0;
  animation: fadeUp 1.2s ease;
}

.hero p {
  font-weight: 300;
  font-size: 1.1rem;
  margin: 8px 0 18px;
  opacity: 0.9;
}

.btn-custom {
  background-color: var(--bronze);
  border: none;
  color: white;
  transition: all 0.3s ease;
}

.btn-custom:hover {
  background-color: var(--bronze-hover);
  color: white;
  box-shadow:
    0 0 10px rgba(205, 127, 50, 0.6),
    0 0 25px rgba(205, 127, 50, 0.4);
  transform: translateY(-2px);
}

.login-hover-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: white;
  padding: 6px 10px;
  border-radius: 30px;
  width: 40px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
}

.login-hover-btn .icon {
  font-size: 18px;
}

.login-hover-btn .text {
  opacity: 0;
  white-space: nowrap;
  transition: opacity 0.3s ease;
}

.login-hover-btn:hover {
  width: 110px;
  background-color: rgba(205, 127, 50, 0.2);
  border-color: var(--bronze);
}

.login-hover-btn:hover .text {
  opacity: 1;
}

.modal-content {
  background: rgba(11, 15, 24, 0.88);
  color: white;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.modal-backdrop.show {
  background: rgba(7, 8, 13, 0.85);
}

.form-control {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: white;
}

.form-control:focus {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--bronze);
  color: white;
  box-shadow: 0 0 0 0.2rem rgba(205, 127, 50, 0.15);
}

.form-control::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.contact-container {
  max-width: 560px;
  margin: 0 auto;
  padding: 150px 20px 60px;
  text-align: center;
}

.contact-container h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.subtitle {
  opacity: 0.75;
  margin-bottom: 30px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact-form input,
.contact-form textarea {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 12px;
  border-radius: 10px;
  color: white;
  transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--bronze);
  box-shadow: 0 0 10px rgba(205, 127, 50, 0.25);
}

.btn-send {
  background: var(--bronze);
  border: none;
  padding: 12px;
  border-radius: 10px;
  color: white;
  transition: all 0.3s ease;
}

.btn-send:hover {
  background: var(--bronze-hover);
  box-shadow: 0 0 15px rgba(205, 127, 50, 0.45);
}

.contact-status {
  min-height: 24px;
  margin-top: 14px;
  color: #9be79b;
  font-size: 0.95rem;
}

.contact-info {
  margin-top: 30px;
  font-size: 0.95rem;
  opacity: 0.78;
}

.contact-info i {
  margin-right: 8px;
}

.footer {
  width: 100%;
  padding: 18px 12px;
  font-size: 0.78rem;
  opacity: 0.68;
}

.footer a {
  color: inherit;
  text-underline-offset: 3px;
}

.footer a:hover {
  color: var(--bronze);
}

.privacy-container {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: 130px 0 64px;
}

.privacy-header {
  margin-bottom: 30px;
}

.privacy-header h1 {
  margin: 6px 0 8px;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
}

.privacy-header p,
.privacy-kicker {
  color: rgba(255, 255, 255, 0.68);
}

.privacy-kicker {
  color: var(--bronze);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.privacy-notice,
.privacy-section {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.privacy-notice {
  margin-bottom: 18px;
  padding: 18px 20px;
  border-left: 4px solid var(--bronze);
  line-height: 1.7;
}

.privacy-section {
  margin-top: 18px;
  padding: clamp(20px, 4vw, 32px);
}

.privacy-section h2 {
  margin: 0 0 16px;
  color: var(--bronze);
  font-size: 1.28rem;
}

.privacy-section p,
.privacy-section li {
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.75;
}

.privacy-section a {
  color: #efad6b;
}

.privacy-table-wrap {
  overflow-x: auto;
}

.privacy-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}

.privacy-table th,
.privacy-table td {
  padding: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
  vertical-align: top;
}

.privacy-acceptance-modal {
  text-align: center;
}

.privacy-modal-icon {
  display: grid;
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  place-items: center;
  border-radius: 50%;
  background: rgba(205, 127, 50, 0.16);
  color: var(--bronze);
  font-size: 1.5rem;
}

.privacy-acceptance-copy {
  margin: 0 auto 6px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.65;
}

.privacy-open-link {
  color: #efad6b;
  text-underline-offset: 3px;
}

.privacy-check-row {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
}

.privacy-info-modal {
  max-height: calc(100vh - 32px);
}

.privacy-modal-body {
  background: #10151f;
}

.privacy-modal-body .privacy-container {
  width: 100%;
  padding: 0;
}

.privacy-loading {
  padding: 30px;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
}

.privacy-table th {
  color: white;
  font-size: 0.88rem;
}

.privacy-table td {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.55;
}

/* Privacy: variante chiara per pagina, modal informativa e prima accettazione. */
body.theme-light .privacy-info-modal,
body.theme-light .privacy-acceptance-modal {
  background: rgba(255, 255, 255, 0.98);
  color: #171717;
  border-color: rgba(0, 0, 0, 0.1);
}

body.theme-light .privacy-info-modal .modal-header,
body.theme-light .privacy-acceptance-modal .modal-header,
body.theme-light .privacy-info-modal .modal-footer,
body.theme-light .privacy-acceptance-modal .modal-footer {
  border-color: rgba(0, 0, 0, 0.1);
}

body.theme-light .privacy-info-modal .btn-close,
body.theme-light .privacy-acceptance-modal .btn-close {
  filter: none !important;
}

body.theme-light .privacy-modal-body {
  background: #f6f3ed;
}

body.theme-light .privacy-header h1,
body.theme-light .privacy-notice,
body.theme-light .privacy-check-row,
body.theme-light .privacy-table th {
  color: #171717;
}

body.theme-light .privacy-header p,
body.theme-light .privacy-acceptance-copy,
body.theme-light .privacy-loading {
  color: rgba(23, 23, 23, 0.72);
}

body.theme-light .privacy-notice,
body.theme-light .privacy-section,
body.theme-light .privacy-check-row {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(0, 0, 0, 0.1);
}

body.theme-light .privacy-section p,
body.theme-light .privacy-section li,
body.theme-light .privacy-table td {
  color: rgba(23, 23, 23, 0.82);
}

body.theme-light .privacy-table th,
body.theme-light .privacy-table td {
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

body.theme-light .privacy-open-link,
body.theme-light .privacy-section a {
  color: #8a571f;
}

.component-error {
  padding: 12px 16px;
  color: #ffb3b3;
  font-size: 0.9rem;
  text-align: center;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shake {
  0% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
  100% { transform: translateX(0); }
}

.shake {
  animation: shake 0.4s;
}

@media (max-width: 768px) {
  .hero {
    padding-top: 110px;
  }

  .contact-container {
    padding-top: 130px;
  }

  .login-hover-btn {
    width: auto;
    border-radius: 20px;
    padding-inline: 14px;
  }

  .login-hover-btn .text {
    opacity: 1;
  }
}

.forgot-password-link {
  color: var(--bronze);
  text-decoration: none;
  font-size: 0.95rem;
}

.forgot-password-link:hover {
  color: var(--bronze-hover);
  text-decoration: underline;
}

.forgot-password-link {
  color: var(--bronze);
  text-decoration: none;
  font-size: 0.95rem;
}

.forgot-password-link:hover {
  color: var(--bronze-hover);
  text-decoration: underline;
}

/* ===========================
   Logo regolamenti FISG minimal
=========================== */

.fisg-link {
  position: fixed;
  bottom: 70px;
  right: 25px;
  display: flex;
  align-items: center;
  gap: 22px;
  text-decoration: none;
  z-index: 1000;
}

.fisg-logo {
  width: 85px;
  height: auto;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 0 8px rgba(0,0,0,0.6));
}

.fisg-label {
  color: white;
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(25px);
  transition: all 0.3s ease;
  pointer-events: none;
  text-shadow: 0 0 8px rgba(0,0,0,0.8);
}

.fisg-link:hover .fisg-label {
  opacity: 1;
  transform: translateX(0);
}

.fisg-link:hover .fisg-logo {
  transform: translateX(-10px) scale(1.08);
  filter: drop-shadow(0 0 14px rgba(205,127,50,0.7));
}

/* Mobile */

@media (max-width: 768px) {

  .fisg-link {

    bottom: 80px;
    right: 15px;
  }

  .fisg-logo {

    width: 65px;
  }

  .fisg-label {

    opacity: 1;
    transform: translateX(0);

    font-size: 0.85rem;
  }

}

/* ===========================
   FAQ page
=========================== */

.faq-page {
  overflow-x: hidden;
}

.faq-container {
  width: min(1040px, calc(100% - 40px));
  margin: 0 auto;
  padding: 145px 0 70px;
}

.faq-header {
  max-width: 760px;
  margin: 0 auto 42px;
  animation: fadeUp 0.9s ease;
}

.section-eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--bronze);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.faq-header h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  margin-bottom: 14px;
}

.faq-content {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.faq-section {
  padding: 24px;
  border: 1px solid var(--border-light);
  border-radius: 22px;
  background: rgba(11, 15, 24, 0.62);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: fadeUp 0.9s ease;
}

.faq-section h2 {
  margin: 0 0 18px;
  color: var(--bronze);
  font-size: 1.18rem;
  font-weight: 700;
}

.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.035);
}

.faq-item .accordion-button {
  gap: 14px;
  padding: 18px 20px;
  background: transparent;
  color: white;
  font-weight: 500;
  line-height: 1.45;
  box-shadow: none;
}

.faq-item .accordion-button:hover {
  color: var(--bronze);
  background: rgba(205, 127, 50, 0.08);
}

.faq-item .accordion-button:not(.collapsed) {
  color: var(--bronze);
  background: rgba(205, 127, 50, 0.12);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08);
}

.faq-item .accordion-button::after {
  flex-shrink: 0;
  width: 1.05rem;
  height: 1.05rem;
  margin-left: auto;
  filter: invert(1) grayscale(1);
  opacity: 0.75;
}

.faq-item .accordion-button:not(.collapsed)::after {
  filter: invert(59%) sepia(50%) saturate(699%) hue-rotate(348deg) brightness(88%) contrast(88%);
}

.faq-item .accordion-body {
  padding: 18px 20px 20px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.98rem;
  line-height: 1.7;
  background: rgba(0, 0, 0, 0.12);
}

@media (max-width: 768px) {
  .faq-container {
    width: min(100% - 28px, 1040px);
    padding-top: 125px;
  }

  .faq-section {
    padding: 18px;
    border-radius: 18px;
  }

  .faq-item .accordion-button {
    padding: 16px;
    font-size: 0.95rem;
  }

  .faq-item .accordion-body {
    padding: 16px;
    font-size: 0.93rem;
  }
}


/* ===========================
   Ricerca FAQ
=========================== */

.faq-search-panel {
  max-width: 780px;
  margin: -16px auto 34px;
  animation: fadeUp 0.9s ease;
}

.faq-search-box {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(11, 15, 24, 0.62);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: all 0.3s ease;
}

.faq-search-box:focus-within {
  border-color: var(--bronze);
  box-shadow:
    0 0 0 0.2rem rgba(205, 127, 50, 0.12),
    0 18px 45px rgba(0, 0, 0, 0.24);
}

.faq-search-box > .bi-search {
  margin-left: 20px;
  color: var(--bronze);
  font-size: 1.05rem;
}

.faq-search-input {
  width: 100%;
  padding: 15px 52px 15px 14px;
  border: 0;
  outline: 0;
  background: transparent;
  color: white;
  font: inherit;
}

.faq-search-input::placeholder {
  color: rgba(255, 255, 255, 0.58);
}

.faq-clear-search {
  position: absolute;
  right: 10px;
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  transition: all 0.25s ease;
}

.faq-clear-search.is-visible {
  display: flex;
}

.faq-clear-search:hover {
  background: rgba(205, 127, 50, 0.22);
  color: white;
}

.faq-search-count,
.faq-no-results {
  min-height: 22px;
  margin: 10px 0 0;
  text-align: center;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.68);
}

.faq-no-results {
  color: #ffcf9c;
}

.faq-item.faq-match {
  border-color: rgba(205, 127, 50, 0.42) !important;
  background: rgba(205, 127, 50, 0.07);
}

@media (max-width: 768px) {
  .faq-search-panel {
    margin: -10px auto 26px;
  }

  .faq-search-input {
    padding-top: 14px;
    padding-bottom: 14px;
    font-size: 0.95rem;
  }
}

/* ===========================
   Background pagine pubbliche esterne
=========================== */

.public-page {
  position: relative;
  isolation: isolate;
  background: #07080d;
}

.public-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;

  background-image: url("../asset/backgrounds/background_ice2.jpg");

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  filter: blur(2px);
  transform: scale(1.03);
}

.public-page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;

  background:
    radial-gradient(
      circle at center,
      rgba(255,255,255,0.05),
      transparent 45%
    ),
    linear-gradient(
      135deg,
      rgba(7, 8, 13, 0.82),
      rgba(17, 23, 35, 0.86),
      rgba(30, 35, 48, 0.90)
    );
}

@media (max-width: 768px) {

  .public-page::before {
    background-position: center top;
    filter: blur(1.5px);
  }

}
