/* 
  MÁXIMOS JIU-JITSU & DEFESA PESSOAL
  Main Stylesheet
  Theme: Black, White, Red (Martial Arts / High Contrast)
*/

:root {
  /* Main Brand Color - Red */
  --primary-color: #ff4d4d;
  --secondary-color: #111111;
  --text-color: #333333;
  --bg-color: #ffffff;
  --light-gray: #f4f4f4;
  --dark-gray: #000000;
  --white: #ffffff;
  --font-main: 'Poppins', 'Roboto', 'Segoe UI', sans-serif;
  --font-display: 'Oswald', sans-serif;

  /* Link in Bio Identity */
  --dark-gradient: linear-gradient(135deg, #000000 50%, #4a0000 100%);
}

.dark-section {
  background: var(--dark-gradient) !important;
  color: var(--white) !important;
}

.dark-section h2,
.dark-section h3,
.dark-section p {
  color: var(--white) !important;
}

/* =========================================
   RESET & GLOBAL STYLES
   ========================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.3s;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* Utils */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 5px;
  font-weight: bold;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  font-family: var(--font-display);
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--white);
  border: 2px solid var(--primary-color);
}

.btn-primary:hover {
  background-color: #c62828;
  border-color: #c62828;
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border: 2px solid var(--white);
  backdrop-filter: blur(5px);
}

.btn-secondary:hover {
  background-color: var(--white);
  color: #000;
  transform: translateY(-2px);
}

.btn-whatsapp {
  background-color: #25D366;
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  font-size: 0.95rem;
  border-radius: 50px;
  width: 100%;
  max-width: 380px;
  margin-top: 10px;
  box-shadow: 0 10px 20px rgba(37, 211, 102, 0.2);
}

.btn-whatsapp:hover {
  background-color: #128C7E;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp svg {
  width: 24px;
  height: 24px;
}

section {
  padding: 80px 0;
}

h2 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 50px;
  text-transform: uppercase;
  color: var(--secondary-color);
  position: relative;
}

h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background-color: var(--primary-color);
  margin: 10px auto 0;
}

/* =========================================
   HEADER & NAVIGATION
   ========================================= */
header {
  background-color: var(--secondary-color);
  color: var(--white);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.back-icon {
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  transition: transform 0.3s;
}

.back-icon:hover {
  transform: translateX(-3px);
  color: var(--primary-color);
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo-img {
  width: 60px;
  height: auto;
  border-radius: 50%;
  border: 2px solid var(--primary-color);
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: bold;
  text-transform: uppercase;
  line-height: 1.2;
}

.brand-name span {
  color: var(--primary-color);
  display: block;
  font-size: 0.9rem;
}

nav ul {
  display: flex;
  gap: 25px;
  align-items: center;
}

nav a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  text-transform: uppercase;
}

nav a:hover {
  color: var(--primary-color);
}

.btn-nav-cta {
  background-color: var(--primary-color);
  padding: 8px 15px;
  border-radius: 4px;
  font-size: 0.85rem;
}

.btn-nav-cta:hover {
  background-color: #c62828;
  color: var(--white);
}

/* Hamburger & Mobile Menu (Default Hidden) */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  /* Default desktop hidden, but for properties */
  height: 18px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  /* Thinner lines */
  width: 100%;
  background-color: var(--white);
  border-radius: 3px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.account-icon {
  background: none;
  border: none;
  color: var(--white);
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
}

.nav-header-mobile,
.menu-overlay {
  display: none;
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1.5rem;
  overflow: hidden;
  color: #fff;
  background: transparent !important;
  /* Ensure video is visible */
}

/* Hero Video Styling */
.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

/* Dark overlay to ensure text legibility over video */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.9) 100%), var(--dark-gradient);
  opacity: 0.8;
  /* Let video show through slightly more */
  z-index: -1;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-content h1 {
  font-size: 3.5rem;
  text-transform: uppercase;
  margin-bottom: 20px;
  line-height: 1.1;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 40px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 300;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
}

/* =========================================
   SOBRE A ACADEMIA
   ========================================= */
.sobre {
  background-color: var(--white);
}

.sobre-content {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: center;
}

.sobre-text {
  flex: 1;
  min-width: 300px;
}

.sobre-text p {
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.info-list {
  margin-top: 20px;
}

.info-list li {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  font-weight: 500;
}

.info-list li::before {
  content: '✓';
  color: var(--primary-color);
  font-weight: bold;
  margin-right: 10px;
  font-size: 1.2rem;
}

.sobre-img {
  flex: 1;
  min-width: 300px;
}

.sobre-img img {
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* =========================================
   PROFESSOR
   ========================================= */
.professor {
  padding: 80px 0;
}

.professor-card {
  background-color: rgba(255, 255, 255, 0.05);
  /* Very subtle glass effect */
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  max-width: 1000px;
  margin: 0 auto;
  backdrop-filter: blur(10px);
}

@media (min-width: 768px) {
  .professor-card {
    flex-direction: row;
  }
}

.professor-photo {
  flex: 1;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
}

.professor-photo img {
  width: 100%;
  max-width: 320px;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.prof-info {
  flex: 1.5;
  padding: 40px;
}

.prof-info h3 {
  font-size: 2rem;
  margin-bottom: 10px;
  color: var(--white);
}

.prof-info .badges {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.prof-info .badge {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.prof-info p {
  margin-bottom: 20px;
  color: #555;
}

/* =========================================
   HORÁRIOS
   ========================================= */
.horarios {
  background-color: var(--secondary-color);
  color: var(--white);
}

.horarios h2 {
  color: var(--white);
}

.table-wrapper {
  overflow-x: auto;
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
  background-color: var(--dark-gray);
  border-radius: 8px;
  overflow: hidden;
}

.schedule-table th,
.schedule-table td {
  padding: 15px;
  text-align: center;
  border-bottom: 1px solid #333;
}

.schedule-table th {
  background-color: var(--primary-color);
  color: var(--white);
  text-transform: uppercase;
  font-size: 0.9rem;
}

.schedule-table tr:hover {
  background-color: #333;
}

.schedule-table td:first-child {
  font-weight: bold;
  color: var(--primary-color);
}

/* =========================================
   ATLETAS
   ========================================= */
.atletas {
  background-color: var(--white);
}

.atletas-carousel {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 10px 10px 30px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.atletas-carousel::-webkit-scrollbar {
  display: none;
}

.atleta-card {
  flex: 0 0 85%;
  background-color: var(--white);
  border: 1px solid #eee;
  border-radius: 20px;
  padding: 30px 20px;
  text-align: center;
  transition: box-shadow 0.3s, transform 0.3s;
  scroll-snap-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
  .atletas-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    overflow-x: visible;
    padding: 0;
  }

  .atleta-card {
    flex: none;
  }
}

.atleta-card:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transform: translateY(-5px);
  border-color: var(--primary-color);
}

.atleta-photo {
  width: 120px;
  height: 120px;
  margin: 0 auto 15px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--primary-color);
  background-color: var(--light-gray);
}

.atleta-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.atleta-card h3 {
  margin-bottom: 5px;
  color: var(--secondary-color);
}

.atleta-card .grade {
  color: var(--primary-color);
  font-weight: bold;
  font-size: 0.9rem;
  margin-bottom: 15px;
  display: block;
}

.atleta-card ul {
  font-size: 0.9rem;
  color: #666;
}

.atleta-card li {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.3s ease;
  background: rgba(0, 0, 0, 0.03);
}

/* Premium Medal Effects - Automatic Sequence */
.atleta-card.medal-test li {
  position: relative;
  overflow: hidden;
  font-weight: 500;
  color: #111;
  border: 1px solid rgba(255, 77, 77, 0.1);
  /* New Auto Animation */
  animation: auto-medal-highlight 6s infinite ease-in-out;
}

/* Staggered Delays for Sequential Effect (First 6 items) */
.atleta-card.medal-test li:nth-child(1) {
  animation-delay: 0s;
}

.atleta-card.medal-test li:nth-child(2) {
  animation-delay: 1s;
}

.atleta-card.medal-test li:nth-child(3) {
  animation-delay: 2s;
}

.atleta-card.medal-test li:nth-child(4) {
  animation-delay: 3s;
}

.atleta-card.medal-test li:nth-child(5) {
  animation-delay: 4s;
}

.atleta-card.medal-test li:nth-child(6) {
  animation-delay: 5s;
}

@keyframes auto-medal-highlight {

  0%,
  15%,
  100% {
    transform: translateX(0) scale(1);
    background: rgba(0, 0, 0, 0.03);
    box-shadow: none;
  }

  5% {
    transform: translateX(5px) scale(1.02);
    background: rgba(255, 77, 77, 0.08);
    box-shadow: 0 4px 12px rgba(255, 77, 77, 0.15);
  }
}

/* Auto Shimmer Logic */
.atleta-card.medal-test li::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.6),
      transparent);
  transform: skewX(-25deg);
  animation: auto-shimmer 6s infinite ease-in-out;
}

/* Sync shimmer with item animation */
.atleta-card.medal-test li:nth-child(1)::after {
  animation-delay: 0s;
}

.atleta-card.medal-test li:nth-child(2)::after {
  animation-delay: 1s;
}

.atleta-card.medal-test li:nth-child(3)::after {
  animation-delay: 2s;
}

.atleta-card.medal-test li:nth-child(4)::after {
  animation-delay: 3s;
}

.atleta-card.medal-test li:nth-child(5)::after {
  animation-delay: 4s;
}

.atleta-card.medal-test li:nth-child(6)::after {
  animation-delay: 5s;
}

@keyframes auto-shimmer {

  0%,
  15%,
  100% {
    left: -100%;
  }

  5%,
  10% {
    left: 150%;
  }
}

/* Pause on hover to allow focus */
.atleta-card.medal-test li:hover {
  animation-play-state: paused;
  background: rgba(255, 77, 77, 0.15) !important;
  transform: translateX(8px) scale(1.03) !important;
}

.atleta-card.medal-test li:hover::after {
  animation-play-state: paused;
}

/* Gold Glow for 1st place icon */
.atleta-card.medal-test li b {
  filter: drop-shadow(0 0 2px rgba(255, 215, 0, 0.5));
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.atleta-card.medal-test li:hover b {
  filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.8));
  transform: scale(1.2);
}

/* =========================================
   CONTATO
   ========================================= */
.contato {
  padding: 80px 0;
}

.dark-footer-wrapper {
  background: var(--dark-gradient);
  color: var(--white);
}

.dark-footer-wrapper h2 {
  color: var(--white);
}

.contato-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.contato-info,
.contato-form {
  flex: 1;
  min-width: 300px;
}

.contato-info h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: var(--white);
}

.contato-info p {
  color: rgba(255, 255, 255, 0.8);
}

.info-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 20px;
}

.info-item span {
  font-size: 1.5rem;
  margin-right: 15px;
  color: var(--primary-color);
}

.contact-form-group {
  margin-bottom: 15px;
}

.contact-form-group input,
.contact-form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-family: inherit;
}

.contact-form-group textarea {
  height: 120px;
  resize: vertical;
}

.map-responsive {
  margin-top: 30px;
  height: 250px;
  background-color: #ddd;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
}

/* =========================================
   FOOTER
   ========================================= */
footer {
  padding: 20px 0 30px;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  margin-bottom: 20px;
}

.footer-brand .footer-logo {
  font-family: var(--font-display);
  font-size: 1.8rem;
  letter-spacing: 2px;
  color: var(--white);
  margin-bottom: 5px;
}

.footer-brand p {
  color: #888;
  font-size: 0.9rem;
}

.footer-social {
  display: flex;
  gap: 20px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  color: var(--white);
  transition: all 0.3s ease;
}

.footer-social a:hover {
  background-color: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(255, 77, 77, 0.3);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
  color: #666;
}

.developer-credit a {
  color: var(--white);
  opacity: 0.7;
  transition: opacity 0.3s;
}

.developer-credit a:hover {
  opacity: 1;
  color: var(--primary-color);
}

@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
    align-items: center;
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* =========================================
   MEDIA QUERIES
   ========================================= */
@media (max-width: 991px) {
  .hero-content h1 {
    font-size: 2.8rem;
  }
}

/* Mobile Styling (Under 768px as requested) */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
    z-index: 1002;
    width: 24px;
    /* Reduced size per request */
    height: 18px;
    transition: opacity 0.3s;
  }

  /* Hide hamburger when menu is open */
  body.menu-open .menu-toggle {
    display: none;
  }

  /* Mobile Logo Tweaks */
  .logo-img {
    max-height: 40px;
    /* Increased to 40px per user request */
    width: auto;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
  }

  .brand-name {
    font-size: 1rem;
  }

  .header-right .account-icon {
    font-size: 22px;
    /* Consistency with menu */
  }

  .header-right .account-icon svg {
    width: 22px;
    height: 22px;
  }

  /* Premium Floating Navigation Overlay */
  nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1.1);
  }

  nav.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: scale(1);
  }

  nav ul {
    flex-direction: column;
    align-items: center;
    gap: 25px;
    padding: 0;
    width: 100%;
    max-width: 300px;
    text-align: center;
  }

  nav a {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    padding: 10px;
  }

  nav a:hover {
    color: var(--primary-color);
    letter-spacing: 4px;
  }

  .btn-nav-cta {
    background-color: var(--primary-color);
    color: var(--white) !important;
    padding: 15px 40px !important;
    border-radius: 50px;
    margin-top: 10px;
    letter-spacing: 1px !important;
    box-shadow: 0 10px 20px rgba(255, 77, 77, 0.3);
  }

  .btn-nav-cta:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(255, 77, 77, 0.4);
    letter-spacing: 2px !important;
  }

  body.menu-open {
    overflow: hidden;
  }

  /* Responsive Table - Cards on Mobile */
  .schedule-table,
  .schedule-table tbody,
  .schedule-table tr,
  .schedule-table td {
    display: block;
    width: 100%;
  }

  .schedule-table thead {
    display: none;
  }

  .schedule-table tr {
    margin-bottom: 20px;
    border: 1px solid #444;
    border-radius: 8px;
    background-color: var(--dark-gray);
    overflow: hidden;
  }

  .schedule-table td {
    padding: 12px 15px;
    text-align: right;
    position: relative;
    padding-left: 50%;
    border-bottom: 1px solid #333;
  }

  .schedule-table td:last-child {
    border-bottom: none;
  }

  /* Pseudo-element for labels */
  .schedule-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 45%;
    white-space: nowrap;
    text-align: left;
    font-weight: bold;
    color: var(--primary-color);
  }

  /* Highlight the time row (first row of card) */
  .schedule-table td:first-child {
    background-color: #333;
    text-align: center;
    padding-left: 15px;
    /* Reset padding */
    font-weight: bold;
    color: var(--white);
    font-size: 1.1rem;
  }

  .schedule-table td:first-child::before {
    display: none;
    /* Hide label for the main time header of the card */
  }

  .nav-header-mobile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    padding-bottom: 15px;
    margin-bottom: 20px;
    color: var(--white);
  }

  .nav-title-mobile {
    font-family: var(--font-display);
    font-size: 1.2rem;
    text-transform: uppercase;
    color: var(--primary-color);
  }

  .close-menu {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    color: var(--white);
    font-size: 3rem;
    cursor: pointer;
    line-height: 1;
    z-index: 2001;
    transition: transform 0.3s ease;
  }

  .close-menu:hover {
    transform: rotate(90deg);
    color: var(--primary-color);
  }

  /* Overlay - No longer needed as separate div since nav is the overlay */
  .menu-overlay {
    display: none;
  }

  .menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }

  .header-container {
    padding: 0 10px;
  }

  /* Hero adjustments */
  .hero-content h1 {
    font-size: 2.2rem;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .hero-buttons .btn {
    width: 100%;
  }
}