@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700;900&family=Inter:wght@300;400;600&display=swap");

:root {
  --primary-red: #e61e2a;
  --primary-red-glow: rgba(230, 30, 42, 0.4);
  --dark-bg: #050505;
  --dark-surface: #121212;
  --dark-card: #1a1a1a;
  --text-white: #ffffff;
  --text-muted: #b0b0b0;
  --accent-blue: #0088ff;
  --nav-height: 90px;
  --glass-bg: rgba(10, 10, 10, 0.9);
  --transition-smooth: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  --border-glass: 1px solid rgba(255, 255, 255, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--dark-bg);
  color: var(--text-white);
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
.racing-font {
  font-family: "Montserrat", sans-serif;
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: -0.5px;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-smooth);
}

ul {
  list-style: none;
}

/* Base Layout */
.container {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 0 40px;
}

section {
  padding: 120px 0;
  position: relative;
  overflow: hidden;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transition: var(--transition-smooth);
}

.reveal.active {
  opacity: 1;
  animation: fadeInUp 1s forwards;
}

/* Header & Nav - FIXED ALIGNMENT */
header {
  height: var(--nav-height);
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  border-bottom: var(--border-glass);
  display: flex;
  align-items: center;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  z-index: 1001;
}

.logo img {
  height: 60px; /* Aligned with nav-height 90px */
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1); /* Torna a logo escura em branca */
}

.nav-links {
  display: flex;
  gap: 40px;
  align-items: center;
}

.nav-links a {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 1px;
  position: relative;
  padding: 5px 0;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-white);
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-red);
  transition: var(--transition-smooth);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  z-index: 1001;
  padding: 5px;
}

.mobile-menu-btn span {
  display: block;
  width: 30px;
  height: 2px;
  background: var(--text-white);
  transition: var(--transition-smooth);
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--dark-surface);
  min-width: 220px;
  border: var(--border-glass);
  border-top: 3px solid var(--primary-red);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition-smooth);
  padding: 10px 0;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li a {
  padding: 12px 25px;
  display: block;
  color: var(--text-muted);
}

.dropdown-menu li a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--primary-red);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 35px;
  background: var(--primary-red);
  color: var(--text-white);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 1px;
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  clip-path: polygon(10% 0, 100% 0, 90% 100%, 0% 100%);
  box-shadow: 0 4px 15px var(--primary-red-glow);
}

.btn:hover {
  background: #ff2d3a;
  transform: scale(1.05) skewX(-2deg);
  box-shadow: 0 8px 25px var(--primary-red-glow);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary-red);
  box-shadow: none;
}

.btn-outline:hover {
  background: var(--primary-red);
}

/* Hero Section */
.hero {
  height: 100vh;
  background:
    linear-gradient(
      rgba(0, 0, 0, 0.85),
      rgba(0, 0, 0, 0.5),
      rgba(0, 0, 0, 0.85)
    ),
    url("assets/pista.png");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: var(--nav-height);
}

.hero-content h1 {
  font-size: clamp(3rem, 8vw, 5.5rem);
  margin-bottom: 25px;
  line-height: 0.9;
  background: linear-gradient(to bottom, #fff, #888);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content p {
  font-size: clamp(1rem, 3vw, 1.4rem);
  max-width: 900px;
  margin: 0 auto 40px;
  color: var(--text-muted);
  font-weight: 300;
}

/* Modalidades Grid */
.modalidades-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
}

.modalidade-card {
  background: var(--dark-card);
  border: var(--border-glass);
  transition: var(--transition-smooth);
}

.modalidade-card:hover {
  transform: translateY(-15px);
  border-color: var(--primary-red);
}

.modalidade-img {
  height: 250px;
  overflow: hidden;
}

.modalidade-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.modalidade-card:hover .modalidade-img img {
  transform: scale(1.1);
}

.modalidade-info {
  padding: 30px;
}

/* Info Grid (Mission/Vision) */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 60px;
}

.info-box {
  padding: 50px 40px;
  background: var(--dark-surface);
  border-top: 4px solid var(--primary-red);
  transition: var(--transition-smooth);
}

.info-box span {
  font-size: 3rem;
  color: var(--primary-red);
  display: block;
  margin-bottom: 20px;
}

/* Partners */
.partners-grid {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 50px;
  opacity: 0.6;
}

.partner-logo {
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--text-muted);
}

/* Footer */
footer {
  background: #000;
  padding: 100px 0 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 60px;
  margin-bottom: 60px;
}

.footer-logo {
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 20px;
}

.footer-logo span {
  color: var(--primary-red);
}

.footer-link {
  display: block;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.footer-link:hover {
  color: #fff;
  padding-left: 5px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 30px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* RESPONSIVE DESIGN */
@media (max-width: 1024px) {
  .container {
    padding: 0 30px;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 70px;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background: var(--dark-bg);
    flex-direction: column;
    justify-content: center;
    gap: 30px;
    transition: var(--transition-smooth);
    z-index: 1000;
    border-left: var(--border-glass);
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links a {
    font-size: 1.2rem;
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: transparent;
    border: none;
    box-shadow: none;
    padding-left: 20px;
    display: none; /* Toggle this via JS if needed, or just keep flat on mobile */
  }

  .mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  section {
    padding: 80px 0;
  }
}
