/*!
 * EBL Microsite – Participants Page
 * Mixed Teams Championship – Midnight Indigo + Lavender
 * Playfair Display + DM Sans
 */

/* ============================================================
   FONTS
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;0,700;0,800;1,600;1,700&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600;9..40,700&display=swap');

/* ============================================================
   VARIABILI
   ============================================================ */
:root {
  --lav:            #A78BFA;
  --lav-light:      #C4B0FC;
  --lav-pale:       #EDE8FF;
  --lav-dim:        rgba(167, 139, 250, 0.12);
  --lav-border:     rgba(167, 139, 250, 0.22);
  --lav-border-h:   rgba(167, 139, 250, 0.55);

  --ind-deep:       #080A1E;
  --ind-dark:       #0D1030;
  --ind-mid:        #161A45;

  --txt-light:      #F2F0FF;
  --txt-muted:      rgba(242, 240, 255, 0.55);
  --txt-dim:        rgba(242, 240, 255, 0.35);

  /* Palette chiara per il body */
  --body-bg:        #F4F3FF;
  --card-bg:        #FFFFFF;
  --text-dark:      #1C1848;
  --text-mid:       #3D3862;
  --text-muted:     #6B638F;
  --border-light:   #DDD9F5;
  --row-stripe:     #F9F8FF;
  --row-hover:      #F0EEFF;
}

/* ============================================================
   RESET BASE
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  font-family: 'DM Sans', sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

p  { font-size: 1em; }
b, strong { font-weight: 700; }

/* ============================================================
   SFONDO GLOBALE – midnight indigo
   ============================================================ */
body,
.background-container {
  background-color: var(--ind-deep);
  background-image:
    radial-gradient(ellipse 60% 60% at 20% 30%, rgba(90,60,180,0.18) 0%, transparent 60%),
    radial-gradient(ellipse 50% 70% at 80% 70%, rgba(50,30,120,0.15) 0%, transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='500' height='500'%3E%3Cg fill='%23ffffff'%3E%3Ccircle cx='52' cy='31' r='0.7' opacity='0.25'/%3E%3Ccircle cx='183' cy='88' r='1' opacity='0.18'/%3E%3Ccircle cx='340' cy='22' r='0.5' opacity='0.3'/%3E%3Ccircle cx='270' cy='150' r='1.1' opacity='0.15'/%3E%3Ccircle cx='92' cy='220' r='0.6' opacity='0.2'/%3E%3Ccircle cx='430' cy='170' r='0.8' opacity='0.25'/%3E%3Ccircle cx='60' cy='400' r='0.7' opacity='0.22'/%3E%3Ccircle cx='380' cy='340' r='0.9' opacity='0.18'/%3E%3Ccircle cx='150' cy='460' r='0.6' opacity='0.2'/%3E%3Ccircle cx='480' cy='80' r='0.5' opacity='0.28'/%3E%3C/g%3E%3C/svg%3E");
  background-size: auto, auto, 500px 500px;
  background-attachment: fixed;
  min-height: 100vh;
}

.background-container {
  top: 0; left: 0;
  width: 100%; height: 100%;
  overflow: hidden;
  position: relative;
}

.background-container::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 30, 0.55);
  pointer-events: none;
}

/* ============================================================
   CONTENUTO PRINCIPALE – sfondo chiaro lavanda
   ============================================================ */
.innercontent {
  margin: 0 auto;
  background: var(--card-bg);
  border: 1px solid var(--lav-border);
  border-top: none;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 8px 40px rgba(8, 10, 30, 0.35);
  color: var(--text-dark);
  position: relative;
  z-index: 1;
  padding-bottom: 2.5rem;
}

.contentEBLMP {
  background: transparent;
  position: relative;
  min-height: 500px;
  color: var(--text-dark);
  padding-top: 0.5rem;
}

/* ============================================================
   HEADER – midnight indigo con glassmorphism
   ============================================================ */
#topbar { margin: 0; }

#header {
  background: var(--ind-dark);
  position: relative;
  border-bottom: 1px solid var(--lav-border);
  padding: 1.5rem 1.5rem 1.3rem;
  text-align: center;
  color: var(--txt-light);
  overflow: hidden;
}

#header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 80% at 50% 0%, rgba(167,139,250,0.1) 0%, transparent 60%);
  pointer-events: none;
}

#header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--lav), transparent);
  opacity: 0.25;
}

#header > *,
#header .row,
#header .col-md-12,
#header p,
#header h1 {
  position: relative;
  z-index: 1;
}

#logo, #ioc { text-align: center; padding: 9px; }

.site-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lav);
  border-bottom: 1px solid var(--lav-border);
  padding-bottom: 0.45rem;
  margin-bottom: 0.65rem;
  display: block;
}

div#header h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.3rem, 3.5vw, 2.1rem);
  font-weight: 700;
  color: var(--txt-light);
  background: transparent;
  line-height: 1.3;
  letter-spacing: 0.01em;
  padding: 0;
  margin-bottom: 0.5rem;
}

#data {
  display: inline-block;
  background: transparent;
  color: var(--txt-muted);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  border: none;
  padding: 0;
  margin: 0;
}

/* ============================================================
   MENU INFO
   ============================================================ */
#menu-info {
  background: var(--row-stripe);
  border-bottom: 1px solid var(--border-light);
  border-top: 1px solid var(--border-light);
  padding: 1rem 1.5rem;
  margin-top: 0;
}

#menu-info ul { list-style-type: none; }

#menu-info ul li {
  margin-bottom: 5px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 4px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.5;
}

#menu-info a {
  font-weight: 600;
  color: var(--lav);
  font-size: 0.88rem;
  background: none;
  display: inline-block;
  padding: 1px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
#menu-info a:hover {
  color: var(--text-dark);
  border-bottom-color: var(--lav);
}

.border-right {
  border-right: 1px solid var(--border-light);
  min-height: 80px;
  height: auto;
}

.tba, .tba a { color: #c0392b !important; }

/* ============================================================
   LINK GENERALI
   ============================================================ */
a {
  cursor: pointer;
  color: var(--lav);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
a:hover {
  color: var(--text-dark);
  border-bottom-color: var(--lav);
  text-decoration: none;
}

/* ============================================================
   HEADINGS
   ============================================================ */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  display: block;
  width: 100%;
}
h1 { font-size: 2rem;    color: var(--text-dark); }
h2 { font-size: 1.75rem; color: var(--text-dark); }
h3 { font-size: 1.4rem;  color: var(--text-mid);  }
h4 { font-size: 1.2rem;  color: var(--text-dark); }

h2 {
  padding: 1.3rem 1.5rem 0.55rem;
  border-bottom: 2px solid var(--lav-border);
  margin-bottom: 1.1rem;
  font-weight: 700;
  line-height: 1.25;
}

/* ============================================================
   CONTENUTO PAGINA
   ============================================================ */
.page-content {
  padding: 1rem 1.5rem 2.5rem;
}

.page-content p,
.page-content li {
  color: var(--text-mid);
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 0.6rem;
}

.page-content a {
  color: var(--lav);
  background: transparent;
}
.page-content a:hover {
  color: var(--text-dark);
  border-bottom-color: var(--lav);
  text-decoration: none;
}

.page-content a.status-icons,
.page-content a.status-icons:hover {
  text-decoration: none;
  border-bottom: 0;
}

/* ============================================================
   TABELLE
   ============================================================ */
.table {
  margin-top: 15px;
  width: 100%;
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

#table-scroll { overflow-x: auto; }
.center { text-align: center; }

.bulletin-table {
  border: 1px solid var(--lav-border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--card-bg);
  width: 100%;
  margin-bottom: 1.5rem;
}

.bulletin-table th,
thead tr th,
th {
  background: linear-gradient(135deg, rgba(167,139,250,0.12), rgba(196,176,252,0.06));
  color: var(--text-dark);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.85rem 1rem;
  border-bottom: 2px solid var(--lav-border);
  vertical-align: middle;
}

.bulletin-table td {
  color: var(--text-dark);
  border: 1px solid var(--border-light);
  padding: 0.75rem 1rem;
  vertical-align: middle;
  font-size: 0.92rem;
  display: table-cell;
}

.bulletin-table td img {
  display: inline-block;
  vertical-align: middle;
}

.bulletin-table td a,
table a {
  color: var(--lav);
  background: transparent;
  text-decoration: none;
  border-bottom: none;
}
.bulletin-table td a:hover,
table a:hover {
  color: var(--text-dark);
  border-bottom: none;
}

.bulletin-table tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: background 0.15s;
}
.bulletin-table tbody tr:hover { background: var(--row-hover); }

.table-striped tbody tr:nth-of-type(odd) { background: var(--row-stripe); }

.bulletin-table tbody tr td:nth-child(2) {
  text-align: left;
  padding-left: 12px;
  color: var(--text-dark);
}
.bulletin-table tbody tr td:nth-child(2) a,
.bulletin-table tbody tr td:nth-child(2) span { color: var(--text-dark); }
.bulletin-table tbody tr td:first-child,
.bulletin-table tbody tr td:nth-child(3) { text-align: center; }

.bulletin-table tbody tr:first-child td[bgcolor],
.bulletin-table tbody tr:nth-child(2) td {
  background: rgba(167, 139, 250, 0.08) !important;
  color: var(--text-dark) !important;
  font-weight: 700;
  border-bottom: 1px solid var(--lav-border);
}

/* Bottoni registrazione */
.bulletin-table a[href*="Reg/EntryForm"],
.bulletin-table a[href*="Reg/Participants"] {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, var(--lav), var(--lav-light));
  color: #fff !important;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: none !important;
  padding: 0.5rem 1.3rem;
  border-radius: 5px;
  box-shadow: 0 2px 12px rgba(167,139,250,0.28);
  transition: all 0.3s ease;
}
.bulletin-table a[href*="Reg/EntryForm"]:hover,
.bulletin-table a[href*="Reg/Participants"]:hover {
  box-shadow: 0 0 22px rgba(167,139,250,0.55);
  filter: brightness(1.08);
  color: #fff !important;
  border-bottom: none !important;
}

/* ============================================================
   ICONE STATUS
   ============================================================ */
.icon-status {
  font-size: 18px;
  line-height: 1;
  vertical-align: middle;
  display: inline-block;
  width: 1.25em;
  text-align: center;
}
.icon-yes { color: #27a85a; }
.icon-no  { color: #c0392b; }

.icon-block {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  margin: 0 8px;
}

a.status-icons {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* ============================================================
   LEGENDA
   ============================================================ */
.legend,
table.legend {
  background: rgba(167,139,250,0.05) !important;
  border: 1px solid var(--lav-border) !important;
  border-radius: 10px !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  overflow: hidden !important;
  margin: 6px 0 10px !important;
}

.legend-row {
  display: grid !important;
  grid-template-columns: 96px 1fr !important;
  align-items: center !important;
  column-gap: 8px !important;
  padding: 8px 12px !important;
  border-top: 1px solid var(--border-light) !important;
  background: transparent !important;
  color: var(--text-mid);
  font-size: 0.88rem;
}
.legend-row:first-child { border-top: none !important; }

.legend-icons {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-width: 96px !important;
  flex-shrink: 0 !important;
}

.legend .icon-status {
  font-size: 18px !important;
  line-height: 1 !important;
  vertical-align: middle !important;
}

.textTable > tbody > tr > td:first-child > table.textTable {
  background: rgba(167,139,250,0.05) !important;
  border: 1px solid var(--lav-border) !important;
  border-radius: 10px !important;
  border-collapse: separate !important;
  overflow: hidden !important;
}
.textTable > tbody > tr > td:first-child > table.textTable td {
  background: transparent !important;
  padding: 8px 12px !important;
  border: 0 !important;
  color: var(--text-mid);
  font-size: 0.88rem;
}
.textTable > tbody > tr > td:first-child > table.textTable tr + tr td {
  border-top: 1px solid var(--border-light) !important;
}

.legend + br,
table.textTable + br { display: none !important; }
.legend + br + .table.bulletin-table,
table.textTable + br + .table.bulletin-table { margin-top: 8px !important; }

/* ============================================================
   LINK SPECIALI
   ============================================================ */
.page-content a[href*="adobe.com"],
.page-content a[href*="esign"] {
  background: var(--lav-dim);
  border: 1px solid var(--lav-border);
  color: var(--text-dark);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  border-bottom: none;
  display: inline;
}
.page-content a[href*="adobe.com"]:hover,
.page-content a[href*="esign"]:hover {
  background: rgba(167,139,250,0.22);
  color: var(--text-dark);
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--ind-dark);
  position: relative;
  border-top: 1px solid var(--lav-border);
  text-align: center;
  width: 100%;
  margin: 0;
  padding: 1.2rem 1.5rem;
  z-index: 2;
  border-radius: 0 0 14px 14px;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 80% at 50% 100%, rgba(167,139,250,0.07) 0%, transparent 70%);
  pointer-events: none;
}

footer > * { position: relative; z-index: 1; }

footer p, footer b, footer small {
  color: var(--txt-muted);
  font-size: 0.8rem;
}

footer a {
  color: var(--txt-muted);
  background: none;
  border-bottom: none;
  font-weight: 500;
}
footer a:hover {
  color: var(--lav-light);
  border-bottom: none;
}

/* ============================================================
   UTILITÀ
   ============================================================ */
.subtitle { font-style: italic; color: var(--lav); }
.divider  { display: block; height: 2em; }
a.winner  { color: #c0392b; }
blockquote p { color: var(--text-muted); font-size: 0.85em; font-style: italic; }

.medium { width: 60%; margin: 0 auto; }
.medium th { background: rgba(167,139,250,0.1); padding: 0; }
.medium h3 { color: var(--text-dark); text-align: center; margin: 10px 0; border: none; }
.medium tr td { text-align: center; border: 1px solid var(--border-light); color: var(--text-dark); }

#header-row1 { padding: 0; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  #header { padding: 1.1rem 1rem; }
  div#header h1 { font-size: 1.15rem; }
  #data { font-size: 0.8rem; }

  .border-right {
    border-right: none;
    border-bottom: 1px solid var(--border-light);
    min-height: auto;
  }

  #menu-info { padding: 0.8rem 1rem; }
  .page-content { padding: 0.8rem 1rem 1.8rem; }

  .bulletin-table { border-radius: 8px; }
  .bulletin-table td { padding: 0.6rem 0.65rem; font-size: 0.85rem; }
  .bulletin-table th { font-size: 0.75rem; }

  .legend { position: static !important; }
  .legend-row {
    grid-template-columns: 82px 1fr !important;
    padding: 6px 10px !important;
    font-size: 0.82rem;
  }
  .legend-icons { min-width: 82px !important; }

  a.status-icons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }
  .icon-block {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    margin: 0;
  }

  .medium { width: 100%; }
  #ioc { display: none; }
  footer { border-radius: 0; }
}

@media (max-width: 480px) {
  div#header h1 { font-size: 1rem; }
  .legend-row { grid-template-columns: 76px 1fr !important; }
  .legend-icons { min-width: 76px !important; }
}
