/* RESET */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  font-family: 'Montserrat', sans-serif;
  background: #fff;
  color: #000;
  overflow-x: hidden;
  width: 100%;
  scroll-behavior: smooth;
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: rgba(70, 70, 70, 0.15);
  tap-highlight-color: rgba(70, 70, 70, 0.15);
  transition: background-color 0.3s ease, color 0.2s ease;
}

/* NAVBAR */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: clamp(12px, 2vw, 20px);
  background: rgba(255, 255, 255, 0.95);
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1001;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  min-width: 0;
}

.logo img {
  height: clamp(40px, 6vw, 70px);
  width: auto;
  object-fit: contain;
  display: block;
}

.logo-text {
  font-family: 'Anton', sans-serif;
  font-weight: 700;
  font-size: clamp(1.2rem, 2.5vw, 2rem);
  line-height: 1.2;
  color: black;
  margin-left: -5px;
  white-space: nowrap;
}

/* NAV LINKS */
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 20px);
  list-style: none;
}

.nav-links li {
  position: relative;
}

.nav-links li a {
  font-size: clamp(0.8rem, 1.8vw, 1.1rem);
  font-weight: 700;
  text-transform: uppercase;
  padding: 12px;
  color: black;
  position: relative;
  font-family: 'Montserrat', sans-serif;
  -webkit-font-smoothing: antialiased;
  text-shadow: 0.5px 0 0 currentColor;
}

.nav-links li a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 8px;
  height: 2px; width: 100%;
  background: #444;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.nav-links li a:hover::after { transform: scaleX(1); }

/* DROPDOWN (desktop) - FIXED */
.dropdown {
  position: relative;
}

.dropdown-content {
  display: block;
  position: absolute;
  background: #fff;
  min-width: 180px;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  list-style: none;
  padding: 10px 0;
  z-index: 999;
  border: 1px solid #e0e0e0;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none;
}

.dropdown-content li a {
  display: block;
  padding: 12px 20px;
  font-size: 0.95rem;
  color: #000;
  text-align: center;
  transition: all 0.3s ease;
  pointer-events: auto;
}

.dropdown-content li a:hover {
  background: #f5f5f5;
  color: #000;
}

/* Create invisible hover bridge */
.dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 15px;
  background: transparent;
}

.nav-links li.dropdown:hover .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* DROPDOWN ARROW STYLES */
.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dropdown-arrow {
  font-size: 0.7em;
  transition: transform 0.3s ease;
  display: inline-block;
  margin-left: 2px;
}

.nav-links li.dropdown:hover .dropdown-arrow {
  transform: rotate(180deg);
}

/* Point down when dropdown is active/tapped */
.dropdown.active .dropdown-arrow {
  transform: rotate(180deg);
}

/* BURGER MENU */
.burger {
  position: absolute;
  right: clamp(0.8rem, 3vw, 1.2rem);
  top: 50%;
  transform: translateY(-50%);
  width: clamp(36px, 7vw, 64px);
  height: clamp(36px, 7vw, 64px);
  z-index: 1101;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: clamp(4px, 0.9vw, 8px);
  background: transparent;
  border: none;
  cursor: pointer;
}

.burger span {
  width: 100%;
  height: clamp(3px, 0.6vw, 4px);
  background: black;
  border-radius: 2px;
  transition: 0.3s ease;
}

.burger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

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

/* MOBILE NAV */
.mobile-nav {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.97);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  padding: 2rem 1rem;
}
.mobile-nav.open {
  opacity: 1;
  pointer-events: auto;
}
.mobile-nav ul {
  list-style: none;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}
.mobile-nav a {
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  font-weight: 700;
  color: black;
  display: block;
  padding: 10px 0;
  font-family: 'Montserrat', sans-serif;
  -webkit-font-smoothing: antialiased;
  text-shadow: 0.5px 0 0 currentColor;
}

/* MOBILE DROPDOWN STYLES - FIXED */
.mobile-nav .dropdown-content {
  display: none;
  position: static;
  background: transparent;
  box-shadow: none;
  border: none;
  margin: 0;
  padding: 0;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  max-height: none;
  overflow: visible;
}

.mobile-nav .mobile-dropdown.active .dropdown-content {
  display: block;
}

.mobile-nav .dropdown-content li a {
  font-size: 1.2rem;
  color: #000;
  padding: 8px 0;
  opacity: 1;
  visibility: visible;
  font-weight: 600;
}

.mobile-nav .dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.mobile-nav .dropdown-arrow {
  font-size: 0.8em;
  transition: transform 0.3s ease;
}

.mobile-nav .mobile-dropdown.active .dropdown-arrow {
  transform: rotate(180deg);
}

/* PAGE HEADER */
.page-header {
  text-align: center;
  padding: 120px 20px 40px;
}
.page-header h1 {
  font-size: 2.5rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* INSTRUCTORS HERO SECTION - FIXED */
.instructors-hero {
  position: relative;
  height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('../assets/images/instructors/instructors-hero.jpg') center/cover;
  margin-top: 80px;
}

.instructors-hero .hero-content {
  text-align: center;
  color: white;
  max-width: 800px;
  padding: 0 20px;
  z-index: 3;
  position: relative;
}

.instructors-hero h1 {
  font-family: 'Anton', sans-serif;
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}

.instructors-hero p {
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  font-weight: 500;
  max-width: 600px;
  margin: 0 auto;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
}

/* CONTACT HERO */
.contact-hero {
  background: url('../images/dojo-bg.jpg') center/cover;
  color: #000;
  text-align: center;
  padding: 8rem 1rem 4rem;
  margin-top: 70px;
}

.contact-hero h1 {
  font-family: 'Anton', sans-serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1rem;
  letter-spacing: 1px;
}

.contact-hero p {
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto;
  opacity: 0.9;
}

/* GALLERY HERO */
.gallery-hero {
  background: url('../images/dojo-bg.jpg') center/cover;
  color: #000;
  text-align: center;
  padding: 8rem 1rem 4rem;
  margin-top: 70px;
}

.gallery-hero h1 {
  font-family: 'Anton', sans-serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1rem;
  letter-spacing: 1px;
}

.gallery-hero p {
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto;
  opacity: 0.9;
}

/* CONTACT/TIMETABLE SECTION */
.contact-section {
  padding: 4rem 1rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-family: 'Anton', sans-serif;
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: #000;
}

.section-header p {
  font-size: 1.1rem;
  color: #666;
}

/* GALLERY */
.gallery {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-row {
  display: flex;
  gap: 20px;
  align-items: stretch;
  width: 100%;
}

.gallery-row.reverse { flex-direction: row-reverse; }

.gallery-large,
.gallery-small {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.gallery-large .gallery-item {
  flex: 1;
}

.gallery-small .gallery-item {
  flex: 1;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  display: flex;
  aspect-ratio: 16 / 9;
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
  cursor: pointer;
  transition: transform 0.25s ease;
}

.gallery-item:hover img,
.gallery-item:hover video {
  transform: scale(1.03);
}

/* nav arrows */
.tile-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.35);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.18s ease;
  font-size: 18px;
  z-index: 5;
}
.tile-nav.left { left: 12px; }
.tile-nav.right { right: 12px; }

.tile-nav:hover {
  opacity: 0.9;
}

/* LIGHTBOX - COMPLETELY FIXED SCROLLING */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.98);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease;
  z-index: 2000;
  padding: 2rem;
  touch-action: none;
  -webkit-overflow-scrolling: auto;
  overflow: hidden;
}
.lightbox.active {
  opacity: 1;
  visibility: visible;
}
.media-wrap {
  max-width: 95vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.media-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  width: auto;
  height: auto;
  display: block;
}

.close-btn,
.prev-btn,
.next-btn {
  position: absolute;
  background: rgba(0,0,0,0.7);
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s ease;
  z-index: 2200;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.close-btn { 
  top: 20px; 
  right: 20px; 
  font-size: 1.8rem;
  font-weight: bold;
}
.prev-btn { 
  left: 20px; 
  top: 50%; 
  transform: translateY(-50%);
}
.next-btn { 
  right: 20px; 
  top: 50%; 
  transform: translateY(-50%); 
}
.close-btn:hover,
.prev-btn:hover,
.next-btn:hover { 
  background: rgba(0,0,0,0.9);
  transform: scale(1.1);
}

.close-btn:hover {
  transform: scale(1.1);
}

.prev-btn:hover,
.next-btn:hover {
  transform: translateY(-50%) scale(1.1);
}

/* FOOTER - UPDATED LAYOUT */
.footer {
  background:#111;color:#fff;padding:3rem 1.5rem 1.5rem;margin-top:3rem;font-size:0.95rem;
}
.footer-container {
  display:grid;grid-template-columns:1.2fr 1fr 1fr 1fr;gap:2rem;max-width:1200px;margin:0 auto;
}

/* Consistent heading sizes */
.footer h3, .footer h4 {
  font-family:'Anton',sans-serif;
  margin-bottom:0.8rem;
  font-size: 1.3rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer p,.footer a{color:#ccc;line-height:1.6;}
.footer a:hover{color:#b71c1c;}

/* Fixed footer brand alignment */
.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
}
.footer-logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 0.8rem;
  width: 100%;
}
.footer-logo-container img {
  max-height: 3rem;
  width: auto;
}
.footer-logo-container h3 {
  font-size: 1.5rem;
  margin: 0;
}
.footer-brand .tagline {
  font-size: 1.1rem;
  margin-top: 0.5rem;
  color:#bbb;
  width: 100%;
  text-align: center;
}

.footer-links ul{list-style:none;}
.footer-links li{margin-bottom:0.5rem;}
.footer-links a{font-weight:600;}

/* SOCIAL MEDIA SECTION */
.footer-social-media {
  display: flex;
  flex-direction: column;
}
.footer-socials {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.footer-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  color: #fff;
  font-size: 1rem;
}
.footer-socials a:hover {
  background: #b71c1c;
  transform: scale(1.1);
  color: #fff;
}

/* CONTACT SECTION */
.footer-contact p{margin-bottom:0.4rem;}
.footer-contact a{border-bottom:2px solid transparent;transition:border-color 0.3s ease;}
.footer-contact a:hover{border-bottom-color:#b71c1c;}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 0.8rem;
}
.footer-contact-icon {
  color: #b71c1c;
  width: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}

.footer-bottom{
  text-align:center;
  margin-top:2.5rem;
  font-size:0.85rem;
  color:#999;
  border-top:1px solid #333;
  padding-top:1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.creator {
  font-size: 0.8rem;
  color: #777;
}

/* RESPONSIVE STYLES */
@media (max-width: 1024px) {
  .footer-container {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
  
  .footer-brand {
    grid-column: 1 / -1;
    text-align: center;
  }
}

@media (max-width: 900px){
  .footer-container{grid-template-columns:1fr 1fr;}
}

@media (max-width: 768px) {
  .gallery-row { flex-direction: column; }
  .gallery-large,
  .gallery-small { gap: 12px; }
  
  .tile-nav { width: 36px; height: 36px; font-size: 16px; }
  
  /* Improved mobile lightbox */
  .lightbox {
    padding: 1rem;
  }
  
  .media-wrap {
    max-width: 98vw;
    max-height: 85vh;
  }
  
  .close-btn,
  .prev-btn,
  .next-btn {
    width: 44px;
    height: 44px;
    font-size: 1.6rem;
  }
  
  .close-btn { top: 15px; right: 15px; }
  .prev-btn { left: 10px; }
  .next-btn { right: 10px; }
  
  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-contact-item {
    justify-content: center;
    text-align: center;
  }
  
  .footer-socials {
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .footer-contact-item {
    justify-content: center;
    text-align: center;
  }
  
  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-contact-item {
    justify-content: center;
  }
  
  .footer-socials {
    justify-content: center;
  }
  
  .footer-logo-container {
    justify-content: center;
    text-align: center;
  }
}

/* Mobile-specific improvements for lightbox */
@media (max-width: 480px) {
  .lightbox {
    padding: 0.5rem;
  }
  
  .media-wrap {
    max-width: 99vw;
    max-height: 90vh;
  }
  
  .close-btn,
  .prev-btn,
  .next-btn {
    width: 40px;
    height: 40px;
    font-size: 1.4rem;
  }
  
  .close-btn { top: 10px; right: 10px; }
  .prev-btn { left: 8px; }
  .next-btn { right: 8px; }
}

/* Extra small devices */
@media (max-width: 360px) {
  .lightbox {
    padding: 0.25rem;
  }
  
  .media-wrap {
    max-width: 100vw;
    max-height: 95vh;
  }
  
  .close-btn,
  .prev-btn,
  .next-btn {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
  }
}