/* Trent Bridge - Roundup Section Styles */

/* Color Variables */
:root {
  /* Yellow C */
  --yellow-c: #ffe600;
  --yellow-rgb: 255, 230, 0;

  /* PMS 2028 C (Orange/Red) */
  --orange: #f53c00;
  --orange-rgb: 245, 60, 0;

  /* White */
  --white: #ffffff;
  --white-rgb: 255, 255, 255;
  /* black */
  --black: #000000;
  --black-rgb: 0, 0, 0;
}

/* Header Styles */
.site-header {
  background: var(--yellow-c);
  padding: 20px 0;
  /* box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); */
}

.site-header .header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Header Navigation */
.header-nav {
  display: flex;
  align-items: center;
}

.header-nav .nav-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 8px;
}

.header-nav .nav-list li {
  position: relative;
}

.header-nav .nav-list li:not(:last-child)::after {
  content: "|";
  position: absolute;
  right: -8px;
  color: var(--black);
  opacity: 0.5;
}

.header-nav .nav-list a {
  color: var(--black);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 12px;
  transition: color 0.3s ease;
}

.header-nav .nav-list a:hover {
  color: var(--orange);
}

.site-header .logo {
  max-width: 150px;
  height: auto;
  display: block;
}

@media screen and (max-width: 768px) {
  .site-header .header-content {
    flex-direction: column;
    gap: 15px;
  }

  .site-header .logo {
    max-width: 200px;
  }

  .header-nav .nav-list {
    gap: 4px;
  }

  .header-nav .nav-list a {
    font-size: 12px;
    padding: 6px 8px;
  }

  .header-nav .nav-list li:not(:last-child)::after {
    right: -4px;
  }
}

@media screen and (max-width: 480px) {
  .site-header {
    padding: 15px 0;
  }

  .site-header .logo {
    max-width: 150px;
  }
}

/* Section Styling */
.roundup {
  background: var(--black);
  padding-top: 54px;
  padding-bottom: 54px;
}

/* Roundup Variants */
.roundup-white {
  background: var(--white);
}

@media screen and (max-width: 480px) {
  .roundup {
    padding-top: 20px;
    padding-bottom: 20px;
  }
}

/* Thumbnail Base Styles */
.thumbnail {
  border: none;
  border-radius: 0;
  background: none;
  margin: 0;
  padding: 0;
  display: block;
  margin-bottom: 30px;
  outline: none;
}

.thumbnail > img,
.thumbnail a > img {
  width: 100%;
  display: block;
  max-width: 100%;
  height: auto;
}

/* Image Wrapper */
.img-wrapper {
  position: relative;
  overflow: hidden;
}

.img-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

/* Thumbnail Hover Effects */
.thumbnail:hover .thumbnail-link img,
.thumbnail:hover .img-wrapper img {
  transform: scale(1.1);
}

/* Caption Styles */
.thumbnail .caption {
  display: block;
  min-height: 200px;
  position: relative;
  text-align: center;
  margin-right: 8%;
  margin-top: -8%;
  font-size: 16px;
  padding: 26px 20px;
  background: var(--yellow-c);
  color: var(--black);
  line-height: 1;
  text-decoration: none;
  transition: background-color 0.25s, color 0.25s;
}

.thumbnail .caption:hover,
.thumbnail .img-wrapper:hover ~ .caption {
  background-color: var(--orange);
  color: var(--white);
  text-decoration: none;
}

/* Caption Success & Warning - Override to Yellow */
.thumbnail .caption-success,
.thumbnail .caption-warning {
  background-color: var(--yellow-c);
  color: var(--black);
}

.thumbnail .caption-success:hover,
.thumbnail .caption-warning:hover,
.thumbnail .img-wrapper:hover ~ .caption-success,
.thumbnail .img-wrapper:hover ~ .caption-warning {
  background-color: var(--orange);
  color: var(--white);
}

/* Category Label */
.thumbnail .caption .cat {
  margin-bottom: 16px;
  font-size: 12px;
  letter-spacing: 2px;
  line-height: 16px;
  text-transform: uppercase;
  display: block;
}

/* Title */
.thumbnail .caption .title {
  margin: 0;
  font-size: 18px;
  letter-spacing: 2px;
  line-height: 1.2;
  text-transform: uppercase;
}

/* Description Text */
.thumbnail .caption p {
  margin: 20px 0 0;
  line-height: 1.4;
}

/* Large Thumbnail Variant */
.thumbnail-lg .caption {
  font-size: 18px;
}

.thumbnail-lg .caption .title {
  font-size: 22px;
  letter-spacing: 2.93px;
}

.thumbnail-lg .caption .cat {
  font-size: 13px;
}

/* Remove default link decoration */
.thumbnail a {
  text-decoration: none;
  color: inherit;
}

.thumbnail a:hover,
.thumbnail a:focus {
  text-decoration: none;
  color: inherit;
}

/* Responsive adjustments for small thumbnails */
@media screen and (max-width: 768px) {
  .thumbnail .caption {
    min-height: 150px;
    padding: 20px 15px;
    margin-right: 4%;
    margin-top: -4%;
  }
}

@media screen and (max-width: 480px) {
  .thumbnail .caption {
    min-height: 120px;
    font-size: 14px;
    padding: 15px 10px;
  }

  .thumbnail .caption .title {
    font-size: 16px;
  }

  .thumbnail-lg .caption .title {
    font-size: 18px;
  }
}

/* Social Section Styles */
.join-section {
  background: var(--black);
  color: var(--white);
  text-align: center;
  padding-top: 54px;
  padding-bottom: 54px;
}

@media screen and (max-width: 480px) {
  .join-section {
    padding-top: 20px;
    padding-bottom: 20px;
  }
}

.join-section .container > .title {
  color: var(--yellow-c);
  font-size: 36px;
  letter-spacing: 6px;
  margin: 0 0 30px;
  line-height: 1.2;
  text-transform: uppercase;
}

@media screen and (max-width: 768px) {
  .join-section .container > .title {
    font-size: 32px;
  }
}

@media screen and (max-width: 480px) {
  .join-section .container > .title {
    font-size: 28px;
  }
}

.join-section p {
  max-width: 570px;
  margin: 0 auto 30px;
  font-family: "Merriweather", Georgia, "Times New Roman", Times, serif;
  font-size: 18px;
  color: var(--white);
  letter-spacing: 0;
  line-height: 24px;
}

.join-section .social {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  justify-content: center;
  gap: 12px;
}

.join-section .social li {
  transition: opacity 0.3s ease;
}

.join-section .social:hover li {
  opacity: 0.5;
}

.join-section .social li:hover {
  opacity: 1;
}

.join-section .social a {
  display: block;
  padding: 0.5rem;
  color: var(--white);
  text-decoration: none;
}

.join-section .social a:hover {
  color: var(--white);
}

.join-section .social .icon {
  width: 40px;
  height: 40px;
  transition: transform 0.3s ease;
  fill: currentColor;
}

.join-section .social li:hover .icon {
  transform: scale(1.2);
}

/* Icon Base Styles */
.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  fill: currentColor;
  vertical-align: middle;
}

.icon--facebook {
  width: 0.6em;
}

.icon--linkedin {
  width: 0.9em;
}

@media screen and (max-width: 480px) {
  .join-section .social {
    gap: 8px;
  }

  .join-section .social .icon {
    width: 32px;
    height: 32px;
  }
}

body.yellow {
  background: var(--yellow-c);
}

/* The Hundred Teams Section */
.teams-section {
  background: var(--white);
  padding-top: 54px;
  padding-bottom: 54px;
  text-align: center;
}

@media screen and (max-width: 480px) {
  .teams-section {
    padding-top: 20px;
    padding-bottom: 20px;
  }
}

.teams-section .title {
  color: var(--black);
  font-size: 36px;
  letter-spacing: 6px;
  margin: 0 0 40px;
  line-height: 1.2;
  text-transform: uppercase;
}

@media screen and (max-width: 768px) {
  .teams-section .title {
    font-size: 32px;
    margin-bottom: 30px;
  }
}

@media screen and (max-width: 480px) {
  .teams-section .title {
    font-size: 28px;
    margin-bottom: 20px;
  }
}

.teams-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.team-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  transition: transform 0.3s ease;
  flex: 0 0 calc(12.5% - 20px);
  min-width: 100px;
}

.team-item:hover {
  transform: scale(1.1);
}

/* Highlight Trent Rockets */
.team-item-active {
  position: relative;
}

.team-item-active::after {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% + 20px);
  height: calc(100% + 20px);
  border: 3px solid var(--orange);
  border-radius: 8px;
  pointer-events: none;
}

.team-logo {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

.team-item:hover .team-logo {
  filter: grayscale(0%);
}

.team-logo-single img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Sprite positioning for teams in the sprite image */
.team-logo-sprite {
  background-image: url("https://res.cloudinary.com/trentbridge/image/upload/v1617083755/crests/t100_2021_2x.png");
  background-size: 600% 100%;
  background-repeat: no-repeat;
}

.team-logo-london {
  background-position: 0% 0%;
}

.team-logo-southern {
  background-position: 20% 0%;
}

.team-logo-birmingham {
  background-position: 40% 0%;
}

.team-logo-manchester {
  background-position: 60% 0%;
}

.team-logo-trent {
  background-position: 80% 0%;
}

.team-logo-oval {
  background-position: 100% 0%;
}

.team-name {
  font-size: 12px;
  color: var(--black);
  text-align: center;
  line-height: 1.2;
  display: none;
}

/* Responsive: 4 columns on tablet/mobile */
@media screen and (max-width: 991px) {
  .team-item {
    flex: 0 0 calc(25% - 20px);
    min-width: 80px;
  }

  .team-logo {
    width: 70px;
    height: 70px;
  }
}

@media screen and (max-width: 480px) {
  .teams-grid {
    gap: 15px;
  }

  .team-item {
    flex: 0 0 calc(25% - 15px);
    min-width: 60px;
  }

  .team-logo {
    width: 60px;
    height: 60px;
  }

  .team-item-active::after {
    width: calc(100% + 15px);
    height: calc(100% + 15px);
    border-width: 2px;
  }
}
