/* Header adjustment for fixed menu - match subpage style */
#header {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999 !important;
  background: linear-gradient(135deg, #8a2be2 0%, #4f9ee8 100%);
  box-shadow: none;
  transition: all 0.5s;
}

#header .header-wrapper {
  position: relative;
  z-index: 10000 !important;
}

#header h1 {
  font-size: 24px;
  margin: 0;
  font-weight: 700;
  color: var(--heading-color);
}

#header .navmenu {
  position: relative;
  z-index: 10001 !important;
}

#header .navmenu ul li a {
  color: #fff !important;
  font-weight: 500;
}

/* Ensure dropdown menus appear above hero content */
#header .navmenu .dropdown ul {
  z-index: 10005 !important;
  background: #fff !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
}

/* Dropdown menu text color - dark on white background */
#header .navmenu .dropdown ul li a {
  color: #333 !important;
}

/* Header scroll effect - purple background on scroll */
.scrolled #header {
  background: rgb(113 92 229 / 90%) !important;
  box-shadow: 0px 0 18px rgba(0, 0, 0, 0.1);
}

/* Main Container */
.main-container {
  width: 100%;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  padding-top: 80px; /* Space for fixed header */
}

/* Hero Section */
.hero-section {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 260px); /* Increased reduction to fully show hosts.png without scroll */
  overflow: hidden;
  padding: 60px 0 0 0;
  z-index: 1; /* Lower than header to prevent covering dropdowns */
}

/* Animated Background */
.animated-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background-image: url('../assets/img/bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

/* Remove line patterns since we're using bg.png */

/* Additional floating shapes for depth */
.hero-section::after {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(107, 70, 193, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  top: -200px;
  left: -200px;
  filter: blur(100px);
  opacity: 0.5;
  animation: float 20s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

/* Hero Content */
.hero-content {
  position: relative;
  width: 100%;
  height: calc(100vh - 260px); /* Match parent height */
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 60px;
  display: flex;
  justify-content: space-between;
  gap: 60px;
  z-index: 1; /* Lower than header dropdowns */
}

/* Force all hero elements to stay below mobile menu */
.mobile-nav-active .hero-content,
.mobile-nav-active .hero-content * {
  z-index: 1 !important;
}

/* Content Left */
.content-left {
  flex: 1;
  max-width: 600px;
  display: flex;
  align-items: center; /* Center vertically */
  justify-content: flex-start;
}

/* Title Wrapper */
.title-wrapper {
  position: relative;
}

/* Hero Title Wrapper */
.hero-title-wrapper {
  position: relative;
}

/* Title Images */
.title-image {
  margin-bottom: 20px;
}

.subtitle-img img {
  height: auto;
  max-width: 100%;
  width: auto;
  max-height: 35px;
  opacity: 0;
  animation: fadeInUp 0.6s ease-out forwards;
}

.title-images-row {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
}

.title-img {
  height: auto;
  width: auto;
  max-width: 100%;
  opacity: 0;
  max-height: 67px;
  animation: fadeInUp 0.6s ease-out forwards;
}

.title-images-row:first-of-type .title-img {
  max-height: 65px;
  width: auto;
  max-width: 100%;
}

.title-images-row:nth-of-type(2) .title-img:first-child {
  max-height: 53px;
  width: auto;
  max-width: 100%;
}

.year-img {
  max-height: 52px !important;
  width: auto;
  max-width: 100%;
}

.event-info-images {
  margin-top: 30px;
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.info-img {
  max-width: 320px;
  width: auto;
  height: auto;
  opacity: 0;
  animation: fadeInUp 0.6s ease-out forwards;
}

/* Dynamic Animation Delays */
[data-delay='100'] {
  animation-delay: 0.1s;
}
[data-delay='200'] {
  animation-delay: 0.2s;
}
[data-delay='300'] {
  animation-delay: 0.3s;
}
[data-delay='400'] {
  animation-delay: 0.4s;
}
[data-delay='500'] {
  animation-delay: 0.5s;
}
[data-delay='600'] {
  animation-delay: 0.6s;
}
[data-delay='700'] {
  animation-delay: 0.7s;
}
[data-delay='800'] {
  animation-delay: 0.8s;
}

/* Content Right - Visual */
.content-right {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end; /* Align visual to bottom */
  position: relative;
  padding-bottom: 0; /* Remove padding to maximize space */
}

.visual-wrapper {
  position: relative;
  width: 100%;
  max-width: 500px;
}

.main-visual {
  width: 100%;
  height: auto;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 20px 40px rgba(107, 70, 193, 0.15));
  animation: slideUpFromBottom 1.2s ease-out;
}

/* Ensure visual elements stay behind menu on mobile */
.mobile-nav-active .main-visual,
.mobile-nav-active .visual-wrapper,
.mobile-nav-active .visual-wrapper * {
  z-index: 1 !important;
}

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

.visual-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, rgba(107, 70, 193, 0.2) 0%, transparent 70%);
  filter: blur(60px);
  z-index: 1;
  animation: pulse 4s ease-in-out infinite;
}

/* Bottom Sponsors */
.bottom-sponsors {
  background-color: #fff;
  padding: 15px 0;
  width: 100%;
  margin: 0;
  position: relative;
}

.sponsors-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 60px;
  text-align: center;
}

.sponsor-logo {
  height: 40px;
  width: auto;
  opacity: 0.9;
}

/* Animations */
@keyframes slideInFromBottom {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.3;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(1.1);
  }
}

/* Text Animation on Load */
.title-line .highlight {
  opacity: 0;
  animation: fadeInUp 0.8s ease-out forwards;
}

.title-line:nth-child(1) .highlight {
  animation-delay: 0.2s;
}

.title-line:nth-child(2) .highlight {
  animation-delay: 0.3s;
}

.title-line:nth-child(3) span {
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 0.4s forwards;
}

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

/* Mobile Nav Active Styles - Outside media query for global application */
.mobile-nav-active .navmenu {
  z-index: 999999 !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100vh !important;
  background: rgba(33, 37, 41, 0.8) !important; /* Changed to match subpage */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow-y: auto !important;
}

/* Ensure main content stays behind menu */
.mobile-nav-active .main-container,
.mobile-nav-active .hero-section,
.mobile-nav-active main,
.mobile-nav-active .hero-section *,
.mobile-nav-active .main-container *,
.mobile-nav-active main *,
.mobile-nav-active img,
.mobile-nav-active .title-img,
.mobile-nav-active .info-img,
.mobile-nav-active .subtitle-img {
  z-index: 1 !important;
  position: relative !important;
}

.mobile-nav-active .navmenu > ul > li {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.mobile-nav-active .navmenu ul li a {
  color: #ffffff !important; /* White text on dark background */
  font-size: 18px !important;
  padding: 15px 20px !important;
  display: block !important;
  text-decoration: none !important;
}

/* Mobile submenu styles */
.mobile-nav-active .navmenu .dropdown > ul {
  display: none !important; /* Changed from block to none - hidden by default */
  position: static !important;
  background: rgba(0, 0, 0, 0.02) !important;
  padding: 0 !important;
  margin: 0 !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Active state - show dropdown when JavaScript toggles the active class */
.mobile-nav-active .navmenu .dropdown.active > ul {
  display: block !important;
}

/* Mobile dropdown toggle arrow */
.mobile-nav-active .navmenu .dropdown > a {
  position: relative;
  padding-right: 35px !important;
  cursor: pointer;
}

.mobile-nav-active .navmenu .dropdown > a::after {
  content: '\F282';
  font-family: 'bootstrap-icons';
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  transition: transform 0.3s ease;
  pointer-events: none;
}

.mobile-nav-active .navmenu .dropdown.active > a::after {
  transform: translateY(-50%) rotate(180deg);
}

.mobile-nav-active .navmenu .dropdown ul li {
  border-bottom: none !important;
}

.mobile-nav-active .navmenu .dropdown ul li a {
  font-size: 16px !important;
  color: #cccccc !important;
  padding-left: 40px !important;
}

.mobile-nav-active .mobile-nav-toggle {
  z-index: 1000000 !important;
  color: #ffffff !important;
  position: fixed !important;
  top: 20px !important;
  right: 20px !important;
  font-size: 32px !important;
}

/* Mobile Menu Button Fix */
@media (max-width: 1199px) {
  .mobile-nav-toggle {
    display: block !important;
    position: relative;
    z-index: 10002 !important;
    color: #ffffff !important;
    font-size: 28px;
    cursor: pointer;
    margin-left: 15px;
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .hero-content {
    flex-direction: column;
    padding: 40px 30px;
    gap: 40px;
  }

  .content-left {
    max-width: 100%;
    text-align: center;
  }

  .content-right {
    width: 100%;
    justify-content: center;
  }

  .visual-wrapper {
    max-width: 400px;
  }

  .event-info {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  #header .navmenu ul li a {
    color: #000 !important;
    font-weight: 500;
  }
  .hero-section {
    min-height: 100vh;
    padding: 20px 0;
  }

  .hero-content {
    padding: 20px;
    height: auto;
    min-height: calc(100vh - 100px);
  }

  .content-left {
    width: 100%;
    max-width: 100%;
    padding: 0 10px;
  }

  .hero-title-wrapper {
    width: 100%;
    max-width: 100%;
  }

  .subtitle-img img {
    max-height: 25px;
    width: auto;
  }
  .title-image {
    margin-bottom: 10px;
  }
  .title-images-row {
    gap: 10px;
    flex-wrap: nowrap;
    justify-content: center;
    margin-bottom: 0;
  }

  .title-images-row img {
    max-width: 80%;
    height: auto;
  }

  .title-images-row:first-of-type .title-img {
    max-height: 45px;
    max-width: 80%;
  }

  .title-images-row:nth-of-type(2) .title-img:first-child {
    max-height: 40px;
    max-width: 70%;
  }

  .year-img {
    max-height: 40px !important;
    max-width: 35% !important;
  }

  .event-info-images {
    align-items: center;
    padding: 10px;
  }

  .info-img {
    max-height: 50px;
    max-width: 80%;
    width: auto;
  }

  .subtitle {
    font-size: 14px;
  }

  .title-line .highlight {
    font-size: clamp(32px, 8vw, 48px);
  }

  .title-line.year span {
    font-size: clamp(48px, 12vw, 80px);
  }

  .content-right {
    width: 100%;
    padding: 20px 10px;
    justify-content: center;
    align-items: center;
  }

  .visual-wrapper {
    max-width: 90vw;
    width: 90%;
  }

  .main-visual {
    width: 100%;
    height: auto;
  }

  .event-info {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .info-divider {
    display: none;
  }

  .info-date .date,
  .info-venue .venue-name {
    font-size: 18px;
  }

  .info-date .time,
  .info-venue .venue-hall {
    font-size: 14px;
  }

  .sponsors-wrapper {
    padding: 0 20px;
    text-align: center;
  }

  .sponsor-logo {
    width: 100%;
    height: auto;
  }
  .footer {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .hero-content {
    padding: 15px;
    gap: 30px;
  }

  .content-left {
    padding: 0 5px;
  }

  .title-images-row img {
    max-width: 85%;
  }

  .title-images-row:first-of-type .title-img {
    max-height: 40px;
    max-width: 75%;
  }

  .title-images-row:nth-of-type(2) .title-img:first-child {
    max-height: 35px;
    max-width: 65%;
  }

  .year-img {
    max-height: 35px !important;
    max-width: 30% !important;
  }

  .info-img {
    max-width: 75%;
  }

  .title-line .highlight {
    font-size: 28px;
    letter-spacing: -1px;
  }

  .title-line.year span {
    font-size: 48px;
    letter-spacing: -2px;
  }

  .visual-wrapper {
    max-width: 85vw;
    width: 85%;
  }

  .sponsors-wrapper {
    padding: 10px;
  }
}

/* Height-based responsive design for vertical space constraints */
@media (max-height: 920px) {
  .hero-section {
    min-height: calc(100vh - 200px);
  }

  .hero-content {
    height: calc(100vh - 200px);
    padding: 30px 60px;
    gap: 40px;
  }

  .subtitle-img img {
    max-height: 28px;
  }

  .title-img {
    max-height: 54px;
  }

  .title-images-row:first-of-type .title-img {
    max-height: 52px;
  }

  .title-images-row:nth-of-type(2) .title-img:first-child {
    max-height: 42px;
  }

  .year-img {
    max-height: 42px !important;
  }

  .info-img {
    max-width: 280px;
  }

  .visual-wrapper {
    max-width: 420px;
  }

  .event-info-images {
    margin-top: 20px;
    padding-top: 15px;
  }
}

@media (max-height: 768px) {
  .hero-section {
    min-height: calc(100vh - 150px);
  }

  .hero-content {
    height: calc(100vh - 150px);
    padding: 20px 40px;
    gap: 30px;
  }

  .subtitle-img img {
    max-height: 24px;
  }

  .title-img {
    max-height: 47px;
  }

  .title-images-row:first-of-type .title-img {
    max-height: 45px;
  }

  .title-images-row:nth-of-type(2) .title-img:first-child {
    max-height: 37px;
  }

  .year-img {
    max-height: 36px !important;
  }

  .info-img {
    max-width: 240px;
  }

  .visual-wrapper {
    max-width: 350px;
  }

  .event-info-images {
    margin-top: 15px;
    padding-top: 10px;
    gap: 8px;
  }

  .title-images-row {
    margin-bottom: 10px;
  }
}

@media (max-height: 640px) {
  .hero-section {
    min-height: calc(100vh - 120px);
  }

  .hero-content {
    height: calc(100vh - 120px);
    padding: 15px 30px;
    gap: 20px;
  }

  .subtitle-img img {
    max-height: 20px;
  }

  .title-img {
    max-height: 40px;
  }

  .title-images-row:first-of-type .title-img {
    max-height: 39px;
  }

  .title-images-row:nth-of-type(2) .title-img:first-child {
    max-height: 32px;
  }

  .year-img {
    max-height: 31px !important;
  }

  .info-img {
    max-width: 200px;
  }

  .visual-wrapper {
    max-width: 280px;
  }

  .event-info-images {
    margin-top: 10px;
    padding-top: 8px;
    gap: 5px;
  }

  .title-images-row {
    margin-bottom: 8px;
  }

  .title-image {
    margin-bottom: 12px;
  }
}
