/* =========================================================
   UP PRO HANDBALL LEAGUE
   TEAM & SCHEDULE PAGE
   Complete CSS
========================================================= */

/* =========================================================
   ROOT VARIABLES
========================================================= */

:root {
  --primary-orange: #f4511e;
  --orange-light: #ff7043;
  --orange-dark: #d84315;

  --navy: #101828;
  --navy-light: #1d2939;

  --white: #ffffff;
  --light-bg: #f8fafc;
  --card-bg: rgba(255, 255, 255, 0.92);

  --text-dark: #101828;
  --text-medium: #475467;
  --text-light: #667085;

  --border: rgba(16, 24, 40, 0.08);

  --shadow-sm: 0 8px 25px rgba(16, 24, 40, 0.08);
  --shadow-md: 0 15px 40px rgba(16, 24, 40, 0.12);
  --shadow-lg: 0 25px 60px rgba(16, 24, 40, 0.18);

  --radius: 18px;
}


/* =========================================================
   GLOBAL TEAM PAGE
========================================================= */

body {
  background: #f8fafc;
  color: var(--text-dark);
  overflow-x: clip;
}


/* =========================================================
   HERO SECTION
========================================================= */

.teams-hero {
  position: relative;
  min-height: 430px;

  display: flex;
  align-items: center;
  justify-content: center;

  text-align: center;
  overflow: hidden;

  background:
    linear-gradient(
      135deg,
      rgba(10, 20, 35, 0.90),
      rgba(244, 81, 30, 0.78)
    ),
    url("../images/fixtures-banner.jpeg") center/cover no-repeat;

  isolation: isolate;
}


/* Animated background glow */

.teams-hero::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;

  top: -180px;
  left: -120px;

  border-radius: 50%;

  background: rgba(255, 255, 255, 0.10);

  filter: blur(5px);

  animation: heroFloat 7s ease-in-out infinite;
}


.teams-hero::after {
  content: "";
  position: absolute;

  width: 350px;
  height: 350px;

  right: -100px;
  bottom: -160px;

  border-radius: 50%;

  border: 70px solid rgba(255, 255, 255, 0.08);

  animation: heroRotate 15s linear infinite;
}


.teams-hero .container {
  position: relative;
  z-index: 2;

  padding: 80px 20px;
}


.teams-hero h1 {
  margin: 0 0 15px;

  color: #ffffff;

  font-size: clamp(2.5rem, 6vw, 5rem);

  font-weight: 800;

  letter-spacing: -2px;

  text-shadow:
    0 5px 20px rgba(0, 0, 0, 0.25);

  animation: titleReveal 0.9s ease forwards;
}


.teams-hero p {
  max-width: 720px;

  margin: auto;

  color: rgba(255, 255, 255, 0.90);

  font-size: 1.08rem;

  line-height: 1.8;

  animation: paragraphReveal 1s ease 0.2s both;
}


/* =========================================================
   TEAMS SECTION
========================================================= */

.teams-section {
  position: relative;

  padding: 90px 0;

  background:
    linear-gradient(
      rgba(248, 250, 252, 0.94),
      rgba(248, 250, 252, 0.97)
    ),
    url("../images/handball-bg.jpg") center/cover fixed;
}


/* Decorative circles */

.teams-section::before {
  content: "";

  position: absolute;

  width: 250px;
  height: 250px;

  left: -120px;
  top: 80px;

  border-radius: 50%;

  background: rgba(244, 81, 30, 0.08);

  filter: blur(2px);
}


/* =========================================================
   TEAM GRID
========================================================= */

.teams-grid {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 28px;

  position: relative;
  z-index: 2;
}


/* =========================================================
   TEAM CARD
========================================================= */

.team-card {
  position: relative;

  min-height: 270px;

  overflow: hidden;

  border-radius: var(--radius);

  background: var(--card-bg);

  border: 1px solid rgba(255, 255, 255, 0.8);

  box-shadow: var(--shadow-sm);

  backdrop-filter: blur(15px);

  transition:
    transform 0.4s ease,
    box-shadow 0.4s ease,
    border-color 0.4s ease;

  animation: cardReveal 0.7s ease both;
}


.team-card:nth-child(1) {
  animation-delay: 0.05s;
}

.team-card:nth-child(2) {
  animation-delay: 0.10s;
}

.team-card:nth-child(3) {
  animation-delay: 0.15s;
}

.team-card:nth-child(4) {
  animation-delay: 0.20s;
}

.team-card:nth-child(5) {
  animation-delay: 0.25s;
}

.team-card:nth-child(6) {
  animation-delay: 0.30s;
}


.team-card:hover {
  transform: translateY(-12px);

  box-shadow: var(--shadow-lg);

  border-color: rgba(244, 81, 30, 0.35);
}


/* =========================================================
   TEAM COLOR STRIP
========================================================= */

.team-color-strip {
  height: 7px;

  width: 100%;

  background:
    linear-gradient(
      90deg,
      var(--orange-dark),
      var(--primary-orange),
      #ff8a50
    );

  position: relative;
}


.team-color-strip::after {
  content: "";

  position: absolute;

  left: -100%;

  top: 0;

  width: 100%;
  height: 100%;

  background: rgba(255, 255, 255, 0.55);

  transition: left 0.6s ease;
}


.team-card:hover .team-color-strip::after {
  left: 100%;
}


/* =========================================================
   TEAM CARD CONTENT
========================================================= */

.team-card-content {
  padding: 28px 26px 30px;
}


.team-card h3 {
  margin: 0 0 25px;

  font-size: 1.55rem;

  font-weight: 800;

  color: var(--navy);

  position: relative;

  display: inline-block;
}


.team-card h3::after {
  content: "";

  position: absolute;

  left: 0;
  bottom: -8px;

  width: 45px;
  height: 3px;

  border-radius: 10px;

  background: var(--primary-orange);

  transition: width 0.35s ease;
}


.team-card:hover h3::after {
  width: 100%;
}


/* =========================================================
   TOP VIEW SWITCHER TABS (TEAMS vs PLAYER STATS)
========================================================= */

.view-switch-container {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.12);
  padding: 6px;
  border-radius: 40px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  margin-top: 24px;
  backdrop-filter: blur(12px);
  gap: 8px;
}

.view-switch-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  padding: 10px 24px;
  border-radius: 30px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.view-switch-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.view-switch-btn.active {
  background: #ffffff;
  color: var(--primary-orange);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

/* Tab Content toggling */
.tab-content {
  display: none;
  animation: tabFade 0.4s ease;
}

.tab-content.active {
  display: block;
}

@keyframes tabFade {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Team Header Flex inside Card */
.team-header-flex {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.team-card-crest {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  padding: 4px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  border: 2px solid #ffffff;
  flex-shrink: 0;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.team-card-crest svg,
.team-card-crest img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.team-card:hover .team-card-crest {
  transform: scale(1.1) rotate(4deg);
}

.team-title-wrap h3 {
  margin: 0 0 4px !important;
  font-size: 1.3rem !important;
  font-weight: 800;
  color: var(--navy);
}

.team-title-wrap h3::after {
  display: none;
}

.team-city-badge {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-light);
}

.team-view-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  padding: 10px 16px;
  background: rgba(244, 81, 30, 0.08);
  color: var(--primary-orange);
  border: 1px solid rgba(244, 81, 30, 0.2);
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
}

.team-view-btn:hover {
  background: var(--primary-orange);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(244, 81, 30, 0.3);
}

/* =========================================================
   PLAYER STATS / MVP SHOWCASE GRID
========================================================= */
.mvp-showcase-header {
  text-align: center;
  margin-bottom: 40px;
}

.mvp-showcase-header h2 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 8px;
}

.mvp-showcase-header p {
  color: var(--text-light);
  font-size: 1.05rem;
}

.mvp-players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 26px;
}

.mvp-player-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: all 0.35s ease;
  display: flex;
  flex-direction: column;
}

.mvp-player-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
  border-color: rgba(244, 81, 30, 0.4);
}

.mvp-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.mvp-award-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.badge-gold {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.badge-blue {
  background: rgba(14, 165, 233, 0.15);
  color: #0284c7;
  border: 1px solid rgba(14, 165, 233, 0.35);
}

.badge-purple {
  background: rgba(168, 85, 247, 0.15);
  color: #7e22ce;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.badge-green {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.mvp-jersey {
  font-size: 0.85rem;
  font-weight: 900;
  color: var(--primary-orange);
  background: rgba(244, 81, 30, 0.1);
  padding: 2px 8px;
  border-radius: 6px;
}

.mvp-avatar-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.mvp-avatar-circle {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 3px solid;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mvp-player-info {
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.mvp-player-info h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--navy);
  margin: 0 0 3px;
}

.mvp-player-pos {
  font-size: 0.82rem;
  color: var(--text-light);
  font-weight: 600;
  margin-bottom: 12px;
  display: block;
}

.mvp-team-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--navy);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid;
  margin-bottom: 18px;
}

.mvp-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: #f8fafc;
  border-radius: 12px;
  padding: 10px 8px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
}

.mvp-stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-num {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--navy);
}

.stat-lbl {
  font-size: 0.68rem;
  color: var(--text-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.mvp-link-btn {
  margin-top: auto;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-orange);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: gap 0.2s ease;
}

.mvp-link-btn:hover {
  gap: 10px;
}

@media (max-width: 992px) {
  .teams-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .teams-grid {
    grid-template-columns: 1fr;
  }
  .view-switch-btn {
    padding: 8px 16px;
    font-size: 0.85rem;
  }
}


.team-card:hover::before {
  transform: scale(2);

  background: rgba(244, 81, 30, 0.12);
}


/* =========================================================
   START SCHEDULE SECTION
========================================================= */

.start-section {
  position: relative;

  padding: 100px 0;

  background:
    linear-gradient(
      rgba(255, 255, 255, 0.94),
      rgba(255, 255, 255, 0.96)
    ),
    url("../images/handball-bg.jpg") center/cover fixed;

  overflow: hidden;
}


.start-section::before {
  content: "";

  position: absolute;

  width: 300px;
  height: 300px;

  right: -150px;
  top: 50px;

  border-radius: 50%;

  background: rgba(244, 81, 30, 0.08);
}


.start-section h2 {
  position: relative;
  z-index: 2;

  margin-bottom: 70px !important;

  font-weight: 800 !important;

  color: var(--navy) !important;
}


.start-section h2::after {
  content: "";

  display: block;

  width: 60px;
  height: 4px;

  margin: 15px auto 0;

  border-radius: 10px;

  background: var(--primary-orange);
}


/* =========================================================
   TIMELINE
========================================================= */

.timeline {
  position: relative;

  max-width: 900px;

  margin: 0 auto;

  padding: 20px 0;
}


/* Central line */

.timeline::before {
  content: "";

  position: absolute;

  top: 0;
  bottom: 0;

  left: 50%;

  width: 3px;

  transform: translateX(-50%);

  background:
    linear-gradient(
      to bottom,
      transparent,
      var(--primary-orange),
      var(--orange-light),
      transparent
    );
}


/* =========================================================
   TIMELINE ITEM
========================================================= */

.timeline-item {
  position: relative;

  width: 50%;

  padding: 0 45px 55px;

  box-sizing: border-box;
}


.timeline-item:nth-child(odd) {
  left: 0;

  text-align: right;
}


.timeline-item:nth-child(even) {
  left: 50%;

  text-align: left;
}


/* =========================================================
   TIMELINE DOT
========================================================= */

.timeline-dot {
  position: absolute;

  top: 8px;

  width: 18px;
  height: 18px;

  border-radius: 50%;

  background: var(--primary-orange);

  border: 4px solid #ffffff;

  box-shadow:
    0 0 0 4px rgba(244, 81, 30, 0.20),
    0 6px 15px rgba(244, 81, 30, 0.30);

  z-index: 3;

  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}


.timeline-item:nth-child(odd) .timeline-dot {
  right: -9px;
}


.timeline-item:nth-child(even) .timeline-dot {
  left: -9px;
}


.timeline-item:hover .timeline-dot {
  transform: scale(1.35);

  box-shadow:
    0 0 0 8px rgba(244, 81, 30, 0.12),
    0 8px 20px rgba(244, 81, 30, 0.35);
}


/* =========================================================
   TIMELINE CONTENT
========================================================= */

.timeline-content {
  position: relative;

  padding: 25px 27px;

  border-radius: 17px;

  background: rgba(255, 255, 255, 0.92);

  border: 1px solid rgba(16, 24, 40, 0.07);

  box-shadow: var(--shadow-sm);

  transition:
    transform 0.4s ease,
    box-shadow 0.4s ease,
    border-color 0.4s ease;
}


.timeline-content:hover {
  transform: translateY(-7px);

  box-shadow: var(--shadow-md);

  border-color: rgba(244, 81, 30, 0.25);
}


/* =========================================================
   TIMELINE DATE
========================================================= */

.timeline-content > span {
  display: inline-block;

  margin-bottom: 10px;

  padding: 6px 12px;

  border-radius: 30px;

  background: rgba(244, 81, 30, 0.10);

  color: var(--primary-orange);

  font-size: 0.82rem;

  font-weight: 800;

  letter-spacing: 0.4px;
}


/* =========================================================
   TIMELINE HEADING
========================================================= */

.timeline-content h4 {
  margin: 0 0 10px;

  color: var(--navy);

  font-size: 1.18rem;

  font-weight: 800;

  line-height: 1.4;
}


/* =========================================================
   TIMELINE DESCRIPTION
========================================================= */

.timeline-content p {
  margin: 0;

  color: var(--text-medium);

  font-size: 0.94rem;

  line-height: 1.7;
}


/* =========================================================
   CONNECTOR ARROW
========================================================= */

.timeline-item:nth-child(odd) .timeline-content::after {
  content: "";

  position: absolute;

  top: 16px;

  right: -10px;

  width: 20px;
  height: 20px;

  background: #ffffff;

  transform: rotate(45deg);

  border-top: 1px solid rgba(16, 24, 40, 0.07);

  border-right: 1px solid rgba(16, 24, 40, 0.07);
}


.timeline-item:nth-child(even) .timeline-content::after {
  content: "";

  position: absolute;

  top: 16px;

  left: -10px;

  width: 20px;
  height: 20px;

  background: #ffffff;

  transform: rotate(45deg);

  border-left: 1px solid rgba(16, 24, 40, 0.07);

  border-bottom: 1px solid rgba(16, 24, 40, 0.07);
}


/* =========================================================
   SCROLL REVEAL STYLE
========================================================= */

.team-card,
.timeline-content {
  will-change: transform;
}


/* =========================================================
   KEYFRAME ANIMATIONS
========================================================= */

@keyframes titleReveal {
  from {
    opacity: 0;
    transform: translateY(35px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


@keyframes paragraphReveal {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


@keyframes cardReveal {
  from {
    opacity: 0;
    transform: translateY(35px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


@keyframes heroFloat {
  0%,
  100% {
    transform: translate(0, 0);
  }

  50% {
    transform: translate(60px, 35px);
  }
}


@keyframes heroRotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1100px) {

  .teams-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .teams-section {
    padding: 75px 0;
  }

  .start-section {
    padding: 80px 0;
  }

}


/* =========================================================
   SMALL TABLET
========================================================= */

@media (max-width: 768px) {

  .teams-hero {
    min-height: 360px;
  }


  .teams-hero h1 {
    font-size: 3rem;

    letter-spacing: -1px;
  }


  .teams-hero p {
    font-size: 0.98rem;

    line-height: 1.65;
  }


  .teams-grid {
    grid-template-columns: 1fr;

    gap: 22px;
  }


  .team-card {
    min-height: auto;
  }


  .team-card-content {
    padding: 25px 22px;
  }


  /* Timeline becomes left aligned */

  .timeline {
    padding-left: 35px;
  }


  .timeline::before {
    left: 12px;

    transform: none;
  }


  .timeline-item,
  .timeline-item:nth-child(even),
  .timeline-item:nth-child(odd) {
    width: 100%;

    left: 0;

    text-align: left;

    padding:
      0
      0
      35px
      35px;
  }


  .timeline-item:nth-child(odd) .timeline-dot,
  .timeline-item:nth-child(even) .timeline-dot {
    left: 3px;

    right: auto;
  }


  .timeline-item:nth-child(odd) .timeline-content::after,
  .timeline-item:nth-child(even) .timeline-content::after {
    left: -10px;

    right: auto;

    border-left: 1px solid rgba(16, 24, 40, 0.07);

    border-bottom: 1px solid rgba(16, 24, 40, 0.07);

    border-top: none;

    border-right: none;
  }


  .start-section h2 {
    margin-bottom: 50px !important;
  }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 576px) {

  .teams-hero {
    min-height: 320px;
  }


  .teams-hero .container {
    padding: 65px 18px;
  }


  .teams-hero h1 {
    font-size: 2.35rem;

    margin-bottom: 12px;
  }


  .teams-hero p {
    font-size: 0.9rem;

    max-width: 95%;
  }


  .teams-section {
    padding: 60px 15px;
  }


  .team-card {
    border-radius: 15px;
  }


  .team-card-content {
    padding: 22px 18px 25px;
  }


  .team-card h3 {
    font-size: 1.35rem;
  }


  .team-info-list {
    gap: 12px;
  }


  .team-info-list li {
    align-items: flex-start;

    flex-direction: column;

    gap: 3px;

    padding-bottom: 11px;
  }


  .team-info-list li span:last-child {
    text-align: left;

    font-size: 0.88rem;
  }


  .start-section {
    padding: 65px 15px;
  }


  .start-section h2 {
    font-size: 1.65rem !important;

    margin-bottom: 45px !important;
  }


  .timeline {
    padding-left: 30px;
  }


  .timeline::before {
    left: 9px;
  }


  .timeline-item,
  .timeline-item:nth-child(even),
  .timeline-item:nth-child(odd) {
    padding-left: 28px;

    padding-bottom: 28px;
  }


  .timeline-item:nth-child(odd) .timeline-dot,
  .timeline-item:nth-child(even) .timeline-dot {
    left: 0;
  }


  .timeline-dot {
    width: 17px;

    height: 17px;
  }


  .timeline-content {
    padding: 20px 18px;

    border-radius: 14px;
  }


  .timeline-content h4 {
    font-size: 1.05rem;
  }


  .timeline-content p {
    font-size: 0.88rem;

    line-height: 1.6;
  }


  .timeline-content > span {
    font-size: 0.75rem;
  }

}


/* =========================================================
   EXTRA SMALL MOBILE
========================================================= */

@media (max-width: 380px) {

  .teams-hero h1 {
    font-size: 2rem;
  }


  .team-card h3 {
    font-size: 1.2rem;
  }


  .timeline-content {
    padding: 17px 15px;
  }


  .timeline-content h4 {
    font-size: 0.98rem;
  }

}


/* =========================================================
   ACCESSIBILITY
========================================================= */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;

    animation-iteration-count: 1 !important;

    transition-duration: 0.01ms !important;

    scroll-behavior: auto !important;
  }

}


