/* Premium navigation layer for domain hubs (primo..quinto) and numbered pages (11..52). */
body.domain-hub-page,
body.subdomain-list-page {
  --nav-accent: #213665;
  --nav-accent-soft: rgba(33, 54, 101, 0.16);
  background:
    radial-gradient(1300px 640px at -12% -14%, rgba(180, 50, 58, 0.15), transparent 60%),
    radial-gradient(950px 520px at 108% -10%, rgba(79, 154, 82, 0.13), transparent 56%),
    linear-gradient(180deg, #e9f1ff 0%, #dfeafb 52%, #e8f1ff 100%) !important;
  min-height: 100vh;
}

body.domain-hub-page.domain-primo,
body.subdomain-list-page.domain-primo { --nav-accent: #213665; --nav-accent-soft: rgba(33, 54, 101, 0.16); }
body.domain-hub-page.domain-secro,
body.subdomain-list-page.domain-secro { --nav-accent: #e3753b; --nav-accent-soft: rgba(227, 117, 59, 0.2); }
body.domain-hub-page.domain-tero,
body.subdomain-list-page.domain-tero { --nav-accent: #4f9a52; --nav-accent-soft: rgba(79, 154, 82, 0.2); }
body.domain-hub-page.domain-quatro,
body.subdomain-list-page.domain-quatro { --nav-accent: #b4323a; --nav-accent-soft: rgba(180, 50, 58, 0.18); }
body.domain-hub-page.domain-quinto,
body.subdomain-list-page.domain-quinto { --nav-accent: #eca245; --nav-accent-soft: rgba(236, 162, 69, 0.22); }

body.domain-hub-page .breadcrumb,
body.subdomain-list-page .breadcrumb {
  max-width: 1280px;
  margin: 1.25rem auto 0.85rem;
  background: rgba(234, 242, 255, 0.88);
  backdrop-filter: blur(7px);
  border: 1px solid var(--nav-accent-soft);
  border-radius: 14px;
  padding: 0.9rem 1.08rem;
  box-shadow: 0 10px 24px rgba(22, 41, 82, 0.08);
  position: relative;
  top: 0;
}

body.domain-hub-page .breadcrumb a,
body.subdomain-list-page .breadcrumb a {
  color: var(--nav-accent);
  font-weight: 700;
}

body.domain-hub-page .breadcrumb a:hover,
body.subdomain-list-page .breadcrumb a:hover {
  background: rgba(33, 54, 101, 0.09);
}

.nav-hero {
  max-width: 1280px;
  margin: 0 auto 0.95rem;
  padding: 0 0.75rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: stretch;
}

.nav-hero-main {
  background: linear-gradient(90deg, rgba(33, 54, 101, 0.12), rgba(232, 242, 255, 0.9));
  border: 1px solid var(--nav-accent-soft);
  border-left: 6px solid var(--nav-accent);
  border-radius: 14px;
  padding: 0.92rem 1.05rem;
  box-shadow: 0 8px 20px rgba(20, 42, 88, 0.08);
}

.nav-hero-title {
  margin: 0;
  color: #213665;
  text-transform: uppercase;
  font-weight: 800;
  line-height: 1.33;
  letter-spacing: 0.18px;
  font-size: 1.1rem;
}

.nav-hero-meta {
  margin-top: 0.55rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.nav-hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.33rem;
  border: 1px solid var(--nav-accent-soft);
  border-radius: 999px;
  padding: 0.3rem 0.58rem;
  background: rgba(236, 244, 255, 0.88);
  color: var(--nav-accent);
  font-size: 0.76rem;
  font-weight: 700;
}

.nav-hero-side {
  display: flex;
  align-items: center;
}

.nav-domain-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-radius: 999px;
  padding: 0.44rem 0.8rem;
  background: linear-gradient(90deg, var(--nav-accent), #1d305f);
  box-shadow: 0 10px 20px rgba(33, 54, 101, 0.25);
}

/* Domain hub pages (primo/secro/...) */
body.domain-hub-page .domain-container {
  background: transparent;
  min-height: calc(100vh - 100px);
  padding-top: 0.4rem;
}

body.domain-hub-page .subdomains-grid {
  max-width: 1280px;
  gap: 1.35rem;
  padding: 0 0.75rem;
}

body.domain-hub-page .subdomain-card {
  border: 1px solid var(--nav-accent-soft);
  border-radius: 15px;
  box-shadow: 0 10px 24px rgba(20, 40, 80, 0.12);
  animation: navCardReveal 0.34s ease both;
}

body.domain-hub-page .subdomain-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(20, 40, 80, 0.16);
}

body.domain-hub-page .subdomain-image {
  min-height: 186px;
  border-bottom: 1px solid var(--nav-accent-soft);
  background: linear-gradient(135deg, rgba(236, 244, 255, 0.96), rgba(224, 236, 255, 0.96));
}

body.domain-hub-page .subdomain-number {
  background: var(--nav-accent);
  width: 34px;
  height: 34px;
  box-shadow: 0 8px 16px rgba(33, 54, 101, 0.22);
}

body.domain-hub-page .subdomain-title {
  color: var(--nav-accent);
}

body.domain-hub-page .subdomain-title::after {
  background: var(--nav-accent);
  opacity: 0.55;
}

body.domain-hub-page .progress-section {
  background: rgba(228, 238, 254, 0.8);
}

body.domain-hub-page .progress-bar {
  background: linear-gradient(90deg, var(--nav-accent), #5b74a8);
}

body.domain-hub-page .progress-info {
  color: #223a5e;
}

body.domain-hub-page .score-badge {
  background: var(--nav-accent);
}

/* Numbered pages (11.php..52.php) */
body.subdomain-list-page .container {
  max-width: 1280px;
  padding: 0 0.75rem 1.4rem;
}

body.subdomain-list-page .row {
  margin-left: 0;
  margin-right: 0;
}

body.subdomain-list-page .col-md-12 {
  padding-left: 0;
  padding-right: 0;
}

body.subdomain-list-page .card {
  margin-bottom: 1rem;
  border: 1px solid var(--nav-accent-soft);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(20, 40, 80, 0.12);
  animation: navCardReveal 0.34s ease both;
}

body.subdomain-list-page .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 13px 26px rgba(20, 40, 80, 0.16);
}

body.subdomain-list-page .card-body {
  border-radius: 14px;
  background: rgba(236, 244, 255, 0.9);
  gap: 1rem;
  padding: 1.22rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

body.subdomain-list-page .card-content {
  flex: 1;
  min-width: 0;
}

body.subdomain-list-page .card-title {
  color: var(--nav-accent);
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

body.subdomain-list-page .card-text {
  color: #2b4368;
  line-height: 1.45;
}

body.subdomain-list-page .card .btn-primary {
  background: linear-gradient(90deg, var(--nav-accent), #1d305f);
  border: none;
  border-radius: 10px;
  font-weight: 700;
  min-width: 130px;
  box-shadow: 0 8px 18px rgba(33, 54, 101, 0.22);
}

body.subdomain-list-page .card .btn-primary:hover {
  filter: saturate(1.05);
  transform: translateY(-1px);
}

body.subdomain-list-page .card.bg-success {
  border-left: 7px solid #4f9a52;
}

body.subdomain-list-page .card.bg-success .card-body {
  background: linear-gradient(90deg, rgba(79, 154, 82, 0.13), rgba(236, 244, 255, 0.92) 22%);
}

body.domain-hub-page .subdomain-card:nth-child(2),
body.subdomain-list-page .col-md-12:nth-child(2) .card { animation-delay: 0.05s; }
body.domain-hub-page .subdomain-card:nth-child(3),
body.subdomain-list-page .col-md-12:nth-child(3) .card { animation-delay: 0.1s; }
body.domain-hub-page .subdomain-card:nth-child(4),
body.subdomain-list-page .col-md-12:nth-child(4) .card { animation-delay: 0.15s; }

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

.form-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  font-size: 0.74rem;
  font-weight: 800;
  margin-left: 0.55rem;
  border: 1px solid var(--nav-accent-soft);
  color: var(--nav-accent);
  background: rgba(33, 54, 101, 0.08);
}

.form-status-chip.filled {
  border-color: rgba(79, 154, 82, 0.33);
  color: #2c7b47;
  background: rgba(79, 154, 82, 0.12);
}

@media (max-width: 991.98px) {
  .nav-hero {
    grid-template-columns: 1fr;
    gap: 0.6rem;
    padding: 0 0.65rem;
  }

  .nav-hero-main {
    padding: 0.84rem 0.86rem;
  }

  body.domain-hub-page .subdomains-grid,
  body.subdomain-list-page .container {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }

  body.subdomain-list-page .card-body {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    padding: 1rem 0.95rem;
  }

  body.subdomain-list-page .card .btn-primary {
    width: 100%;
  }
}

/* Domain selector page (domaine.php) */
body.domain-selector-page {
  --sel-accent: #213665;
  background:
    radial-gradient(1200px 600px at -14% -15%, rgba(180, 50, 58, 0.15), transparent 60%),
    radial-gradient(980px 560px at 110% -12%, rgba(79, 154, 82, 0.13), transparent 56%),
    linear-gradient(180deg, #e9f1ff 0%, #deebfb 55%, #e7f0ff 100%) !important;
  min-height: 100vh;
}

body.domain-selector-page .domain-container {
  background: transparent !important;
  min-height: calc(100vh - 100px);
  padding-top: 0.55rem;
}

body.domain-selector-page .domain-grid {
  max-width: 1280px;
  padding: 0 0.75rem;
  gap: 1.3rem;
}

body.domain-selector-page .domain-card {
  border: 1px solid rgba(33, 54, 101, 0.18);
  border-radius: 16px;
  box-shadow: 0 12px 26px rgba(20, 40, 80, 0.12);
  background: rgba(236, 244, 255, 0.9);
  animation: navCardReveal 0.34s ease both;
}

body.domain-selector-page .domain-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(20, 40, 80, 0.16);
}

body.domain-selector-page .domain-image {
  background: linear-gradient(135deg, rgba(236, 244, 255, 0.96), rgba(224, 236, 255, 0.96));
}

body.domain-selector-page .domain-content {
  background: rgba(234, 242, 255, 0.78);
}

body.domain-selector-page .domain-score {
  box-shadow: 0 8px 20px rgba(33, 54, 101, 0.22);
}

.selector-hero {
  max-width: 1280px;
  margin: 0.35rem auto 1rem;
  padding: 0 0.75rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: stretch;
}

.selector-hero-main {
  background: linear-gradient(90deg, rgba(33, 54, 101, 0.12), rgba(232, 242, 255, 0.9));
  border: 1px solid rgba(33, 54, 101, 0.2);
  border-left: 6px solid #213665;
  border-radius: 14px;
  padding: 0.92rem 1.06rem;
  box-shadow: 0 8px 20px rgba(20, 42, 88, 0.08);
}

.selector-hero-title {
  margin: 0;
  color: #213665;
  text-transform: uppercase;
  font-weight: 800;
  line-height: 1.33;
  letter-spacing: 0.18px;
  font-size: 1.1rem;
}

.selector-hero-meta {
  margin-top: 0.55rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.selector-hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.33rem;
  border: 1px solid rgba(33, 54, 101, 0.2);
  border-radius: 999px;
  padding: 0.3rem 0.58rem;
  background: rgba(236, 244, 255, 0.88);
  color: #213665;
  font-size: 0.76rem;
  font-weight: 700;
}

.selector-hero-side {
  display: flex;
  align-items: center;
}

.selector-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-radius: 999px;
  padding: 0.44rem 0.8rem;
  background: linear-gradient(90deg, #213665, #1d305f);
  box-shadow: 0 10px 20px rgba(33, 54, 101, 0.25);
}

/* City selector page (index.php) */
body.city-selector-page {
  background:
    radial-gradient(1200px 600px at -14% -15%, rgba(180, 50, 58, 0.16), transparent 60%),
    radial-gradient(980px 560px at 110% -12%, rgba(79, 154, 82, 0.14), transparent 56%),
    linear-gradient(180deg, #e9f1ff 0%, #deebfb 55%, #e7f0ff 100%) !important;
}

body.city-selector-page .banner {
  background: transparent !important;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.6rem 0.75rem 1.6rem;
  gap: 1.3rem;
  min-height: auto;
}

body.city-selector-page .navbar {
  background: rgba(234, 242, 255, 0.88);
  border-bottom: 1px solid rgba(33, 54, 101, 0.2);
}

body.city-selector-page figure {
  border: 1px solid rgba(33, 54, 101, 0.18);
  border-radius: 16px;
  box-shadow: 0 12px 26px rgba(20, 40, 80, 0.12);
  background: rgba(236, 244, 255, 0.9);
  animation: navCardReveal 0.34s ease both;
  overflow: hidden;
}

body.city-selector-page figure:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(20, 40, 80, 0.16);
}

body.city-selector-page .banner a {
  position: relative;
  overflow: hidden;
}

body.city-selector-page .banner a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 58px;
  height: 55%;
  background: linear-gradient(180deg, transparent 0%, rgba(12, 27, 55, 0.18) 60%, rgba(12, 27, 55, 0.35) 100%);
  pointer-events: none;
  transition: opacity 0.25s ease;
}

body.city-selector-page figure:hover .banner a::after,
body.city-selector-page figure:hover a::after {
  opacity: 0.8;
}

body.city-selector-page .banner a img {
  filter: grayscale(12%) saturate(0.95) contrast(1.02);
}

body.city-selector-page figure:hover .banner a img,
body.city-selector-page figure:hover a img {
  filter: grayscale(0%) saturate(1.02) contrast(1.04);
}

body.city-selector-page .image-caption {
  background-color: rgba(234, 242, 255, 0.92);
  color: #213665;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.15px;
}

body.city-selector-page .city-badge {
  background: rgba(236, 244, 255, 0.95);
  border: 1px solid rgba(33, 54, 101, 0.18);
  font-weight: 700;
  backdrop-filter: blur(5px);
}

body.city-selector-page .selector-hero-title {
  font-size: 1.16rem;
}

body.city-selector-page figure:nth-child(2),
body.city-selector-page figure:nth-child(3) { animation-delay: 0.05s; }
body.city-selector-page figure:nth-child(4),
body.city-selector-page figure:nth-child(5) { animation-delay: 0.1s; }
body.city-selector-page figure:nth-child(6),
body.city-selector-page figure:nth-child(7),
body.city-selector-page figure:nth-child(8) { animation-delay: 0.15s; }

@media (max-width: 991.98px) {
  .selector-hero {
    grid-template-columns: 1fr;
    gap: 0.6rem;
    padding: 0 0.65rem;
  }

  body.domain-selector-page .domain-grid,
  body.city-selector-page .banner {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }
}
