@import url('https://fonts.googleapis.com/css2?family=Abhaya+Libre:wght@400;500;600;700;800&family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --saffron: #ff9933;
  --saffron-light: #ffb866;
  --dark-bg: #111111;
  --card-bg: rgba(255, 255, 255, 0.05);
  --text-light: #f5f5f5;
  --gold: #ffd700;
  --nav-bg: rgba(17, 17, 17, 0.95);
  --glass-bg: rgba(20, 20, 20, 0.8);
  --glass-border: rgba(255, 153, 51, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Abhaya Libre', 'Poppins', serif;
}

body {
  background-color: var(--dark-bg);
  color: var(--text-light);
  overflow-x: hidden;
  line-height: 1.6;
}

/* --- NAVIGATION BAR --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background-color: var(--nav-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5%;
  z-index: 1000;
  border-bottom: 1px solid var(--glass-border);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.nav-logo-icon {
  width: 45px;
  height: 45px;
  animation: rotateLogo 10s linear infinite;
  color: var(--saffron);
  font-size: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
}

@keyframes rotateLogo {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.nav-title {
  color: var(--saffron);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.nav-menu {
  display: flex;
  gap: 25px;
  list-style: none;
}

.nav-menu li a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-menu li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--saffron);
  transition: width 0.3s ease;
}

.nav-menu li a:hover {
  background-color: rgba(255, 153, 51, 0.1);
  color: var(--saffron);
  text-shadow: 0 0 10px rgba(255, 153, 51, 0.5);
}

.nav-menu li a:hover::after {
  width: 80%;
}

/* Mobile Menu Toggle */
.mobile-menu-btn {
  display: none;
  color: var(--saffron);
  font-size: 1.8rem;
  cursor: pointer;
}

/* --- HERO SECTION --- */
.hero {
  height: 100vh;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: radial-gradient(circle at center, #2a1b0a 0%, var(--dark-bg) 100%);
  overflow: hidden;
  padding-top: 80px; /* Offset for nav */
}

/* Golden Bokeh Effect */
.bokeh {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 1;
  pointer-events: none;
}

.bokeh-particle {
  position: absolute;
  background: radial-gradient(circle, rgba(255,215,0,0.8) 0%, rgba(255,215,0,0) 70%);
  border-radius: 50%;
  animation: float 15s infinite ease-in-out;
  opacity: 0.4;
}

@keyframes float {
  0% { transform: translateY(0) scale(1); opacity: 0.2; }
  50% { transform: translateY(-50px) scale(1.2); opacity: 0.6; }
  100% { transform: translateY(0) scale(1); opacity: 0.2; }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 20px;
}

.hero-title {
  font-size: 3.5rem;
  color: var(--saffron);
  margin-bottom: 20px;
  text-shadow: 0 0 20px rgba(255, 153, 51, 0.5);
}

.hero-subtitle {
  font-size: 1.5rem;
  margin-bottom: 40px;
}

/* --- STATS COUNTER --- */
.stats-section {
  padding: 50px 5%;
  background: var(--glass-bg);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 20px;
  position: relative;
  z-index: 2;
}

.stat-box {
  text-align: center;
  padding: 20px;
}

.stat-number {
  font-size: 3rem;
  color: var(--saffron);
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  display: block;
}

.stat-label {
  font-size: 1.2rem;
  color: var(--text-light);
  margin-top: 10px;
}

/* --- COMMON SECTIONS --- */
.page-header {
  padding: 120px 5% 60px;
  text-align: center;
  background: linear-gradient(to bottom, #2a1b0a, var(--dark-bg));
  border-bottom: 1px solid var(--glass-border);
}

.page-title {
  font-size: 3rem;
  color: var(--saffron);
}

.section {
  padding: 80px 5%;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  color: var(--saffron);
  margin-bottom: 50px;
}

/* --- ABOUT PAGE (Parallax) --- */
.parallax-section {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  padding: 100px 5%;
  position: relative;
}

.parallax-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(17, 17, 17, 0.85);
}

.parallax-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  background: var(--glass-bg);
  padding: 40px;
  border-radius: 15px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* --- COURSES PAGE --- */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.course-card {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 15px;
  padding: 30px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  position: relative;
}

.course-card::before {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(255,153,51,0.1), transparent);
  transition: top 0.4s ease;
}

.course-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6);
  border-color: var(--saffron);
}

.course-card:hover::before {
  top: 0;
}

.course-icon {
  font-size: 3rem;
  color: var(--saffron);
  margin-bottom: 20px;
}

.course-title {
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: var(--saffron-light);
}

/* --- GALLERY PAGE (CINEMATIC REFACTOR) --- */
.gallery-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 40px;
}

.filter-btn {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-light);
  padding: 10px 25px;
  border-radius: 30px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.filter-btn:hover, .filter-btn.active {
  background: var(--saffron);
  border-color: var(--saffron);
  color: #fff;
  box-shadow: 0 0 15px rgba(255, 153, 51, 0.4);
}

.gallery-section-wrapper {
  margin-bottom: 50px;
  transition: opacity 0.5s ease, display 0.5s ease allow-discrete;
}

.gallery-section-wrapper.hidden {
  display: none;
  opacity: 0;
}

.gallery-category-title {
  font-size: 1.8rem;
  color: var(--saffron-light);
  margin-bottom: 20px;
  text-align: left;
  padding-left: 20px;
  border-left: 4px solid var(--saffron);
}

/* Auto-Scrolling Cinematic Track */
.scroll-container {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  padding: 20px 0;
}

/* Fading Edges purely visual */
.scroll-container::before, .scroll-container::after {
  content: '';
  position: absolute;
  top: 0;
  width: 100px;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}
.scroll-container::before {
  left: 0;
  background: linear-gradient(to right, var(--dark-bg), transparent);
}
.scroll-container::after {
  right: 0;
  background: linear-gradient(to left, var(--dark-bg), transparent);
}

.scroll-track {
  display: inline-flex;
  gap: 25px;
  padding: 0 12.5px;
  animation: scrollInfinite 30s linear infinite;
}

.scroll-container:hover .scroll-track {
  animation-play-state: paused;
}

@keyframes scrollInfinite {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-50% - 12.5px)); } 
}

/* Image Card Styling */
.gallery-card {
  width: 280px; 
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  border: 1px solid var(--glass-border);
  box-shadow: 0 5px 15px rgba(0,0,0,0.5);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-card:hover {
  border-color: var(--saffron);
  box-shadow: 0 0 20px rgba(255, 153, 51, 0.4);
}

.gallery-card:hover img {
  transform: scale(1.05);
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 40%, rgba(255, 153, 51, 0.2));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.gallery-card:hover .card-overlay {
  opacity: 1;
}

.zoom-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  color: #fff;
  font-size: 2.5rem;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 2;
}

.gallery-card:hover .zoom-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* --- EVENTS TIMELINE --- */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::after {
  content: '';
  position: absolute;
  width: 4px;
  background-color: var(--saffron);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -2px;
  border-radius: 4px;
}

.timeline-item {
  padding: 10px 40px;
  position: relative;
  width: 50%;
}

.timeline-item.left { left: 0; }
.timeline-item.right { left: 50%; }

.timeline-item::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: var(--dark-bg);
  border: 4px solid var(--saffron);
  top: 20px;
  border-radius: 50%;
  z-index: 1;
}

.timeline-item.left::after { right: -10px; }
.timeline-item.right::after { left: -10px; }

.timeline-content {
  padding: 20px;
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  position: relative;
}

.timeline-date {
  color: var(--saffron);
  font-weight: bold;
  margin-bottom: 10px;
}

/* --- NEWS PAGE --- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.news-card {
  background: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  transition: transform 0.3s;
}

.news-card:hover {
  transform: translateY(-5px);
  border-color: var(--saffron);
}

.news-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 2px solid var(--saffron);
}

.news-content {
  padding: 20px;
}

.news-date {
  font-size: 0.9rem;
  color: var(--saffron);
  margin-bottom: 10px;
}

/* --- CONTACT PAGE --- */
.contact-container {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.contact-info {
  flex: 1;
  min-width: 300px;
  background: var(--card-bg);
  padding: 40px;
  border-radius: 15px;
  border: 1px solid var(--glass-border);
}

.info-item {
  display: flex;
  align-items: center;
  margin-bottom: 25px;
  font-size: 1.2rem;
}

.info-item i {
  color: var(--saffron);
  font-size: 1.8rem;
  margin-right: 15px;
  width: 30px;
  text-align: center;
}

.contact-form-map {
  flex: 2;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.contact-form {
  background: var(--card-bg);
  padding: 40px;
  border-radius: 15px;
  border: 1px solid var(--glass-border);
}

.form-group {
  margin-bottom: 20px;
}

.form-group input, .form-group textarea {
  width: 100%;
  padding: 15px;
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
}

.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--saffron);
  box-shadow: 0 0 10px rgba(255,153,51,0.2);
}

.btn-submit {
  background: linear-gradient(45deg, var(--saffron), #e67e22);
  color: #fff;
  border: none;
  padding: 15px 30px;
  font-size: 1.1rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
  width: 100%;
}

.btn-submit:hover {
  box-shadow: 0 0 15px var(--saffron);
  transform: translateY(-2px);
}

.map-container {
  border-radius: 15px;
  overflow: hidden;
  height: 300px;
  border: 1px solid var(--glass-border);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* --- FOOTER --- */
footer {
  background-color: #0a0a0a;
  padding: 40px 5% 20px;
  text-align: center;
  border-top: 1px solid var(--glass-border);
  margin-top: auto;
}

.footer-msg {
  color: var(--saffron);
  font-size: 1.5rem;
  margin-bottom: 20px;
  font-weight: 600;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.social-icons a {
  color: var(--text-light);
  font-size: 1.8rem;
  transition: color 0.3s;
  display: inline-block;
}

.social-icons a:hover {
  color: var(--saffron);
  animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
  0% { transform: scale(1); }
  14% { transform: scale(1.3); }
  28% { transform: scale(1); }
  42% { transform: scale(1.3); }
  70% { transform: scale(1); }
}

.copyright {
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
}

/* --- LEADERSHIP SECTION --- */
.leadership-section {
  padding-top: 40px;
}
.leadership-container {
  display: flex;
  justify-content: center;
  gap: 50px;
  flex-wrap: wrap;
}

.leadership-card {
  width: 320px;
  perspective: 1000px;
  cursor: pointer;
}

.leadership-card .card-inner {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 20px;
  transform-style: preserve-3d;
  transform: rotateY(5deg) rotateX(5deg);
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.6s ease, border-color 0.6s ease;
  position: relative;
  overflow: hidden;
}

.leadership-card:nth-child(2) .card-inner {
  transform: rotateY(-5deg) rotateX(5deg);
}

.leadership-card:hover .card-inner {
  transform: translateY(-10px) rotateX(0deg) rotateY(0deg);
  box-shadow: 0 15px 35px rgba(255, 153, 51, 0.2);
  border-color: var(--saffron);
}

.card-img-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 15px;
  overflow: hidden;
  position: relative;
  margin-bottom: 20px;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.leadership-card:hover .card-img {
  transform: scale(1.08);
}

.particle-effect {
  position: absolute;
  top: 50%; 
  left: 50%; 
  transform: translate(-50%, -50%);
  width: 150%; 
  height: 150%;
  background: radial-gradient(circle at center, rgba(255,153,51,0.3) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
  mix-blend-mode: screen;
}

.leadership-card:hover .particle-effect {
  opacity: 1;
  animation: pulseGlow 3s infinite alternate;
}

@keyframes pulseGlow {
  0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.6; }
  100% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
}

.card-content {
  text-align: center;
}

.monk-name {
  color: var(--saffron);
  font-size: 1.5rem;
  margin-bottom: 5px;
  opacity: 0.8;
  transform: translateY(5px);
  transition: opacity 0.5s ease, transform 0.5s ease, text-shadow 0.5s ease;
}

.leadership-card:hover .monk-name {
  opacity: 1;
  transform: translateY(0);
  text-shadow: 0 0 12px rgba(255, 153, 51, 0.6);
}

.monk-title {
  color: var(--text-light);
  font-size: 1rem;
  opacity: 0.7;
}

/* --- DIVIDER --- */
.section-divider {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 0;
  color: var(--saffron);
  font-size: 1.5rem;
  opacity: 0.8;
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.section-divider::before, .section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--saffron));
  margin: 0 20px;
}
.section-divider::after {
  background: linear-gradient(to left, transparent, var(--saffron));
}

/* --- TEACHERS GRID --- */
.teachers-section {
  padding-top: 20px;
}

.teachers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 25px;
}

.teacher-card {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 15px;
  padding: 15px;
  text-align: center;
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s;
  cursor: pointer;
}

.teacher-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(255, 153, 51, 0.15);
  border-color: rgba(255, 153, 51, 0.5);
}

.teacher-img-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 15px;
  background: rgba(0,0,0,0.3);
}

.teacher-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.teacher-card:hover .teacher-img {
  transform: scale(1.1);
}

.teacher-name {
  color: var(--text-light);
  font-size: 1.1rem;
  font-weight: 500;
  opacity: 0.8;
  display: block;
  transition: color 0.4s ease, transform 0.4s ease, opacity 0.4s ease;
}

.teacher-card:hover .teacher-name {
  color: var(--saffron);
  transform: translateY(-3px);
  opacity: 1;
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
  .nav-title { font-size: 1.2rem; }
  .nav-menu { gap: 15px; }
  .nav-menu li a { font-size: 1rem; }
}

@media (max-width: 768px) {
  .mobile-menu-btn { display: block; }
  
  .nav-menu {
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    flex-direction: column;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    gap: 15px;
    border-bottom: 1px solid var(--glass-border);
    transform: translateY(-150%);
    transition: transform 0.3s ease;
    z-index: 999;
  }

  .nav-menu.active {
    transform: translateY(0);
  }

  .nav-menu li { text-align: center; }

  .timeline::after { left: 31px; }
  .timeline-item { width: 100%; padding-left: 70px; padding-right: 25px; }
  .timeline-item.right { left: 0; }
  .timeline-item.left::after, .timeline-item.right::after { left: 21px; }
  
  .masonry-gallery { column-count: 2; }
  .leadership-container { gap: 30px; }
  .teachers-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 15px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2.2rem; }
  .masonry-gallery { column-count: 1; }
  .section-title { font-size: 2rem; }
  .leadership-card { width: 100%; max-width: 300px; }
  .teachers-grid { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
}
