@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

/* Stile base per il sito */
/* Nuovo font */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600&display=swap');

:root{
    --header-offset: 90px; /* fallback; updated by script on load/resize */
}

body {
    font-family: 'Teko', sans-serif;
    margin: 0;
    background: #f7fbff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main {
    padding: var(--header-offset) 20px 60px;
    transition: padding-top 300ms cubic-bezier(.22,.9,.28,1);
}

/* When header is hidden shrink the top padding so content moves up with no gap */
.header-hidden main{
    padding-top: 0 !important;
}


/* Header Flexbox */
/* Header base — desktop only overrides (mobile is handled by header.css) */
@media (min-width: 1025px) {
header {
    /* Horizontal header: logo on the left, navigation on the right */
    display: flex;
    align-items: center; /* vertically center logo and nav */
    justify-content: flex-start;
    gap: 1rem;
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, #60A5FA, #EC4899);
    color: white;
    position: fixed;
        top: 0;
        width: 100%;
        z-index: 1000;
        
}
/* Logo (consolidated) */
header img,
header img.logo {
    height: 64px; /* regola se necessario */
    width: auto;
    display: block;
    margin: 0;
    border-radius: 8px;
}
nav {
    flex: 1 1 auto; /* allow nav to grow and take available space */
}

nav ul {
    display: flex;
    justify-content: space-evenly; /* distribute the five <li> with equal spacing */
    gap: 12px;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    width: 100%;
    /* no max-width so the menu fills available nav space */
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    transition: color 0.2s ease, background 0.15s ease;
    padding: 8px 10px;
    border-radius: 6px;
}

nav ul li a:hover {
    color: #FCE7F3;
    background: rgba(255,255,255,0.06);
}
} /* end @media min-width 1025px */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
} 

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.card img {
    height: 250px;
    object-fit: cover;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

/* Profile card specific styles for Olivia page */
:root{
    --primary-color: #1E3A8A;
    --secondary-color: #EC4899;
    --accent-color: #60A5FA;
    --muted: #57606a;
}

.profile-card{
    background: linear-gradient(180deg, #ffffff, #f5f7fa);
    border-radius: 14px;
    box-shadow: 0 12px 36px rgba(13,38,93,0.12);
    overflow: hidden;
    border: 1px solid rgba(30,58,138,0.06);
}

.photo-col .photo{
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(90deg, rgba(30,58,138,0.03), rgba(236,72,153,0.02));

}

.profile-photo{
    width: 100%;
    max-width: 360px;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 8px 26px rgba(30,58,138,0.12);
}

.info-col .info{
    padding: 32px 26px;
}

.name{
    color: var(--primary-color);
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    margin: 0 0 6px 0;
}

.role{
    color: var(--muted);
    margin: 0 0 18px 0;
    font-weight: 600;
}

.bio{
    color: #333;
    line-height: 1.6;
    margin-bottom: 18px;
}

/* Athlete Stats Boxes */
.athlete-stats-boxes {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.stats {
  list-style: none;
  padding: 0;
  margin: 20px 0 0 0;

  display: flex;
  gap: 12px;

  width: 100%;
}
.stats li {
  flex: 0 0 calc(33.333% - 8px); /* 3 per riga */
  
  padding: 14px 16px;

  background: linear-gradient(
    135deg,
    #f7f4fb 0%,
    #fdf6fa 100%
  );

  border-radius: 14px;

  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;

  box-sizing: border-box;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.stats li:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30,58,138,0.08);
}
.stats li strong {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;

  color: #1f3fa3;
}
.stats li span {
  font-size: 17px;
  font-weight: 600;

  color: #ff4f9a;
}

.socials .btn{
    margin-right: 10px;
}

/* Responsive tweaks */
@media (max-width: 767px){
    main {
        padding: var(--header-offset) 10px 20px;
    }

    .intro-banner.py-4 {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }
    .intro-banner h1 {
        font-size: 1.4rem;
    }
    .intro-banner p {
        font-size: 0.85rem;
        margin-bottom: 0;
    }

    /* Reduce mt-5 gaps between sections */
    .container.mt-5 {
        margin-top: 0.5rem !important;
    }

    .photo-col{ order: 1; }
    .info-col{ order: 2; }
    .profile-photo{ max-width: 200px; }
    .name{ font-size: 1.5rem; }

    .photo-col .photo {
        padding: 8px 5px 4px;
    }
    .info-col .info {
        padding: 6px 16px 14px;
    }

    .profile-card {
        border-radius: 10px;
    }

    .subtitle {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }
    .subtitle.mb-4 {
        margin-bottom: 8px !important;
    }

    .bio {
        font-size: 0.88rem;
        line-height: 1.4;
        margin-bottom: 10px;
    }

    /* Stack athlete data boxes (one under another) */
    .stats{
        flex-direction: column;
        gap: 6px;
        margin-top: 10px;
    }
    .stats li{
        flex: 1 1 100%;
        width: 100%;
        padding: 10px 14px;
        border-radius: 12px;
    }
    .stats li strong {
        font-size: 11px;
    }
    .stats li span {
        font-size: 14px;
    }

    /* Reduce gap between info card and results */
    .profile-card {
        margin-bottom: 0;
    }

    /* Results section tighter */
    .results-table-container {
        margin-top: 0;
    }

    /* Athlete news section */
    .athlete-news {
        margin-top: 1rem !important;
    }
}

/* Instagram icon styling */
.socials{
    display: flex;
    align-items: center;
    gap: 10px;
}

.social-ig{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    color: var(--secondary-color);
    /* same background used for the photo column */
    background: linear-gradient(90deg, rgba(30,58,138,0.03), rgba(236,72,153,0.02));
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.social-ig svg{ width: 22px; height: 22px; }

.social-ig:hover{
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(236,72,153,0.12);
}

.social-ig img{
    width: 22px;
    height: 22px;
    display: block;
}

/* Banner introduttivo */
.intro-banner {
    background: linear-gradient(90deg, #1E3A8A, #EC4899);
    box-shadow: 0 4px 20px rgba(30, 58, 138, 0.25);
}
.intro-banner h1 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    letter-spacing: 1px;
    margin: 0; /* ensure no gap above the title */
}
.intro-banner p {
    opacity: 0.9;
    font-weight: 500;
}

/* Dettaglio decorativo sotto ai titoli */
.subtitle {
    position: relative;
    display: inline-block;
    color: var(--primary-color);
    margin-bottom: 12px;
}
.subtitle::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 20%;
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
}

/* =========================================
   RISULTATI MODERNI — card + accordion
   ========================================= */

.results-modern { margin-bottom: 24px; }

/* ---------- Card singolo risultato ---------- */
.res-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #fff;
  border-radius: 10px;
  margin-bottom: 5px;
  box-shadow: 0 2px 8px rgba(13,38,93,0.06);
  border-left: 3px solid var(--accent-color, #60A5FA);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.res-card:hover {
  transform: translateX(3px) scale(1.005);
  box-shadow: 0 4px 14px rgba(13,38,93,0.1);
}

.res-card__date {
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary-color, #1E3A8A);
  white-space: nowrap;
  min-width: 62px;
  text-align: center;
  line-height: 1.2;
}
.res-card__year {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  opacity: 0.55;
  margin-top: 1px;
}

.res-card__body {
  flex: 1 1 0%;
  min-width: 0;
}
.res-card__name {
  font-weight: 700;
  font-size: 0.92rem;
  color: #1b1b3a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.res-card__loc {
  font-size: 0.8rem;
  color: var(--muted, #57606a);
}
.res-card__loc i {
  font-size: 0.72rem;
  margin-right: 3px;
  color: var(--secondary-color, #EC4899);
}
.res-card__cat {
  display: inline-block;
  margin-top: 2px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-color, #60A5FA);
  background: rgba(96,165,250,0.1);
  padding: 1px 8px;
  border-radius: 20px;
}

.res-card__pos {
  flex: 0 0 auto;
  text-align: center;
}

/* ---------- Position badges ---------- */
.res-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.85rem;
  color: #fff;
  background: linear-gradient(135deg, #94a3b8, #64748b);
}
.res-gold   { background: linear-gradient(135deg, #fbbf24, #d97706); box-shadow: 0 2px 10px rgba(251,191,36,0.45); }
.res-silver { background: linear-gradient(135deg, #cbd5e1, #94a3b8); box-shadow: 0 2px 10px rgba(203,213,225,0.45); }
.res-bronze { background: linear-gradient(135deg, #f59e0b, #b45309); box-shadow: 0 2px 10px rgba(245,158,11,0.4); }
.res-muted  { background: transparent; color: var(--muted, #57606a); font-weight: 600; font-size: 0.82rem; }

/* ---------- Toggle button ---------- */
.results-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px;
  margin-top: 8px;
  border: 2px dashed rgba(30,58,138,0.15);
  border-radius: 10px;
  background: transparent;
  color: var(--primary-color, #1E3A8A);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.results-toggle-btn:hover {
  background: rgba(96,165,250,0.06);
  border-color: var(--accent-color, #60A5FA);
}
.results-toggle-icon {
  transition: transform 0.3s ease;
}

/* ---------- Full results wrapper (animation) ---------- */
.results-full-wrap {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.results-full-wrap.open {
  max-height: 4000px;
}

/* ---------- Accordion per anno ---------- */
.res-accordion {
  margin-bottom: 6px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(30,58,138,0.08);
}
.res-accordion__head {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: linear-gradient(135deg, rgba(30,58,138,0.06), rgba(236,72,153,0.04));
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--primary-color, #1E3A8A);
  cursor: pointer;
  gap: 10px;
  transition: background 0.2s, transform 0.15s;
}
.res-accordion__head:hover {
  background: rgba(96,165,250,0.1);
  transform: translateX(2px);
}
.res-accordion__count {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted, #57606a);
  margin-left: auto;
}
.res-accordion__icon {
  font-size: 0.7rem;
  transition: transform 0.3s ease;
  color: var(--muted, #57606a);
}
.res-accordion.open .res-accordion__icon {
  transform: rotate(180deg);
}
.res-accordion__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0 8px;
}
.res-accordion.open .res-accordion__body {
  max-height: 3000px;
  padding: 6px 8px 10px;
}

/* ---------- Legend ---------- */
.res-legend {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 8px 16px;
  margin-bottom: 10px;
  background: linear-gradient(135deg, rgba(30,58,138,0.06), rgba(236,72,153,0.04));
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted, #57606a);
  flex-wrap: wrap;
}
.res-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.res-legend i {
  font-size: 0.72rem;
  color: var(--primary-color, #1E3A8A);
}

/* ---------- Results section ---------- */
.results-section {
  width: 100%;
  padding: 24px 0;
  box-sizing: border-box;
}

/* ---------- Mobile card layout ---------- */
@media (max-width: 767px) {
  .results-section {
    padding: 12px 0;
  }
  .results-modern {
    margin: 0;
  }

  /* ---- Card: flex-wrap, 2 rows ---- */
  .res-card {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center;
    gap: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 10px 12px !important;
    border-left-width: 3px;
    border-radius: 8px;
    margin-bottom: 5px;
  }

  /* Row 1: date (left) + badge (right) */
  .res-card__date {
    order: 1;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: none !important;
    text-align: left !important;
    font-size: 13px !important;
    font-weight: 700;
    line-height: 1.3;
    color: var(--primary-color, #1E3A8A);
    white-space: nowrap !important;
    padding-bottom: 4px;
  }
  .res-card__year {
    font-size: 11px;
    font-weight: 500;
    opacity: 0.6;
    margin-left: 3px;
  }
  .res-card__pos {
    order: 2;
    flex: 0 0 auto !important;
    padding-bottom: 4px;
  }

  /* Row 2: body takes full width */
  .res-card__body {
    order: 3;
    flex: 0 0 100% !important;
    width: 100% !important;
    min-width: unset !important;
    overflow: visible !important;
  }
  .res-card__name {
    font-size: 14px !important;
    font-weight: 700;
    line-height: 1.35;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    overflow-wrap: break-word;
    word-break: normal;
    color: #1b1b3a;
    margin-bottom: 2px;
  }
  .res-card__loc {
    font-size: 13px !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    color: var(--muted, #57606a);
  }
  .res-card__loc i {
    font-size: 10px;
    margin-right: 2px;
  }
  .res-card__cat {
    display: inline-block;
    font-size: 11px !important;
    padding: 1px 8px;
    margin-top: 4px;
    white-space: normal !important;
  }

  /* Badge */
  .res-badge {
    min-width: 30px;
    height: 30px;
    font-size: 13px !important;
    border-radius: 50%;
  }

  /* Legend */
  .res-legend {
    gap: 8px;
    padding: 6px 10px;
    font-size: 12px !important;
    margin-bottom: 6px;
  }
  .res-legend i {
    font-size: 11px !important;
  }
}

/* Extra small devices (< 480px) */
@media (max-width: 480px) {
  .container {
    padding-right: 12px;
    padding-left: 12px;
  }

  .mt-5 {
    margin-top: 1rem !important;
  }

  .intro-banner {
    padding: 40px 16px 24px;
  }

  .intro-banner h1 {
    font-size: 1.5rem;
  }

  .intro-banner p {
    font-size: 0.95rem;
  }

  .profile-card {
    border-radius: 8px;
    margin-bottom: 2rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .bio {
    font-size: 0.85rem;
  }

  .results-section {
    padding: 20px 0;
  }
}

