/*!
 * EBL Microsite – Participants Page
 * Style unificato: struttura Fotis Skoularikis + estetica Senior Championship
 * Header: legno scuro / Resto pagina: sfondo chiaro + testi scuri
 */

/* ============================================================
   FONTS
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Outfit:wght@300;400;500;600;700&display=swap');

/* ============================================================
   VARIABILI
   ============================================================ */
:root {
  --gold:           #C9A84C;
  --gold-light:     #DBBF6A;
  --gold-dim:       rgba(201, 168, 76, 0.15);
  --gold-border:    rgba(201, 168, 76, 0.30);
  --wood-dark:      #2E1B0E;
  --cream:          #F5EDE0;
  --cream-muted:    rgba(245, 237, 224, 0.62);

  /* Palette chiara per il body */
  --body-bg:        #F7F3EE;
  --card-bg:        #FFFFFF;
  --text-dark:      #2E1B0E;
  --text-mid:       #5A3E28;
  --text-muted:     #8A7060;
  --border-light:   #E8DDD0;
  --row-stripe:     #FAF6F1;
  --row-hover:      #F3EBE0;
}

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

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

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

/* ============================================================
   SFONDO GLOBALE – legno scuro (visibile intorno alla card)
   ============================================================ */
body,
.background-container {
  background-color: var(--wood-dark);
  background-image: url('https://championships.eurobridge.org/wp-content/uploads/2026/02/wood-scaled.png');
  background-size: cover;
  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(15, 8, 2, 0.68);
  pointer-events: none;
}

/* ============================================================
   CONTENUTO PRINCIPALE – sfondo chiaro
   ============================================================ */
.innercontent {
  margin: 0 auto;
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-top: none;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.28);
  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;
}

/* ============================================================
   TOPBAR / HEADER – legno scuro
   ============================================================ */
#topbar { margin: 0; }

#header {
  background: url('https://championships.eurobridge.org/wp-content/uploads/2026/02/wood-scaled.png') center/cover;
  position: relative;
  border-bottom: 1px solid var(--gold-border);
  padding: 1.5rem 1.5rem 1.3rem;
  text-align: center;
  color: var(--cream);
  overflow: hidden;
}

#header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(20, 10, 3, 0.80);
  pointer-events: none;
}

/* tutti i figli diretti sopra l'overlay */
#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: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  border-bottom: 1px solid var(--gold-border);
  padding-bottom: 0.45rem;
  margin-bottom: 0.65rem;
  display: block;
}

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

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

/* ============================================================
   MENU INFO – chiaro con accenti gold
   ============================================================ */
#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; }

/* TUTTI gli elementi li (anche senza <a>) alla stessa dimensione */
#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(--gold);
  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(--gold);
}

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

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

/* ============================================================
   LINK GENERALI (fuori dall'header)
   ============================================================ */
a {
  cursor: pointer;
  color: var(--gold);
  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(--gold);
  text-decoration: none;
}

/* ============================================================
   HEADINGS PAGINA
   ============================================================ */
h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', 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(--gold-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(--gold);
  background: transparent;
}
.page-content a:hover {
  color: var(--text-dark);
  border-bottom-color: var(--gold);
  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(--border-light);
  border-radius: 10px;
  overflow: hidden;
  background: var(--card-bg);
  width: 100%;
  margin-bottom: 1.5rem;
}

/* Header th */
.bulletin-table th,
thead tr th,
th {
  background: linear-gradient(135deg, rgba(201,168,76,0.18), rgba(219,191,106,0.10));
  color: var(--text-dark);
  font-family: 'Outfit', 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(--gold-border);
  vertical-align: middle;
}

/* Celle */
.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(--gold);
  background: transparent;
  text-decoration: none;
  border-bottom: none;
}
.bulletin-table td a:hover,
table a:hover {
  color: var(--text-dark);
  border-bottom: none;
}

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

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

/* Allineamento colonne */
.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; }

/* Header rows con bgcolor inline (generati dal server) */
.bulletin-table tbody tr:first-child td[bgcolor],
.bulletin-table tbody tr:nth-child(2) td {
  background: rgba(201, 168, 76, 0.10) !important;
  color: var(--text-dark) !important;
  font-weight: 700;
  border-bottom: 1px solid var(--gold-border);
}

/* Bottoni registro/partecipanti nella tabella */
.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(--gold), var(--gold-light));
  color: var(--wood-dark) !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(201, 168, 76, 0.25);
  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(201, 168, 76, 0.5);
  filter: brightness(1.1);
  color: var(--wood-dark) !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(201, 168, 76, 0.06) !important;
  border: 1px solid var(--gold-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;
}

/* Legenda legacy (tabella annidata di Fotis) */
.textTable > tbody > tr > td:first-child > table.textTable {
  background: rgba(201, 168, 76, 0.06) !important;
  border: 1px solid var(--gold-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;
}

/* Avvicina legenda a tabella */
.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(--gold-dim);
  border: 1px solid var(--gold-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(201, 168, 76, 0.28);
  color: var(--text-dark);
}

/* ============================================================
   FOOTER – legno scuro coerente con header
   ============================================================ */
footer {
  background: url('https://championships.eurobridge.org/wp-content/uploads/2026/02/wood-scaled.png') center/cover;
  position: relative;
  border-top: 1px solid var(--gold-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: rgba(20, 10, 3, 0.82);
  pointer-events: none;
}

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

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

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

/* ============================================================
   UTILITÀ
   ============================================================ */
.subtitle { font-style: italic; color: var(--gold); }
.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(201, 168, 76, 0.15); 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; }
}