@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Barlow:wght@300;400;500;600;700&display=swap');

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: hsl(213, 80%, 50%);
  --primary-fg: hsl(0, 0%, 100%);
  --secondary: hsl(215, 28%, 17%);
  --secondary-fg: hsl(0, 0%, 100%);
  --accent: hsl(35, 100%, 55%);
  --bg: hsl(0, 0%, 100%);
  --fg: hsl(215, 28%, 17%);
  --muted: hsl(215, 14%, 50%);
  --nav-bg: hsl(215, 28%, 12%);
  --section-dark: hsl(215, 28%, 14%);
  --card-dark: hsl(215, 28%, 18%);
  --border-dark: hsl(215, 20%, 25%);
  --text-light: hsl(210, 20%, 85%);
  --text-lighter: hsl(210, 10%, 70%);
  --radius: 0.5rem;
  --transition: all 0.3s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Barlow', sans-serif;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.heading {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Scroll animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* NAV */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(18, 24, 33, 0.95);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.nav-logo {
  display: flex;
  align-items: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  color: #fff;
  letter-spacing: 0.05em;
  line-height: 1;
}

.nav-logo img {
  height: 50px;
  width: auto;
  margin-right: 12px;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
}

.nav-logo span {
  color: var(--primary);
  margin-left: 8px;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-light);
  transition: var(--transition);
  position: relative;
  padding: 0.5rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: #fff;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-icons {
  display: flex;
  gap: 1.2rem;
  align-items: center;
}

.nav-icons a {
  color: var(--text-light);
  font-size: 1.1rem;
  transition: var(--transition);
}

.nav-icons a:hover {
  color: var(--primary);
  transform: translateY(-2px);
}

.hamburger {
  display: none;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.hamburger:hover {
  background: rgba(255, 255, 255, 0.2);
}

.mobile-menu {
  display: none;
  position: absolute;
  top: 80px;
  left: 0;
  right: 0;
  background: var(--nav-bg);
  padding: 1rem 2rem;
  border-bottom: 3px solid var(--primary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.mobile-menu.active {
  display: block;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-menu a {
  display: block;
  padding: 1rem 0;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-light);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition);
}

.mobile-menu a:hover {
  color: var(--primary);
  padding-left: 10px;
}

.mobile-menu a:last-child {
  border-bottom: none;
}

@media(max-width:1100px) {
  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .nav-logo {
    font-size: 1.4rem;
  }

  .nav-logo img {
    height: 40px;
  }
}

@media(max-width:768px) {
  .nav-icons {
    display: none;
  }
  
  .navbar .container {
    height: 70px;
  }
  
  .mobile-menu {
    top: 70px;
  }
}

/* HERO */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, hsla(215, 28%, 10%, 0.4), hsla(215, 28%, 10%, 0.7));
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 1rem;
  max-width: 800px;
  animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  color: #fff;
  line-height: 1;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-light);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  padding: 0.85rem 2.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  display: inline-block;
}

.btn-primary:hover {
  background: hsl(213, 80%, 45%);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(41, 128, 237, 0.3);
}

.btn-outline {
  border: 2px solid #fff;
  color: #fff;
  padding: 0.85rem 2.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  transition: var(--transition);
  display: inline-block;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

@media(max-width:768px) {
  .hero {
    min-height: 500px;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn-primary,
  .btn-outline {
    width: 100%;
    max-width: 300px;
    text-align: center;
  }
}

@media(max-width:480px) {
  .hero {
    min-height: 450px;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
}

/* FEATURES */
.features {
  padding: 5rem 0;
  background: var(--secondary);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: var(--transition);
  cursor: pointer;
}

.feature-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  transform: translateY(-5px);
}

.feature-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: hsla(213, 80%, 50%, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--primary);
  transition: var(--transition);
}

.feature-card:hover .feature-icon {
  background: var(--primary);
  color: #fff;
  transform: scale(1.1);
}

.feature-card h3 {
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
}

.feature-card p {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

.feature-card .link {
  display: inline-block;
  margin-top: 1.25rem;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.feature-card .link:hover {
  text-decoration: underline;
}

@media(max-width:1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media(max-width:600px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .features {
    padding: 3rem 0;
  }
}

/* NEWS */
.news {
  padding: 5rem 0;
}

.news-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.news-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.news-header a {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.news-header a:hover {
  text-decoration: underline;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.news-card {
  cursor: pointer;
  transition: var(--transition);
}

.news-card:hover {
  transform: translateY(-5px);
}

.news-card .img-wrap {
  overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.news-card img {
  width: 100%;
  height: 224px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.news-card:hover img {
  transform: scale(1.05);
}

.news-card time {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.news-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0.5rem 0;
  line-height: 1.3;
  transition: color 0.2s;
}

.news-card:hover h3 {
  color: var(--primary);
}

.news-card p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
}

.news-card .link {
  display: inline-block;
  margin-top: 0.75rem;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media(max-width:1024px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media(max-width:768px) {
  .news-grid {
    grid-template-columns: 1fr;
  }
  
  .news {
    padding: 3rem 0;
  }
  
  .news-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* CHAMPIONSHIPS */
.championships {
  padding: 5rem 0;
  background: var(--section-dark);
}

.championships h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  color: #fff;
  text-align: center;
  margin-bottom: 3rem;
}

.champ-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.champ-card {
  border: 1px solid var(--border-dark);
  background: var(--card-dark);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
}

.champ-card:hover {
  border-color: var(--primary);
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.champ-badge {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: hsla(213, 80%, 50%, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  color: var(--primary);
  transition: var(--transition);
}

.champ-card:hover .champ-badge {
  background: var(--primary);
  color: #fff;
  transform: scale(1.1);
}

.champ-card h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-light);
  line-height: 1.4;
}

.champ-card .link {
  display: inline-block;
  margin-top: 0.75rem;
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.circuits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.circuit-card {
  border: 1px solid var(--border-dark);
  background: var(--card-dark);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
}

.circuit-card:hover {
  border-color: var(--primary);
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.circuit-card h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-light);
}

@media(max-width:1024px) {
  .champ-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media(max-width:600px) {
  .champ-grid {
    grid-template-columns: 1fr;
  }

  .circuits-grid {
    grid-template-columns: 1fr;
  }
  
  .championships {
    padding: 3rem 0;
  }
}

/* FOOTER */
.footer {
  background: var(--secondary);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem;
}

.footer h3 {
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 1rem;
}

.footer h3 span {
  color: var(--primary);
}

.footer .desc {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-lighter);
}

.footer h4 {
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
  margin-bottom: 1rem;
}

.footer ul {
  list-style: none;
}

.footer ul li {
  margin-bottom: 0.5rem;
}

.footer ul a {
  font-size: 0.875rem;
  color: var(--text-lighter);
  transition: var(--transition);
}

.footer ul a:hover {
  color: var(--primary);
  padding-left: 5px;
}

.social-links {
  display: flex;
  gap: 0.75rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: hsla(213, 80%, 50%, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.1rem;
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-3px);
}

.footer-bottom {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid hsla(0, 0%, 100%, 0.1);
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
}

@media(max-width:1024px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media(max-width:600px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .footer {
    padding: 3rem 0 1.5rem;
  }
}

/* Contact Section */
.contact-section {
  background: var(--bg);
}

.contact-info-card {
  background: #fff;
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  margin-bottom: 2rem;
}

.contact-form {
  background: #fff;
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--fg);
}

.form-control {
  width: 100%;
  padding: 0.85rem;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  font-family: inherit;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(41, 128, 237, 0.1);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

@media(max-width:768px) {
  .contact-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Gallery improvements */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  color: #fff;
  padding: 1.5rem 1rem 1rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-caption {
  transform: translateY(0);
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 99;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: hsl(213, 80%, 45%);
  transform: translateY(-5px);
}

/* Preloader */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, hsl(215, 28%, 12%) 0%, hsl(215, 28%, 18%) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.preloader-content {
  text-align: center;
}

.coin-container {
  width: 120px;
  height: 120px;
  perspective: 1000px;
  margin: 0 auto 2rem;
}

.coin {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  animation: coinFlip 1.5s ease-in-out infinite;
}

.coin-face {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 0 30px rgba(41, 128, 237, 0.5),
    0 0 60px rgba(41, 128, 237, 0.3),
    inset 0 0 30px rgba(255, 255, 255, 0.1);
  border: 3px solid rgba(255, 255, 255, 0.2);
}

.coin-front {
  background: linear-gradient(135deg, hsl(213, 80%, 50%) 0%, hsl(213, 80%, 40%) 100%);
}

.coin-back {
  background: linear-gradient(135deg, hsl(213, 80%, 45%) 0%, hsl(213, 80%, 35%) 100%);
  transform: rotateY(180deg);
}

.coin-face img {
  width: 70%;
  height: 70%;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.coin-edge {
  position: absolute;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.coin-edge::before,
.coin-edge::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, hsl(213, 80%, 45%) 0%, hsl(213, 80%, 35%) 100%);
}

.coin-edge::before {
  transform: rotateY(90deg) translateZ(10px);
  width: 20px;
  left: 50%;
  margin-left: -10px;
}

.coin-edge::after {
  transform: rotateY(-90deg) translateZ(10px);
  width: 20px;
  left: 50%;
  margin-left: -10px;
}

@keyframes coinFlip {
  0% {
    transform: rotateY(0deg) rotateX(10deg);
  }
  25% {
    transform: rotateY(90deg) rotateX(-5deg);
  }
  50% {
    transform: rotateY(180deg) rotateX(10deg);
  }
  75% {
    transform: rotateY(270deg) rotateX(-5deg);
  }
  100% {
    transform: rotateY(360deg) rotateX(10deg);
  }
}

.preloader-text {
  color: #fff;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .coin-container {
    width: 90px;
    height: 90px;
  }
  
  .preloader-text {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .coin-container {
    width: 70px;
    height: 70px;
  }
  
  .preloader-text {
    font-size: 1rem;
  }
}

/* Loading spinner */
.spinner {
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top: 3px solid var(--primary);
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
