/**
 * Visit Rungwe - Custom CSS Overrides v1.0.2
 * Mega Menu, Mobile Menu, and additional styles
 */

/* ─── MEGA MENU STYLES ─── */

/* Mega menu items */
.mega-menu-item {
  position: relative;
}

.mega-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 480px;
  background: rgba(23,23,23,0.97);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.08);
  border-top: 2px solid var(--gold);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  z-index: 200;
  padding: 0;
}

.mega-menu-item:hover .mega-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mega-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: 200px;
}

.mega-links {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mega-link {
  color: rgba(255,255,255,0.75) !important;
  font-size: 0.85rem !important;
  letter-spacing: 0.08em !important;
  padding: 10px 14px !important;
  border-radius: 3px;
  transition: background 0.2s, color 0.2s !important;
  text-decoration: none;
  display: block;
}

.mega-link:hover {
  background: rgba(200,168,85,0.1) !important;
  color: var(--gold) !important;
}

.mega-image {
  position: relative;
  overflow: hidden;
  min-height: 200px;
}

.mega-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.mega-menu-item:hover .mega-image img {
  transform: scale(1.05);
}

.mega-image-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 16px 14px;
  background: linear-gradient(transparent, rgba(23,23,23,0.8));
  color: white;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
}

/* ─── VERTICAL DROPDOWN (Invest in Rungwe) ─── */
.dropdown-vertical {
  position: relative;
}

.vertical-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 220px;
  background: rgba(23,23,23,0.97);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.08);
  border-top: 2px solid var(--gold);
  list-style: none;
  margin: 0;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  z-index: 200;
}

.dropdown-vertical:hover .vertical-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.vertical-dropdown li {
  margin: 0;
}

.vertical-dropdown a {
  display: block;
  padding: 10px 20px !important;
  color: rgba(255,255,255,0.75) !important;
  font-size: 0.82rem !important;
  letter-spacing: 0.08em !important;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s !important;
}

.vertical-dropdown a:hover {
  background: rgba(200,168,85,0.1) !important;
  color: var(--gold) !important;
}

/* ─── UKWISA FESTIVAL NAV LINK ─── */
.festival-nav-link {
  background: linear-gradient(135deg, #2a1a0a, #1a1a1a) !important;
  border: 1px solid var(--gold) !important;
  padding: 8px 18px !important;
  border-radius: 3px !important;
  color: var(--gold) !important;
  font-weight: 600 !important;
  animation: festivalGlow 2s ease-in-out infinite;
}

@keyframes festivalGlow {
  0%, 100% { box-shadow: 0 0 4px rgba(200,168,85,0.2); }
  50% { box-shadow: 0 0 12px rgba(200,168,85,0.5); }
}

/* ─── FESTIVAL HERO (dark + countdown) ─── */
.festival-hero {
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
  position: relative;
  overflow: hidden;
}

.festival-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(200,168,85,0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 50%, rgba(200,168,85,0.05) 0%, transparent 60%);
  pointer-events: none;
}

.festival-countdown {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin: 32px 0;
}

.countdown-item {
  text-align: center;
  min-width: 80px;
}

.countdown-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3.2rem;
  font-weight: 300;
  color: var(--gold);
  line-height: 1;
  display: block;
}

.countdown-label {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-top: 6px;
  display: block;
}

.festival-typography {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  letter-spacing: 0.15em;
}

/* ─── BOOK A TRIP PAGE ─── */
.booking-form {
  max-width: 640px;
  margin: 0 auto;
}

.booking-form .form-group {
  margin-bottom: 20px;
}

.booking-form label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--moss);
  margin-bottom: 6px;
  font-weight: 600;
}

.booking-form input,
.booking-form select,
.booking-form textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: 'Jost', sans-serif;
  font-size: 0.95rem;
  background: white;
  transition: border-color 0.2s;
}

.booking-form input:focus,
.booking-form select:focus,
.booking-form textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(200,168,85,0.15);
}

.booking-form textarea {
  min-height: 120px;
  resize: vertical;
}

/* AI Recommendation section */
.ai-recommendation {
  background: linear-gradient(135deg, var(--dark), #2a2a2a);
  border: 1px solid rgba(200,168,85,0.2);
  border-radius: 8px;
  padding: 48px;
  margin-top: 48px;
}

.ai-recommendation .section-heading {
  color: white;
}

.ai-chat-input {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.ai-chat-input input {
  flex: 1;
  padding: 14px 18px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 4px;
  background: rgba(255,255,255,0.06);
  color: white;
  font-family: 'Jost', sans-serif;
  font-size: 0.95rem;
}

.ai-chat-input input::placeholder {
  color: rgba(255,255,255,0.3);
}

.ai-chat-input input:focus {
  outline: none;
  border-color: var(--gold);
}

.ai-response {
  margin-top: 20px;
  padding: 20px;
  background: rgba(255,255,255,0.04);
  border-radius: 6px;
  color: rgba(255,255,255,0.7);
  font-size: 0.92rem;
  line-height: 1.7;
  display: none;
}

.ai-response.visible {
  display: block;
}

/* ─── INVEST IN RUNGWE PAGE ─── */
.invest-card {
  background: white;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.invest-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.invest-card-body {
  padding: 32px;
}

.invest-card h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.invest-icon {
  width: 48px;
  height: 48px;
  background: rgba(200,168,85,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.invest-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 1.5;
}

/* ─── MOBILE ADAPTATIONS ─── */
@media (max-width: 900px) {
  .mega-dropdown,
  .vertical-dropdown {
    position: static;
    min-width: auto;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: transparent;
    border: none;
    backdrop-filter: none;
    display: none;
    padding-left: 16px;
  }

  .mega-menu-item:hover .mega-dropdown,
  .dropdown-vertical:hover .vertical-dropdown {
    display: block;
  }

  .mega-content {
    grid-template-columns: 1fr;
  }

  .mega-image {
    display: none;
  }

  .mega-links {
    padding: 8px 0;
  }

  .mega-link {
    padding: 8px 14px !important;
    font-size: 0.8rem !important;
  }

  .vertical-dropdown {
    position: static;
    transform: none;
    min-width: auto;
    background: transparent;
    border: none;
    padding: 0 0 0 16px;
  }

  .dropdown-vertical:hover .vertical-dropdown,
  .vertical-dropdown {
    display: none;
  }

  .dropdown-vertical:hover .vertical-dropdown {
    display: block;
  }

  .festival-countdown {
    gap: 12px;
    flex-wrap: wrap;
  }

  .countdown-item {
    min-width: 60px;
  }

  .countdown-num {
    font-size: 2rem;
  }

  .festival-nav-link {
    font-size: 0.75rem !important;
    padding: 6px 12px !important;
  }

  .ai-recommendation {
    padding: 28px 20px;
  }

  .ai-chat-input {
    flex-direction: column;
  }
}

/* Additional spacing for WordPress admin bar */
.admin-bar nav {
  top: 32px;
}

@media (max-width: 782px) {
  .admin-bar nav {
    top: 46px;
  }
}

/* Gutenberg block editor alignment compatibility */
.wp-block-image.alignfull img {
  width: 100%;
}

/* Mobile menu toggle button */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 101;
}

.mobile-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: white;
  margin: 5px 0;
  transition: 0.3s;
}

@media (max-width: 900px) {
  .mobile-menu-toggle {
    display: block;
  }

  .nav-links.active {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(23,23,23,0.98);
    align-items: center;
    justify-content: flex-start;
    padding-top: 80px;
    gap: 8px;
    z-index: 99;
    overflow-y: auto;
  }

  .nav-links.active a {
    font-size: 1rem;
  }
}

/* Smooth fade-in for dynamically loaded content */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

