/* ===== CSS RESET & BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Color Palette - Taoist Theme */
  --primary-gold: #d4af37;
  --secondary-red: #8b0000;
  --background-cream: #f5f5dc;
  --accent-green: #2f4f2f;
  --text-dark: #2c2c2c;
  --text-light: #ffffff;
  --shadow-gold: rgba(212, 175, 55, 0.3);
  --shadow-red: rgba(139, 0, 0, 0.3);

  /* Typography */
  --font-serif: "Playfair Display", serif;
  --font-sans: "Source Sans Pro", sans-serif;

  /* Spacing */
  --section-padding: 80px 0;
  --container-padding: 0 20px;
  --card-padding: 30px;

  /* Transitions */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

body {
  font-family: var(--font-sans);
  line-height: 1.6;
  color: var(--text-dark);
  background: linear-gradient(135deg, var(--background-cream) 0%, #fff8dc 100%);
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--container-padding);
}

/* ===== 3D HEADER EFFECT ===== */
.header-3d {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(
    145deg,
    var(--primary-gold) 0%,
    var(--secondary-red) 100%
  );
  box-shadow: 0 8px 32px var(--shadow-gold), 0 4px 16px var(--shadow-red),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateZ(0);
  backdrop-filter: blur(10px);
  border-bottom: 3px solid var(--primary-gold);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  max-width: 1400px;
  margin: 0 auto;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: var(--transition-smooth);
}

.logo:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 6px 20px var(--shadow-gold);
}

.temple-name {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-light);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  margin: 0;
}

.temple-subtitle {
  font-size: 0.9rem;
  color: var(--text-light);
  opacity: 0.9;
  margin: 0;
  font-weight: 300;
}

/* ===== TAI CHI CIRCLE NAVIGATION ===== */
.nav-circle {
  display: flex;
  gap: 20px;
  align-items: center;
  position: relative;
}

.nav-item {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--text-light) 0%, #e8e8e8 100%);
  color: var(--secondary-red);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1.2rem;
  transition: var(--transition-bounce);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  position: relative;
  overflow: hidden;
}

.nav-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, var(--primary-gold), var(--secondary-red));
  opacity: 0;
  transition: var(--transition-smooth);
  border-radius: 50%;
}

.nav-item:hover::before {
  opacity: 1;
}

.nav-item:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 8px 25px var(--shadow-gold), 0 4px 15px var(--shadow-red);
  color: var(--text-light);
}

.nav-item.active {
  background: linear-gradient(
    145deg,
    var(--primary-gold),
    var(--secondary-red)
  );
  color: var(--text-light);
  transform: scale(1.1);
  box-shadow: 0 6px 20px var(--shadow-gold), 0 3px 10px var(--shadow-red);
}

.nav-item i {
  position: relative;
  z-index: 1;
}

/* ===== HERO SECTION WITH PARALLAX ===== */
.hero-section {
  height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.parallax-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 120%;
  z-index: -1;
}

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: inset(0% 0% 5% 0%);
  filter: brightness(0.7) sepia(0.3) hue-rotate(20deg);
}

.hero-content {
  text-align: center;
  color: var(--text-light);
  z-index: 2;
  max-width: 800px;
  padding: 0 20px;
  animation: fadeInUp 1s ease-out;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
  background: linear-gradient(45deg, var(--primary-gold), var(--text-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.3rem;
  margin-bottom: 40px;
  opacity: 0.95;
  font-weight: 300;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
  padding: 15px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition-bounce);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-primary {
  background: linear-gradient(45deg, var(--primary-gold), #f4d03f);
  color: var(--text-dark);
  box-shadow: 0 6px 20px var(--shadow-gold);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 30px var(--shadow-gold);
}

.btn-secondary {
  background: transparent;
  color: var(--text-light);
  border: 2px solid var(--text-light);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: var(--text-light);
  color: var(--secondary-red);
  transform: translateY(-3px) scale(1.05);
}

.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-light);
  font-size: 1.5rem;
  animation: bounce 2s infinite;
  cursor: pointer;
}

/* ===== FLOATING CARD EFFECT ===== */
.floating-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: var(--card-padding);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1), 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: var(--transition-smooth);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.floating-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 8px 25px var(--shadow-gold);
}

/* ===== SECTION STYLES ===== */
section {
  padding: var(--section-padding);
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--secondary-red);
  margin-bottom: 15px;
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(45deg, var(--primary-gold), var(--secondary-red));
  border-radius: 2px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-dark);
  opacity: 0.8;
  font-weight: 300;
}

/* ===== ABOUT SECTION ===== */
.about-section {
  background: linear-gradient(
    135deg,
    rgba(245, 245, 220, 0.8) 0%,
    rgba(255, 248, 220, 0.6) 100%
  );
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 40px;
  margin-top: 40px;
}

.about-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-image {
  margin-bottom: 20px;
  border-radius: 15px;
  overflow: hidden;
  height: 250px;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: inset(0% 0% 5% 0%);
  transition: var(--transition-smooth);
}

.card-img:hover {
  transform: scale(1.05);
}

.card-content h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--secondary-red);
  margin-bottom: 15px;
}

.card-content p {
  color: var(--text-dark);
  line-height: 1.7;
  opacity: 0.9;
}

/* ===== HISTORY TIMELINE ===== */
.history-section {
  background: linear-gradient(135deg, var(--background-cream) 0%, #fff8dc 100%);
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(
    180deg,
    var(--primary-gold),
    var(--secondary-red)
  );
  transform: translateX(-50%);
  border-radius: 2px;
}

.timeline-item {
  display: flex;
  margin-bottom: 50px;
  position: relative;
}

.timeline-item:nth-child(odd) {
  flex-direction: row;
}

.timeline-item:nth-child(even) {
  flex-direction: row-reverse;
}

.timeline-year {
  background: linear-gradient(45deg, var(--primary-gold), var(--secondary-red));
  color: var(--text-light);
  padding: 15px 25px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 6px 20px var(--shadow-gold);
  position: relative;
  z-index: 2;
  min-width: 120px;
  text-align: center;
}

.timeline-content {
  background: rgba(255, 255, 255, 0.9);
  padding: 30px;
  border-radius: 15px;
  margin: 0 30px;
  flex: 1;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.timeline-content h3 {
  font-family: var(--font-serif);
  color: var(--secondary-red);
  margin-bottom: 10px;
  font-size: 1.3rem;
}

/* ===== SERVICES SECTION ===== */
.services-section {
  background: linear-gradient(
    135deg,
    rgba(212, 175, 55, 0.1) 0%,
    rgba(139, 0, 0, 0.1) 100%
  );
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.service-card {
  text-align: center;
  padding: 40px 30px;
}

.service-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(45deg, var(--primary-gold), var(--secondary-red));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 25px;
  font-size: 2rem;
  color: var(--text-light);
  box-shadow: 0 8px 25px var(--shadow-gold);
  transition: var(--transition-smooth);
}

.service-card:hover .service-icon {
  transform: scale(1.1) rotate(10deg);
  box-shadow: 0 12px 35px var(--shadow-gold);
}

.service-card h3 {
  font-family: var(--font-serif);
  color: var(--secondary-red);
  margin-bottom: 15px;
  font-size: 1.4rem;
}

.service-card p {
  color: var(--text-dark);
  line-height: 1.6;
  opacity: 0.9;
}

/* ===== COMMUNITY SECTION ===== */
.community-section {
  background: linear-gradient(
    135deg,
    rgba(47, 79, 47, 0.1) 0%,
    rgba(212, 175, 55, 0.1) 100%
  );
}

.community-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-top: 40px;
}

.community-text h3 {
  font-family: var(--font-serif);
  color: var(--secondary-red);
  font-size: 2rem;
  margin-bottom: 25px;
}

.community-text p {
  color: var(--text-dark);
  line-height: 1.7;
  margin-bottom: 30px;
  font-size: 1.1rem;
}

.community-list {
  list-style: none;
}

.community-list li {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
  color: var(--text-dark);
  font-size: 1.1rem;
}

.community-list i {
  color: var(--primary-gold);
  font-size: 1.2rem;
  width: 20px;
}

.community-image {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.community-img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  clip-path: inset(0% 0% 5% 0%);
  transition: var(--transition-smooth);
}

.community-img:hover {
  transform: scale(1.05);
}

/* ===== SUBSCRIBE SECTION ===== */
.subscribe-section {
  background: linear-gradient(
    135deg,
    var(--secondary-red) 0%,
    var(--primary-gold) 100%
  );
  color: var(--text-light);
  text-align: center;
}

.subscribe-content h2 {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.subscribe-content p {
  font-size: 1.2rem;
  margin-bottom: 40px;
  opacity: 0.9;
}

.subscribe-form {
  max-width: 500px;
  margin: 0 auto;
}

.form-group {
  display: flex;
  gap: 15px;
  background: rgba(255, 255, 255, 0.1);
  padding: 10px;
  border-radius: 50px;
  backdrop-filter: blur(10px);
}

.form-group input {
  flex: 1;
  padding: 15px 25px;
  border: none;
  background: transparent;
  color: var(--text-light);
  font-size: 1rem;
  outline: none;
}

.form-group input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.btn-subscribe {
  background: var(--text-light);
  color: var(--secondary-red);
  border: none;
  padding: 15px 30px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-subscribe:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* ===== CONTACT SECTION ===== */
.contact-section {
  background: linear-gradient(135deg, var(--background-cream) 0%, #fff8dc 100%);
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-top: 40px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.contact-card {
  text-align: center;
  padding: 30px;
}

.contact-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(45deg, var(--primary-gold), var(--secondary-red));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.5rem;
  color: var(--text-light);
  box-shadow: 0 6px 20px var(--shadow-gold);
}

.contact-card h3 {
  font-family: var(--font-serif);
  color: var(--secondary-red);
  margin-bottom: 15px;
  font-size: 1.3rem;
}

.contact-card p {
  color: var(--text-dark);
  line-height: 1.6;
}

.contact-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin-top: 15px;
  object-fit: cover;
  clip-path: inset(0% 0% 5% 0%);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.map-container {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.map-container iframe {
  border-radius: 20px;
}

/* ===== FOOTER ===== */
.footer {
  background: linear-gradient(
    135deg,
    var(--secondary-red) 0%,
    var(--text-dark) 100%
  );
  color: var(--text-light);
  padding: 60px 0 30px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h3,
.footer-section h4 {
  font-family: var(--font-serif);
  margin-bottom: 20px;
  color: var(--primary-gold);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 10px;
}

.footer-section ul li a {
  color: var(--text-light);
  text-decoration: none;
  transition: var(--transition-smooth);
  opacity: 0.8;
}

.footer-section ul li a:hover {
  opacity: 1;
  color: var(--primary-gold);
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-link {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  text-decoration: none;
  transition: var(--transition-smooth);
  backdrop-filter: blur(10px);
}

.social-link:hover {
  background: var(--primary-gold);
  color: var(--text-dark);
  transform: translateY(-3px) scale(1.1);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  opacity: 0.8;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: 20px;
    padding: 15px 20px;
  }

  .nav-circle {
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
  }

  .nav-item {
    width: 45px;
    height: 45px;
    font-size: 1rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .timeline::before {
    left: 30px;
  }

  .timeline-item {
    flex-direction: column !important;
    padding-left: 60px;
  }

  .timeline-year {
    position: absolute;
    left: 0;
    top: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    padding: 0;
  }

  .timeline-content {
    margin: 0;
    margin-top: 20px;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .community-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contact-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .form-group {
    flex-direction: column;
    gap: 10px;
  }

  .section-title {
    font-size: 2rem;
  }

  .temple-name {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .section-padding {
    padding: 60px 0;
  }

  .card-padding {
    padding: 20px;
  }

  .nav-item {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for keyboard navigation */
.nav-item:focus,
.btn-primary:focus,
.btn-secondary:focus,
.btn-subscribe:focus {
  outline: 3px solid var(--primary-gold);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --primary-gold: #ffd700;
    --secondary-red: #dc143c;
    --text-dark: #000000;
    --text-light: #ffffff;
  }
}
