/* ===== CSS Variables ===== */
:root {
  --primary: #29B6F6;
  --primary-light: #4FC3F7;
  --primary-dark: #0288D1;
  --primary-ultra-light: #E1F5FE;
  --primary-medium: #B3E5FC;
  --accent: #00BCD4;
  --white: #FFFFFF;
  --gray-50: #FAFBFC;
  --gray-100: #F5F6F8;
  --gray-200: #E8EAED;
  --gray-300: #D1D5DB;
  --gray-500: #6B7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --font-sans: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Noto Serif SC', Georgia, serif;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.06), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.1), 0 8px 20px rgba(0,0,0,0.06);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-sans);
  color: var(--gray-700);
  background: var(--white);
  line-height: 1.8;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; display: block; }
ul { list-style: none; }

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

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.0);
  backdrop-filter: blur(0px);
  transition: var(--transition);
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-logo {
  width: 42px;
  height: 42px;
}

.nav-school-name {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  transition: var(--transition);
}

.navbar.scrolled .nav-school-name {
  color: var(--gray-900);
}

.nav-links {
  display: flex;
  gap: 8px;
}

.nav-links a {
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  background: rgba(255,255,255,0.15);
}

.navbar.scrolled .nav-links a {
  color: var(--gray-700);
}

.navbar.scrolled .nav-links a:hover,
.navbar.scrolled .nav-links a.active {
  color: var(--primary);
  background: var(--primary-ultra-light);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}

.navbar.scrolled .nav-toggle span {
  background: var(--gray-700);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 700px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-bg-fallback {
  display: none;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    #0288D1 0%,
    #29B6F6 40%,
    #4FC3F7 70%,
    #00BCD4 100%
  );
}

.hero-overlay {
  display: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--white);
  padding: 0 24px;
}

.hero-badge {
  margin-bottom: 32px;
  animation: fadeInDown 1s ease-out;
}

.hero-logo {
  width: 120px;
  height: 120px;
  margin: 0 auto;
  filter: drop-shadow(0 4px 20px rgba(0,0,0,0.15));
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 20px;
  letter-spacing: 4px;
  animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-subtitle {
  font-size: clamp(16px, 2.5vw, 22px);
  font-weight: 300;
  letter-spacing: 6px;
  margin-bottom: 48px;
  opacity: 0.9;
  animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-bottom: 48px;
  animation: fadeInUp 1s ease-out 0.6s both;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 42px;
  font-weight: 700;
  font-family: var(--font-serif);
  display: inline;
}

.stat-unit {
  font-size: 24px;
  font-weight: 300;
  margin-left: 2px;
}

.stat-label {
  display: block;
  font-size: 14px;
  opacity: 0.8;
  margin-top: 4px;
  letter-spacing: 1px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 36px;
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.5);
  border-radius: 50px;
  color: var(--white);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 2px;
  transition: var(--transition);
  animation: fadeInUp 1s ease-out 0.8s both;
}

.hero-cta:hover {
  background: var(--white);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.7);
  font-size: 12px;
  letter-spacing: 2px;
  animation: bounce 2s infinite;
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid rgba(255,255,255,0.6);
  border-bottom: 2px solid rgba(255,255,255,0.6);
  transform: rotate(45deg);
}

/* ===== Section Common ===== */
.section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--primary);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 16px;
  letter-spacing: 2px;
}

.section-line {
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  margin: 0 auto 20px;
  border-radius: 2px;
}

.section-desc {
  font-size: 16px;
  color: var(--gray-500);
  max-width: 500px;
  margin: 0 auto;
}

/* ===== About ===== */
.about {
  background: var(--white);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-image {
  position: relative;
}

.about-img-placeholder {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4/3;
  background: var(--primary-ultra-light);
}

.about-img-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-fallback {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.img-fallback svg {
  width: 100%;
  height: 100%;
}

.about-accent {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 120px;
  height: 120px;
  border: 3px solid var(--primary-light);
  border-radius: var(--radius-lg);
  z-index: -1;
  opacity: 0.5;
}

.about-heading {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 24px;
}

.about-text {
  font-size: 16px;
  line-height: 2;
  color: var(--gray-700);
  margin-bottom: 20px;
}

.highlight {
  color: var(--primary);
  font-weight: 700;
}

.about-highlights {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 32px;
}

.highlight-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.highlight-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: var(--primary-ultra-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.highlight-item strong {
  display: block;
  font-size: 16px;
  color: var(--gray-900);
  margin-bottom: 2px;
}

.highlight-item span {
  font-size: 14px;
  color: var(--gray-500);
}

/* ===== Features ===== */
.features {
  background: var(--gray-50);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.feature-card {
  background: var(--white);
  padding: 40px 32px;
  border-radius: var(--radius-md);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  transform: scaleX(0);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-icon {
  margin-bottom: 24px;
}

.feature-card h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 12px;
}

.feature-card p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--gray-500);
}

.feature-line {
  width: 0;
  height: 2px;
  background: var(--primary-ultra-light);
  margin: 20px auto 0;
  transition: var(--transition);
}

.feature-card:hover .feature-line {
  width: 48px;
}

/* ===== Campus / Gallery ===== */
.campus {
  background: var(--white);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 200px;
  gap: 16px;
}

.gallery-large {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.gallery-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-ultra-light);
  position: relative;
}

.gallery-placeholder > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-placeholder > svg {
  width: 100%;
  height: 100%;
}

.gallery-caption {
  position: absolute;
  bottom: 16px;
  left: 16px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
}

/* ===== VR Panorama ===== */
.vr-section {
  background: var(--gray-50);
}

.vr-container {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--primary-ultra-light), var(--primary-medium));
}

.vr-container a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  transition: var(--transition);
}

.vr-container a:hover {
  transform: scale(1.02);
}

.vr-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.vr-text {
  font-size: 20px;
  font-weight: 600;
  color: var(--gray-900);
  letter-spacing: 2px;
}

/* ===== News ===== */
.news {
  background: var(--gray-50);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.news-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.news-date {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  padding: 20px;
  text-align: center;
  flex-shrink: 0;
}

.news-day {
  display: block;
  font-size: 28px;
  font-weight: 700;
  font-family: var(--font-serif);
  line-height: 1;
}

.news-month {
  display: block;
  font-size: 13px;
  margin-top: 4px;
  opacity: 0.9;
  letter-spacing: 2px;
}

.news-body {
  padding: 28px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.news-body h3 {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 12px;
  line-height: 1.5;
}

.news-body p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--gray-500);
  flex-grow: 1;
}

.news-link {
  display: inline-block;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  transition: var(--transition);
}

.news-link:hover {
  color: var(--primary-dark);
  letter-spacing: 1px;
}

/* ===== Contact ===== */
.contact {
  background: var(--white);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contact-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.contact-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  background: var(--primary-ultra-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-item strong {
  display: block;
  font-size: 16px;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.contact-item p {
  font-size: 14px;
  color: var(--gray-500);
  line-height: 1.7;
}

.contact-map {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.map-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--primary-ultra-light);
}

.map-placeholder svg {
  width: 100%;
  height: 100%;
}

/* ===== Footer ===== */
.footer {
  background: var(--gray-900);
  color: rgba(255,255,255,0.7);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-logo {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
}

.footer-motto {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--white);
  letter-spacing: 4px;
  margin-bottom: 8px;
}

.footer-slogan {
  font-size: 14px;
  opacity: 0.6;
  letter-spacing: 2px;
}

.footer-links-group h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 20px;
}

.footer-links-group ul li {
  margin-bottom: 10px;
}

.footer-links-group a {
  font-size: 14px;
  opacity: 0.7;
  transition: var(--transition);
}

.footer-links-group a:hover {
  opacity: 1;
  color: var(--primary-light);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 13px;
  opacity: 0.5;
}

/* ===== Back to Top ===== */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: var(--transition);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

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

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-8px); }
  60% { transform: translateX(-50%) translateY(-4px); }
}

/* Scroll animation */
.scroll-animate {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-animate.animated {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.features-grid .scroll-animate:nth-child(1) { transition-delay: 0.05s; }
.features-grid .scroll-animate:nth-child(2) { transition-delay: 0.1s; }
.features-grid .scroll-animate:nth-child(3) { transition-delay: 0.15s; }
.features-grid .scroll-animate:nth-child(4) { transition-delay: 0.2s; }
.features-grid .scroll-animate:nth-child(5) { transition-delay: 0.25s; }
.features-grid .scroll-animate:nth-child(6) { transition-delay: 0.3s; }

.news-grid .scroll-animate:nth-child(1) { transition-delay: 0.05s; }
.news-grid .scroll-animate:nth-child(2) { transition-delay: 0.15s; }
.news-grid .scroll-animate:nth-child(3) { transition-delay: 0.25s; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
  .gallery-large { grid-column: span 2; grid-row: span 1; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 16px 24px;
    gap: 4px;
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-links a {
    color: var(--gray-700) !important;
    padding: 12px 16px;
    font-size: 16px;
  }

  .nav-links a:hover {
    background: var(--primary-ultra-light) !important;
    color: var(--primary) !important;
  }

  .hero-stats {
    gap: 24px;
    flex-wrap: wrap;
  }

  .stat-number { font-size: 32px; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .features-grid { grid-template-columns: 1fr; }

  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 180px;
  }

  .gallery-large { grid-column: span 1; }

  .news-grid { grid-template-columns: 1fr; }

  .contact-grid { grid-template-columns: 1fr; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .section { padding: 64px 0; }
}

@media (max-width: 480px) {
  .hero-stats { gap: 16px; }
  .stat-number { font-size: 28px; }
  .hero-logo { width: 90px; height: 90px; }
}
