/* =====================================================
   CSS VARIABLES & THEME CONFIGURATION
   ===================================================== */

:root {
  /* Color Palette */
  --primary: #0071eb;
  --primary-dark: #0056b3;
  --primary-light: #4da3ff;
  --accent: #00a8e1;

  /* Layout */
  --container-max-width: 1200px;
}

/* Dark Theme (Default) */
body,
body.dark-mode {
  --bg-gradient-start: #000000;
  --bg-gradient-mid: #141414;
  --bg-gradient-end: #0a0a0a;
  --text-primary: #ffffff;
  --text-secondary: #808080;
  --card-bg: rgba(255, 255, 255, 0.02);
  --card-bg-hover: rgba(255, 255, 255, 0.05);
  --card-border: rgba(255, 255, 255, 0.05);
  --card-border-hover: rgba(0, 113, 235, 0.3);
  --navbar-bg: rgba(0, 0, 0, 0.75);
  --navbar-bg-scrolled: rgba(0, 0, 0, 0.95);
  --navbar-border: rgba(0, 113, 235, 0.15);
  --dropdown-bg: rgba(10, 10, 10, 0.98);
  --dropdown-border: rgba(0, 113, 235, 0.25);
  --link-bg: rgba(255, 255, 255, 0.03);
  --link-border: rgba(255, 255, 255, 0.06);
  --link-bg-hover: rgba(0, 113, 235, 0.12);
  --link-border-hover: rgba(0, 113, 235, 0.3);
  --external-badge-bg: rgba(0, 113, 235, 0.2);
  --external-badge-border: rgba(0, 113, 235, 0.4);
  --dual-link-bg: rgba(255, 255, 255, 0.04);
  --dual-link-border: rgba(255, 255, 255, 0.1);
  --dual-link-bg-hover: rgba(0, 113, 235, 0.15);
  --dual-link-border-hover: rgba(0, 113, 235, 0.4);

  --carousel-img-filter: brightness(0.6);
  --carousel-img-filter-active: brightness(0.7);
}

/* Light Theme */
body:not(.dark-mode) {
  --bg-gradient-start: #ffffff;
  --bg-gradient-mid: #f5f5f5;
  --bg-gradient-end: #e8e8e8;
  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --card-bg: rgba(255, 255, 255, 0.6);
  --card-bg-hover: rgba(255, 255, 255, 0.9);
  --card-border: rgba(0, 0, 0, 0.15);
  --card-border-hover: rgba(0, 113, 235, 0.4);
  --navbar-bg: rgba(255, 255, 255, 0.95);
  --navbar-bg-scrolled: rgba(255, 255, 255, 0.98);
  --navbar-border: rgba(0, 0, 0, 0.1);
  --dropdown-bg: rgba(255, 255, 255, 0.98);
  --dropdown-border: rgba(0, 0, 0, 0.15);
  --link-bg: rgba(0, 0, 0, 0.05);
  --link-border: rgba(0, 0, 0, 0.1);
  --link-bg-hover: rgba(0, 113, 235, 0.1);
  --link-border-hover: rgba(0, 113, 235, 0.3);
  --external-badge-bg: rgba(0, 113, 235, 0.15);
  --external-badge-border: rgba(0, 113, 235, 0.35);
  --dual-link-bg: rgba(0, 0, 0, 0.04);
  --dual-link-border: rgba(0, 0, 0, 0.12);
  --dual-link-bg-hover: rgba(0, 113, 235, 0.12);
  --dual-link-border-hover: rgba(0, 113, 235, 0.35);

  --carousel-img-filter: saturate(0.5) contrast(0.85);
  --carousel-img-filter-active: saturate(0.6) contrast(0.9);
}

/* =====================================================
   GLOBAL STYLES
   ===================================================== */

body {
  background: linear-gradient(
    180deg,
    var(--bg-gradient-start) 0%,
    var(--bg-gradient-mid) 50%,
    var(--bg-gradient-end) 100%
  );
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  padding-top: 1rem;
}

/* =====================================================
   LAYOUT CONTAINERS
   ===================================================== */

.home-container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 2rem 3rem;
  padding-top: 6.25rem;
}

/* =====================================================
   NAVBAR STYLES
   ===================================================== */

.navbar {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 4rem);
  max-width: var(--container-max-width);
  padding: 0.5rem 1.5rem;
  box-sizing: border-box;
  background: var(--navbar-bg);
  backdrop-filter: blur(1.25rem) saturate(180%);
  -webkit-backdrop-filter: blur(1.25rem) saturate(180%);
  border-radius: 0.5rem;
  border: 1px solid var(--navbar-border);
  box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  z-index: 1000;
  transition: all 0.3s ease;
  margin-bottom: 0;
}

.navbar.scrolled {
  top: 0.5rem;
  background: var(--navbar-bg-scrolled);
  box-shadow: 0 0.75rem 2.5rem rgba(0, 0, 0, 0.8), 0 0 3.75rem rgba(0, 113, 235, 0.1);
}

.navbar::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 113, 235, 0.5) 50%,
    transparent
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.navbar:hover::after {
  opacity: 1;
}

/* Light Mode Navbar Adjustments */
body:not(.dark-mode) .navbar {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

body:not(.dark-mode) .navbar.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

body:not(.dark-mode) .navbar::after {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 113, 235, 0.2) 50%,
    transparent
  );
}

/* Navbar Logo */
.nav-logo {
  transition: all 0.3s ease;
}

.nav-logo:hover {
  transform: scale(1.1);
  filter: drop-shadow(0 0 12px rgba(0, 113, 235, 0.5));
}

.nav-logo .material-symbols-outlined {
  color: var(--primary);
  font-size: 1.6rem;
}

.nav-portrait {
  border: 2px solid rgba(0, 113, 235, 0.4);
  box-shadow: 0 0 16px rgba(0, 113, 235, 0.25);
  transition: all 0.3s ease;
}

.nav-portrait:hover {
  border-color: var(--primary);
  box-shadow: 0 0 24px rgba(0, 113, 235, 0.5);
  transform: scale(1.15);
}

/* Navbar Links */
.nav-links {
  background: var(--link-bg);
  border: 1px solid var(--link-border);
  border-radius: 0.5rem;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.nav-links:hover {
  background: var(--link-bg-hover);
  border-color: var(--link-border-hover);
  transform: translateY(-2px);
}

.nav-links.active {
  background: rgba(0, 113, 235, 0.2);
  border-color: var(--primary);
  box-shadow: 0 0 16px rgba(0, 113, 235, 0.25);
}

/* Light Mode Link Adjustments */
body:not(.dark-mode) .nav-links:hover,
body:not(.dark-mode) .nav-links.active {
  color: var(--primary);
}

body:not(.dark-mode) .nav-links.active {
  background: rgba(0, 113, 235, 0.15);
  border-color: rgba(0, 113, 235, 0.4);
}

/* Mega Menu Styling Override */
.mega-menu {
  background: rgba(10, 10, 10, 0.98);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 2px solid rgba(0, 113, 235, 0.3);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset, 0 4px 24px rgba(0, 113, 235, 0.2);
}

body:not(.dark-mode) .mega-menu {
  background: rgba(255, 255, 255, 0.98);
  border-top: 2px solid rgba(0, 113, 235, 0.25);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15),
    0 4px 24px rgba(0, 113, 235, 0.15);
}

/* Mega Menu Title */
.mega-menu-title {
  color: rgba(0, 113, 235, 0.8);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
}

body:not(.dark-mode) .mega-menu-title {
  color: rgba(0, 113, 235, 0.9);
}

/* Mega Menu Links */
.mega-menu-link {
  border-radius: 8px;
  transition: all 0.25s ease;
}

.mega-menu-link:hover {
  background: rgba(0, 113, 235, 0.15);
  transform: translateX(6px);
}

body:not(.dark-mode) .mega-menu-link:hover {
  background: rgba(0, 113, 235, 0.1);
}

.mega-menu-link .material-symbols-outlined {
  color: var(--primary);
  filter: drop-shadow(0 0 8px rgba(0, 113, 235, 0.3));
}

.mega-menu-link:hover .material-symbols-outlined {
  color: var(--primary-light);
  filter: drop-shadow(0 0 12px rgba(0, 113, 235, 0.5));
}

.mega-menu-link strong {
  color: var(--text-primary);
  font-weight: 600;
}

.mega-menu-link small {
  color: var(--text-secondary);
}

body:not(.dark-mode) .mega-menu-link strong {
  color: #1a1a1a;
}

body:not(.dark-mode) .mega-menu-link small {
  color: #666666;
}

/* Theme Toggle */
.theme-toggle {
  background: rgba(0, 113, 235, 0.1);
  border: 1px solid rgba(0, 113, 235, 0.2);
  border-radius: 10px;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  background: rgba(0, 113, 235, 0.2);
  border-color: rgba(0, 113, 235, 0.4);
  transform: scale(1.1);
  box-shadow: 0 0 16px rgba(0, 113, 235, 0.3);
}

body:not(.dark-mode) .theme-toggle {
  background: rgba(0, 113, 235, 0.08);
  border-color: rgba(0, 113, 235, 0.15);
}

body:not(.dark-mode) .theme-toggle:hover {
  background: rgba(0, 113, 235, 0.15);
  border-color: rgba(0, 113, 235, 0.3);
}

/* Down arrow indicator for mega menu */
.mega-dropdown > .nav-links::after {
  border-top-color: var(--text-primary);
}

body:not(.dark-mode) .mega-dropdown > .nav-links::after {
  border-top-color: #2a2a2a;
}

/* =====================================================
   HERO CAROUSEL
   ===================================================== */

.hero-carousel {
  position: relative;
  width: 100%;
  height: 28rem;
  border-radius: 0.75rem;
  overflow: hidden;
  margin-bottom: 2.5rem;
  box-shadow: 0 0.5rem 2.5rem rgba(0, 0, 0, 0.6);
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  flex-shrink: 0;
}

.slide-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.slide-background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 50%;
  filter: var(--carousel-img-filter);
  transition: transform 0.6s ease, filter 0.3s ease;
}

.carousel-slide.active .slide-background img {
  transform: scale(1.05);
  filter: var(--carousel-img-filter-active);
}

.slide-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.5) 50%,
    rgba(0, 0, 0, 0.8) 100%
  );
}

.slide-content {
  position: absolute;
  bottom: 4.5rem;
  left: 0;
  right: 0;
  padding-left: calc(1.5rem + 3rem + 1rem);
  padding-right: calc(1.5rem + 3rem + 1rem);
  max-width: 34.375rem;
  z-index: 5;
  color: #ffffff;
  text-shadow: 0 2px 0.75rem rgba(0, 0, 0, 0.8);
  opacity: 0;
  transition: opacity 0.6s ease 0.3s;
  pointer-events: none;
}

.slide-content a,
.slide-content button {
  pointer-events: auto;
}

.carousel-slide.active .slide-content {
  opacity: 1;
}

.slide-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  padding: 0.4rem 1rem;
  border-radius: 1.25rem;
  font-size: 0.85em;
  font-weight: 600;
  margin-bottom: 0.8rem;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 113, 235, 0.4);
}

.slide-title {
  font-size: 2.2em;
  font-weight: 700;
  margin-bottom: 0.6rem;
  line-height: 1.2;
  background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.slide-description {
  font-size: 1em;
  margin-bottom: 1.2rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.95);
}

.slide-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #ffffff;
  padding: 0.8rem 1.6rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95em;
  transition: all 0.3s ease;
  box-shadow: 0 0.375rem 1.25rem rgba(0, 113, 235, 0.4);
}

.slide-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 0.625rem 1.875rem rgba(0, 113, 235, 0.6);
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
}

.slide-cta i {
  font-size: 1.2em;
  transition: transform 0.3s ease;
}

.slide-cta:hover i {
  transform: translateX(4px);
}

/* Carousel Navigation */
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(0.5rem);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 200;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.5);
}

.carousel-nav:hover {
  background: rgba(0, 113, 235, 0.9);
  border-color: var(--primary);
  transform: translateY(-50%) scale(1.15);
  box-shadow: 0 0.375rem 1.25rem rgba(0, 113, 235, 0.6);
}

.carousel-nav.prev {
  left: 1.5rem;
}

.carousel-nav.next {
  right: 1.5rem;
}

.carousel-nav i {
  font-size: 1.5em;
  pointer-events: none;
}

/* Carousel Indicators */
.carousel-indicators {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.6rem;
  z-index: 50;
}

.indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  padding: 0;
}

.indicator.active {
  background: var(--primary);
  width: 32px;
  border-radius: 5px;
  border-color: rgba(255, 255, 255, 0.3);
}

.indicator:hover {
  background: rgba(255, 255, 255, 0.7);
}

/* =====================================================
   EVENT CAROUSEL
   ===================================================== */

.event-carousel-container {
  margin-bottom: 2.5rem;
}

.event-carousel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding: 0 0.5rem;
}

.event-carousel-header h2 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5em;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.event-carousel-header h2 i {
  color: var(--primary);
  font-size: 1.2em;
}

.event-carousel-loading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.9em;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.event-carousel-loading.hidden {
  opacity: 0;
  pointer-events: none;
}

.event-carousel {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  flex-grow: 1;
}
.event-carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.event-banner {
  min-width: 100%;
  height: 100%;
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.event-banner img {
  width: 100%;
  height: 60%;
  object-fit: cover;
  object-position: center;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.6));
  transition: transform 0.5s ease;
}

.event-banner:hover img {
  transform: scale(1.05);
}

.event-banner-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  padding: 1.5rem;
  color: white;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.event-banner:hover .event-banner-overlay {
  transform: translateY(0);
}

.event-banner-type {
  display: inline-block;
  background: var(--primary);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75em;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.event-banner-date {
  font-size: 0.85em;
  opacity: 0.9;
}

/* Event Carousel Navigation */
.event-carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 100;
  opacity: 0.8;
}

.event-carousel-nav:hover {
  background: rgba(0, 113, 235, 0.9);
  border-color: var(--primary);
  transform: translateY(-50%) scale(1.1);
  opacity: 1;
}

.event-carousel-nav.prev {
  left: 1rem;
}

.event-carousel-nav.next {
  right: 1rem;
}

.event-carousel-nav i {
  font-size: 1.2em;
}

/* Event Carousel Indicators */
.event-carousel-indicators {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 50;
}

.event-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  padding: 0;
}

.event-indicator.active {
  background: var(--primary);
  width: 24px;
  border-radius: 4px;
}

.event-indicator:hover {
  background: rgba(255, 255, 255, 0.7);
}

/* Empty State */
.event-carousel-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-secondary);
  padding: 2rem;
  text-align: center;
}

.event-carousel-empty i {
  font-size: 3em;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.event-carousel-empty p {
  font-size: 1.1em;
  margin: 0;
}

/* =====================================================
   INFO AND EVENTS SECTION
   ===================================================== */

.info-and-events-section {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
  grid-auto-rows: 120px;
}

.patch-notes-container {
  grid-column: span 4;
  grid-row: span 2;
  display: flex;
  flex-direction: column;
}

.patch-notes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding: 0 0.5rem;
}

.patch-notes-header h3 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5em;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.patch-notes-header h3 i {
  color: var(--primary);
  font-size: 1.2em;
}

.patch-notes-card {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.patch-notes-content {
  flex-grow: 1;
}

.patch-notes-content ul {
  padding-left: 20px;
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
}

body:not(.dark-mode) .patch-notes-content ul {
  color: rgba(0, 0, 0, 0.75);
}

.patch-notes-content li {
  margin-bottom: 0.8rem;
  font-size: 0.9em;
}

.event-carousel-container {
  grid-column: span 2;
  grid-row: span 2;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}

.event-carousel {
  height: 100%;
}

/* =====================================================
   BENTO GRID
   ===================================================== */

.bento-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  grid-auto-rows: 90px;
  margin-bottom: 5rem;
}

/* Bento Card Sizes */
.bento-card.large {
  grid-column: span 4;
  grid-row: span 2;
}

.bento-card.medium {
  grid-column: span 2;
  grid-row: span 2;
}

.bento-card.small {
  grid-column: span 2;
  grid-row: span 1;
}

/* Base Bento Card */
.bento-card {
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1.2rem;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.bento-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(0, 113, 235, 0.05),
    rgba(0, 168, 225, 0.05)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.bento-card:hover::before {
  opacity: 1;
}

.bento-card:hover {
  transform: translateY(-6px);
  background: var(--card-bg-hover);
  border-color: var(--card-border-hover);
  box-shadow: 0 12px 40px rgba(0, 113, 235, 0.15);
}

.bento-card.featured {
  background: linear-gradient(
    135deg,
    rgba(0, 113, 235, 0.06),
    rgba(0, 86, 179, 0.06)
  );
  border-color: rgba(0, 113, 235, 0.2);
}

/* Light Mode Bento Card Adjustments */
body:not(.dark-mode) .bento-card::before {
  background: linear-gradient(
    135deg,
    rgba(0, 113, 235, 0.08),
    rgba(0, 168, 225, 0.08)
  );
}

body:not(.dark-mode) .bento-card:hover {
  box-shadow: 0 12px 40px rgba(0, 113, 235, 0.2);
}

body:not(.dark-mode) .bento-card.featured {
  background: linear-gradient(
    135deg,
    rgba(0, 113, 235, 0.1),
    rgba(0, 86, 179, 0.1)
  );
  border: 2px solid rgba(0, 113, 235, 0.3);
}

body:not(.dark-mode) .bento-card p {
  color: #4a4a4a;
}

/* Bento Card Content */
.card-icon-large {
  font-size: 2em;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 0 16px rgba(0, 113, 235, 0.3));
}

.card-icon {
  font-size: 2em;
  margin-bottom: 0.5rem;
}

.bento-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.2em;
  font-weight: 700;
  color: var(--text-primary);
}

.bento-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85em;
  line-height: 1.4;
}

.bento-card .card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.bento-card .card-header .card-icon-large,
.bento-card .card-header .card-icon,
.bento-card .card-header .external-link-icon {
  margin-bottom: 0;
}

.bento-card .card-header h3,
.bento-card .card-header .external-link-label {
  margin-bottom: 0;
}

.card-footer {
  margin-top: auto;
  padding-top: 0.8rem;
}

.card-meta {
  font-size: 0.8em;
  color: rgba(255, 255, 255, 0.5);
}

body:not(.dark-mode) .card-meta {
  color: rgba(0, 0, 0, 0.5);
}

/* =====================================================
   EXTERNAL LINKS SECTION
   ===================================================== */

.external-links-section {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  grid-auto-rows: 120px;
  margin-bottom: 2rem;
}

.bento-card.external-link {
  grid-column: span 2;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
}

.external-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: var(--external-badge-bg);
  border: 1px solid var(--external-badge-border);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7em;
  color: var(--primary);
  font-weight: 600;
  z-index: 10;
  pointer-events: none;
}

.external-link-icon {
  font-size: 2.5em;
  margin-bottom: 0.8rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 12px rgba(0, 113, 235, 0.4));
}

.external-link-label {
  font-size: 1.1em;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.external-link-desc {
  font-size: 0.8em;
  color: rgba(255, 255, 255, 0.6);
}

/* Light Mode External Links Adjustments */
body:not(.dark-mode) .bento-card.external-link {
  background: rgba(255, 255, 255, 0.7);
}

body:not(.dark-mode) .bento-card.external-link:hover {
  background: rgba(255, 255, 255, 1);
}

body:not(.dark-mode) .external-link-desc {
  color: rgba(0, 0, 0, 0.6);
}

/* Dual External Links */
.bento-card.dual-external {
  pointer-events: none;
}

.bento-card.dual-external:hover {
  transform: none;
  background: var(--card-bg);
  border-color: var(--card-border);
  box-shadow: none;
}

.bento-card.dual-external::before {
  display: none;
}

.dual-links-container {
  display: flex;
  gap: 0.6rem;
  flex: 1;
}

.dual-link-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem 0.6rem;
  background: var(--dual-link-bg);
  border: 1px solid var(--dual-link-border);
  border-radius: 8px;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.3s ease;
  flex: 1;
  text-align: center;
  pointer-events: all;
  cursor: pointer;
}

.dual-link-item:hover {
  background: var(--dual-link-bg-hover);
  border-color: var(--dual-link-border-hover);
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 113, 235, 0.25);
}

.dual-link-svg-icon {
  width: 1.8em;
  height: 1.8em;
  transition: all 0.3s ease;
  pointer-events: none;
  opacity: 0.9;
}

.dual-link-item:hover .dual-link-svg-icon {
  transform: scale(1.2);
  opacity: 1;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4));
}

.dual-link-content {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  pointer-events: none;
}

.dual-link-label {
  font-size: 0.95em;
  font-weight: 600;
}

.dual-link-desc {
  font-size: 0.7em;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.2;
}

body:not(.dark-mode) .dual-link-desc {
  color: rgba(0, 0, 0, 0.5);
}


/* =====================================================
   ANIMATIONS
   ===================================================== */

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

.hero-carousel,
.bento-card {
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
}

.hero-carousel {
  animation-delay: 0.1s;
}

.bento-card {
  animation-delay: calc(0.1s + (var(--card-index, 0) * 0.1s));
}

/* =====================================================
   RESPONSIVE DESIGN - TABLET
   ===================================================== */

@media (max-width: 1024px) {
  .hero-carousel {
    height: 350px;
  }

  .slide-content {
    bottom: 3.5rem;
    padding-left: calc(1.5rem + 44px + 0.8rem);
    padding-right: calc(1.5rem + 44px + 0.8rem);
    max-width: 450px;
  }

  .slide-title {
    font-size: 1.9em;
  }

  .slide-description {
    font-size: 0.95em;
  }

  .carousel-nav {
    width: 44px;
    height: 44px;
  }

  .bento-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .external-links-section {
    grid-template-columns: repeat(4, 1fr);
  }

  .bento-card.external-link {
    grid-column: span 2;
  }
}

/* =====================================================
   RESPONSIVE DESIGN - MOBILE
   ===================================================== */

@media (max-width: 768px) {
  /* Navbar Mobile */
  .navbar {
    width: calc(100% - 2rem);
    padding: 0.75rem;
    top: 1rem;
  }

  .navbar.scrolled {
    top: 0.5rem;
  }

  /* Ensure body has top padding on mobile too */
  body {
    padding-top: 1rem;
  }

  .nav-container {
    width: 100%;
    padding: 0;
    max-width: 100%;
    display: flex;
    flex-wrap: wrap;
  }

  /* Mobile Mega Menus - only customize mega-menu, let global.style.css handle nav-menu */
  .mega-menu {
    position: static;
    width: 100%;
    margin: 0;
    padding: 0;
    background: rgba(0, 113, 235, 0.05);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    border-top: 1px solid rgba(0, 113, 235, 0.15);
    box-shadow: none;
    border-radius: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
  }

  .mega-dropdown.active .mega-menu {
    max-height: 800px;
  }

  .mega-menu-content {
    flex-direction: column;
    padding: 0.5rem 0;
    gap: 0;
  }

  .mega-menu-title {
    padding: 0.5rem 1.5rem;
    font-size: 0.65rem;
    margin: 0.5rem 0 0.25rem 0;
  }

  .mega-menu-link {
    padding: 0.75rem 1.5rem;
    padding-left: 2.5rem;
    margin: 0;
    border-radius: 0;
  }

  .mega-menu-link:hover {
    transform: none;
    padding-left: 2.75rem;
  }

  body:not(.dark-mode) .mega-menu {
    background: rgba(0, 113, 235, 0.08);
  }

  /* Container & Content */
  .home-container {
    padding: 1rem;
    padding-top: 100px;
    padding-bottom: 2rem;
  }

  /* Hero Carousel Mobile */
  .hero-carousel {
    height: 280px;
    border-radius: 8px;
    margin-bottom: 1.5rem;
  }

  .slide-content {
    bottom: 3.5rem;
    padding-left: calc(0.8rem + 40px + 0.6rem);
    padding-right: calc(0.8rem + 40px + 0.6rem);
    max-width: none;
  }

  .slide-badge {
    padding: 0.3rem 0.8rem;
    font-size: 0.7em;
    margin-bottom: 0.5rem;
  }

  .slide-title {
    font-size: 1.3em;
    margin-bottom: 0.4rem;
  }

  .slide-description {
    font-size: 0.8em;
    margin-bottom: 0.8rem;
    line-height: 1.4;
  }

  .slide-cta {
    padding: 0.65rem 1.3rem;
    font-size: 0.85em;
  }

  .carousel-nav {
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.9);
  }

  .carousel-nav.prev {
    left: 0.8rem;
  }

  .carousel-nav.next {
    right: 0.8rem;
  }

  .carousel-nav i {
    font-size: 1.4em;
  }

  .carousel-indicators {
    bottom: 1rem;
    gap: 0.5rem;
  }

  .indicator {
    width: 8px;
    height: 8px;
  }

  .indicator.active {
    width: 24px;
  }

  /* Bento Grid Mobile */
  .bento-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .external-links-section {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .bento-card.large,
  .bento-card.medium,
  .bento-card.small {
    grid-column: span 1;
  }

  .bento-card.external-link {
    grid-column: span 1;
    grid-row: auto;
  }

  /* Dual Links Mobile */
  .dual-links-container {
    flex-direction: column;
    gap: 0.5rem;
  }

  .dual-link-item {
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
    padding: 1rem;
    gap: 0.8rem;
  }

  .dual-link-svg-icon {
    width: 1.4em;
    height: 1.4em;
    flex-shrink: 0;
  }

  .dual-link-content {
    align-items: flex-start;
  }

  .dual-link-desc {
    text-align: left;
  }
}

/* =====================================================
   RESPONSIVE DESIGN - SMALL MOBILE
   ===================================================== */

@media (max-width: 480px) {
  .hero-carousel {
    height: 260px;
  }

  .slide-content {
    bottom: 3.2rem;
    padding-left: calc(0.6rem + 36px + 0.5rem);
    padding-right: calc(0.6rem + 36px + 0.5rem);
  }

  .slide-title {
    font-size: 1.2em;
    margin-bottom: 0.3rem;
  }

  .slide-description {
    font-size: 0.75em;
    margin-bottom: 0.6rem;
  }

  .slide-cta {
    padding: 0.6rem 1.1rem;
    font-size: 0.8em;
  }

  .carousel-nav {
    width: 36px;
    height: 36px;
  }

  .carousel-nav.prev {
    left: 0.6rem;
  }

  .carousel-nav.next {
    right: 0.6rem;
  }
}

/* =====================================================
   RESPONSIVE - INFO AND EVENTS & EVENT CAROUSEL
   ===================================================== */

@media (max-width: 768px) {
  .info-and-events-section {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .patch-notes-container,
  .event-carousel-container {
    grid-column: span 1;
  }

  .event-carousel {
    height: 160px;
  }

  .event-carousel-header h2 {
    font-size: 1.2em;
  }

  .event-carousel-nav {
    width: 36px;
    height: 36px;
  }

  .event-carousel-nav.prev {
    left: 0.5rem;
  }

  .event-carousel-nav.next {
    right: 0.5rem;
  }

  .event-banner-overlay {
    padding: 1rem;
    font-size: 0.9em;
  }

  .event-banner img {
    height: 80%;
  }
}

@media (max-width: 480px) {
  .event-carousel {
    height: 140px;
  }

  .event-carousel-header {
    flex-direction: column;
    align-items: flex-start;
    /* gap: 0.5rem; */
  }
}

/* =====================================================
   ACCESSIBILITY
   ===================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms;
    transition-duration: 0.01ms;
  }
}
