/* ===== V2 ALTERNATE HOMEPAGE — Oak Hall Inspired ===== */

/* ===== HEADER — Transparent overlay on hero ===== */
.v2-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: transparent;
  transition: all 0.3s ease;
}

/* Desktop nav */
.v2-desktop-nav {
  display: none;
  padding: 24px 40px;
  transition: all 0.3s ease;
}
@media (min-width: 1024px) {
  .v2-desktop-nav { display: block; }
  .v2-mobile-nav { display: none !important; }
}

.v2-nav-container {
  display: flex;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}

/* Left section: nav links */
.v2-nav-left {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 4px;
}

.v2-menu-icon {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 8px;
  font-size: 28px;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
}
.v2-menu-icon:hover { opacity: 0.7; }

.v2-sep {
  width: 1px;
  height: 28px;
  background: rgba(255,255,255,0.4);
  margin: 0 12px;
}

.v2-nav-link {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  transition: all 0.2s;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.v2-nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%; right: 50%;
  height: 2px;
  background: var(--accent);
  transition: all 0.25s ease;
}
.v2-nav-link:hover::after {
  left: 16px;
  right: 16px;
}

/* More dropdown */
.v2-nav-more { position: relative; display: inline-flex; align-items: center; }
.v2-caret { font-size: 9px; margin-left: 4px; vertical-align: middle; }
.v2-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(20px);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.2);
  padding: 8px 0;
  min-width: 220px;
  z-index: 100;
  /* Invisible bridge to prevent hover gap */
  padding-top: 12px;
}
.v2-nav-more:hover .v2-dropdown { display: block; }
.v2-dropdown a {
  display: block;
  padding: 10px 20px;
  color: var(--text-dark);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s;
  text-shadow: none;
}
.v2-dropdown a:hover {
  background: var(--primary);
  color: #fff;
}

/* Center section: logo */
.v2-nav-center {
  flex: 1;
  text-align: center;
}
.v2-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.v2-logo-img {
  height: 48px;
  width: auto;
  object-fit: cover;
  border-radius: 50%;
  background: #fff;
  padding: 2px;
  transition: all 0.3s;
}
.v2-logo-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}
.v2-logo-cn {
  font-family: var(--font-secondary);
  font-weight: 700;
  font-size: 18px;
  color: #fff;
  line-height: 1.2;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.v2-logo-en {
  font-size: 10px;
  color: rgba(255,255,255,0.8);
  letter-spacing: 1px;
  text-transform: uppercase;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Right section: Portal */
.v2-nav-right {
  flex: 1;
  text-align: right;
}
.v2-portal-link {
  border: 2px solid rgba(255,255,255,0.5) !important;
  border-radius: 4px;
  padding: 8px 24px !important;
  font-size: 13px !important;
  transition: all 0.25s !important;
}
.v2-portal-link:hover {
  background: rgba(255,255,255,0.15);
  border-color: #fff !important;
}
.v2-portal-link::after { display: none !important; }

/* ===== SCROLLED HEADER (mini) ===== */
/* Applied for a single frame by public-v2.js while it measures the header's
   settled compact height. The header's size comes from its children (nav
   padding, logo), which animate on their own — without this the measurement
   reads the pre-transition size. */
.v2-header.measuring, .v2-header.measuring * { transition: none !important; }

.v2-header.scrolled {
  background: var(--primary-dark);
  backdrop-filter: blur(20px);
  padding: 0;
}
.v2-header.scrolled .v2-desktop-nav {
  padding: 8px 40px;
}
.v2-header.scrolled .v2-logo-img {
  height: 36px;
}

/* ===== MOBILE NAV ===== */
.v2-mobile-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
}
.v2-mobile-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.v2-mobile-logo img {
  height: 36px;
  width: auto;
  object-fit: cover;
  border-radius: 50%;
  background: #fff;
  padding: 2px;
}
.v2-mobile-logo span {
  color: #fff;
  font-family: var(--font-secondary);
  font-weight: 700;
  font-size: 16px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Hamburger button */
.v2-burger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 10;
}
.v2-burger span {
  display: block;
  width: 26px;
  height: 2px;
  background: #fff;
  transition: all 0.3s ease;
}
.v2-burger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.v2-burger.active span:nth-child(2) { opacity: 0; }
.v2-burger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ===== FULL-SCREEN MENU OVERLAY ===== */
/* Mobile menu: a dropdown panel anchored under the header — the same model as
   the v1 navbar, which never blocks. It replaces a full-screen overlay that
   faded out over 0.4s: `visibility` only flips at the END of a transition, so
   for those 400ms the closed menu still covered the viewport and swallowed the
   next tap, which is what made section navigation feel stuck. */
.v2-menu-overlay {
  position: fixed;
  top: 64px; left: 0; right: 0;
  max-height: calc(100vh - 64px);
  background: #fff;
  z-index: 999;
  display: none;
  overflow-y: auto;
  padding: 16px 20px 24px;
  box-shadow: 0 16px 32px rgba(0,0,0,0.18);
}
.v2-menu-overlay.open { display: block; }
/* The header stays on top and tappable, and the burger toggles the panel, so
   the in-panel close button is redundant here. */
.v2-menu-close { display: none; }
/* Keep the logo and burger legible while the white panel is open (the header
   is transparent over the hero). */
.v2-header.menu-open { background: var(--primary-dark); }
/* Anchor jumps land flush below the fixed header. This must equal the header's
   height: too little hides the section heading behind it, too much shows a
   white strip above it. public-v2.js measures the real header and overrides
   this; the value here is the no-JS fallback. */
html { scroll-padding-top: 59px; }

.v2-menu-content {
  text-align: center;
}
.v2-menu-link {
  display: block;
  font-family: var(--font-heading);
  font-size: 32px;
  color: var(--text-dark);
  text-decoration: none;
  padding: 12px 0;
  transition: color 0.2s;
}
.v2-menu-link:hover { color: var(--primary); }
.v2-menu-portal {
  margin-top: 24px;
  font-size: 18px;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-family: var(--font-body);
  font-weight: 600;
}
.v2-menu-group { margin-bottom: 4px; }
.v2-menu-sub {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 4px 0 12px;
}
.v2-menu-sub a {
  font-size: 14px;
  color: var(--text-mid);
  text-decoration: none;
  padding: 4px 12px;
  border-radius: 4px;
  transition: all 0.2s;
}
.v2-menu-sub a:hover { background: var(--primary); color: #fff; }

/* ===== FULL-SCREEN HERO ===== */
.v2-hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.v2-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.v2-hero-bg-default {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}
.v2-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1;
}
.v2-hero-gradient {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 30%;
  background: linear-gradient(180deg, rgba(45,26,44,0.7) 0%, transparent 100%);
  z-index: 2;
}

.v2-hero-content {
  position: relative;
  z-index: 3;
  padding: 0 60px;
  max-width: 900px;
}

.v2-hero-title {
  margin-bottom: 16px;
}
.v2-hero-outline {
  font-family: var(--font-display);
  font-size: 72px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.05;
  color: transparent;
  -webkit-text-stroke: 2px #fff;
  text-stroke: 2px #fff;
  display: block;
}

.v2-hero-subtitle {
  font-family: var(--font-secondary);
  font-size: 32px;
  font-weight: 300;
  color: var(--accent-light);
  margin-bottom: 20px;
}
.v2-hero-desc {
  font-size: 18px;
  color: rgba(255,255,255,0.85);
  line-height: 1.7;
  max-width: 600px;
  margin-bottom: 32px;
}
.v2-hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.v2-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 36px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s;
  cursor: pointer;
  border: none;
}
.v2-btn-accent {
  background: var(--accent);
  color: var(--text-dark);
}
.v2-btn-accent:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 24px rgba(212,168,83,0.4);
}
.v2-btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.4);
}
.v2-btn-outline:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.1);
}

/* ===== ABOUT SECTION SLIDESHOW (replaces image) ===== */
.v2 .about-image {
  position: relative;
  overflow: hidden;
}
.v2-about-slideshow {
  width: 100%;
  height: 100%;
  position: relative;
  cursor: pointer;
  min-height: 300px;
}
.v2-about-slideshow .hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.v2-about-slideshow .hero-slide.active { opacity: 1; }
.v2-about-slideshow .hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.v2-about-slideshow .slide-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: #fff;
  padding: 24px 16px 12px;
  font-size: 13px;
  font-weight: 500;
}
.v2-about-slideshow .slide-dots {
  position: absolute;
  bottom: 8px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 8px;
  z-index: 2;
}

/* ===== V2 BODY OVERRIDES ===== */
/* Remove original navbar and hero section styles that conflict */
body.v2 .navbar { display: none; }

/* News modal must be above the fixed header */
body.v2 .news-modal-overlay { z-index: 10001; }

/* Ensure page sections below hero render properly */
body.v2 .page-section:first-of-type {
  border-top: none;
}

/* ===== RESPONSIVE: TABLET ===== */
@media (max-width: 1024px) {
  .v2-hero-content { padding: 0 30px; }
  .v2-hero-outline { font-size: 52px; }
  .v2-hero-subtitle { font-size: 24px; }
  .v2-hero-desc { font-size: 16px; }
}

/* ===== RESPONSIVE: MOBILE ===== */
@media (max-width: 768px) {
  .v2-hero { min-height: 500px; }
  .v2-hero-content { padding: 0 20px; }
  .v2-hero-outline { font-size: 36px; }
  .v2-hero-subtitle { font-size: 20px; }
  .v2-hero-desc { font-size: 15px; }
  .v2-hero-actions { flex-direction: column; }
  .v2-btn { width: 100%; justify-content: center; }

  .v2-about-slideshow { min-height: 220px; }
}

@media (max-width: 480px) {
  .v2-hero-outline { font-size: 28px; }
  .v2-hero-subtitle { font-size: 18px; }
}
