/* =============================================
   HAKUBAI ZEN CENTER — Global Stylesheet
   Design: Modern Zen (Option B)
   ============================================= */

/* ===== TEACHER LINKS (global) ===== */
a.teacher-link {
  color: #8b6914;
  text-decoration: none;
  font-weight: 500;
}
a.teacher-link:hover {
  text-decoration: underline;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-weight: 300;
  color: #2a2a2a;
  background: #f9f7f4;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 { font-family: 'Noto Serif JP', 'Georgia', serif; font-weight: 200; }
h1 { font-size: clamp(2.2rem, 6vw, 4rem); line-height: 1.2; }
h2 { font-size: clamp(1.6rem, 4vw, 2.6rem); line-height: 1.3; }
h3 { font-size: 1.3rem; line-height: 1.4; }
h4 { font-size: 1.1rem; }
p { max-width: 680px; }
a { color: inherit; text-decoration: none; }

/* ===== HEADER / NAV ===== */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.4s, box-shadow 0.4s;
}
header.scrolled {
  background: rgba(249,247,244,0.96);
  box-shadow: 0 1px 20px rgba(0,0,0,0.06);
  backdrop-filter: blur(12px);
}
/* Inner pages: header starts solid */
header.solid {
  background: rgba(249,247,244,0.96);
  box-shadow: 0 1px 20px rgba(0,0,0,0.06);
}
header.solid .logo-text { color: #2a2a2a; text-shadow: none; }
header.solid nav a { color: #555; text-shadow: none; }
header.solid .nav-toggle span { background: #2a2a2a; }

.header-inner {
  max-width: 1300px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.2rem 2.5rem;
}
.logo { display: flex; align-items: center; gap: 0.7rem; }
.logo-img {
  height: 38px; width: 38px;
  object-fit: contain;
}
.logo-kanji {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.8rem; font-weight: 300;
  color: #8b6914;
}
.logo-text {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.05rem; font-weight: 400;
  letter-spacing: 0.2em;
  color: #fff;
  transition: color 0.4s;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
header.scrolled .logo-text { color: #2a2a2a; text-shadow: none; }

nav { display: flex; gap: 2rem; align-items: center; }
nav a {
  font-size: 0.8rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.13em;
  color: rgba(255,255,255,0.95);
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
  transition: color 0.3s, text-shadow 0.3s;
  padding: 0.3rem 0;
}
header.scrolled nav a { text-shadow: none; }
header.scrolled nav a { color: #555; }
nav a:hover, nav a.active { color: #8b6914; }

/* ===== NAV DROPDOWNS ===== */
.nav-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}
.nav-dropdown > a::after {
  content: ' ▾';
  font-size: 0.6em;
  opacity: 0.6;
}
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(249,247,244,0.98);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.1);
  min-width: 200px;
  padding: 0.6rem 0;
  z-index: 200;
}
.nav-dropdown:hover .nav-dropdown-menu {
  display: block;
}
.nav-dropdown-menu a {
  display: block;
  padding: 0.5rem 1.2rem;
  font-size: 0.72rem !important;
  font-weight: 400 !important;
  text-transform: none !important;
  letter-spacing: 0.02em !important;
  color: #555 !important;
  text-shadow: none !important;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.nav-dropdown-menu a:hover {
  background: #f0ece6;
  color: #8b6914 !important;
}

/* Mobile dropdowns */
@media (max-width: 1280px) {
  .nav-dropdown-menu {
    position: static;
    transform: none;
    box-shadow: none;
    background: transparent;
    backdrop-filter: none;
    padding: 0 0 0 1rem;
    display: none;
  }
  .nav-dropdown.open .nav-dropdown-menu {
    display: block;
  }
  .nav-dropdown-menu a {
    padding: 0.4rem 0;
    font-size: 0.78rem !important;
    color: #888 !important;
  }
}

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.nav-toggle span { display: block; width: 24px; height: 1.5px; background: #fff; margin: 6px 0; transition: 0.3s; }
header.scrolled .nav-toggle span { background: #2a2a2a; }

@media (max-width: 1280px) {
  .header-inner { padding: 1rem 1.5rem; }
  .nav-toggle { display: block; }
  nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #f9f7f4; flex-direction: column; padding: 2rem 2.5rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08); gap: 1.2rem;
  }
  nav.open { display: flex; }
  nav a { color: #2a2a2a !important; }
}

/* ===== PAGE HERO (inner pages) ===== */
.page-hero {
  position: relative;
  height: 45vh; min-height: 350px;
  display: flex; align-items: flex-end;
  overflow: hidden;
}
.page-hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.page-hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.5) 100%);
}
.page-hero-content {
  position: relative; z-index: 2;
  padding: 3rem 2.5rem;
  max-width: 1300px; margin: 0 auto; width: 100%;
}
.page-hero h1 { color: #fff; }
.page-hero .subtitle {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem; font-weight: 300;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

/* ===== SECTIONS ===== */
section { padding: 3rem 2.5rem; }
.section-inner { max-width: 1100px; margin: 0 auto; }
.section-warm { background: #f9f7f4; }
.section-white { background: #fff; }
.section-dark { background: #2a2621; color: #e8e2d8; }
.centered { text-align: center; }

/* ===== CONTENT BLOCKS ===== */
.content-block { margin-bottom: 3rem; }
.content-block h2 { margin-bottom: 1rem; }
.content-block h3 { margin-bottom: 0.8rem; color: #6b5b4e; }
.content-block p { color: #555; margin-bottom: 1rem; }

/* ===== SPLIT LAYOUTS ===== */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.split.reverse { direction: rtl; }
.split.reverse > * { direction: ltr; }
.split img {
  width: 100%; object-fit: cover;
}
@media (max-width: 768px) {
  .split, .split.reverse { grid-template-columns: 1fr; gap: 2rem; direction: ltr; }
}

/* ===== CARD GRID ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}
.card {
  background: #fff;
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.3s;
}
.card:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.08); transform: translateY(-2px); }
.card img { width: 100%; height: 200px; object-fit: cover; }
.card-body { padding: 1.5rem; }
.card-body .label {
  font-size: 0.7rem; color: #8b6914;
  text-transform: uppercase; letter-spacing: 0.12em;
  margin-bottom: 0.3rem;
}
.card-body h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.card-body p { font-size: 0.88rem; color: #777; }

/* ===== SCHEDULE GRID ===== */
.schedule-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.schedule-item {
  padding: 2rem;
  border-right: 1px solid rgba(255,255,255,0.08);
  text-align: center;
}
.schedule-item:last-child { border-right: none; }
.schedule-item .day {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.3rem; font-weight: 200;
  color: #d4a843;
  margin-bottom: 0.5rem;
}
.schedule-item .time { font-size: 0.95rem; color: #c8c0b0; }
.schedule-item .desc { font-size: 0.8rem; color: #8a8070; margin-top: 0.4rem; }
@media (max-width: 768px) {
  .schedule-row { grid-template-columns: 1fr 1fr; }
  .schedule-item { border-bottom: 1px solid rgba(255,255,255,0.08); }
}

/* ===== GALLERY GRID ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.5rem;
}
.gallery-grid img {
  width: 100%; height: 250px; object-fit: cover;
  cursor: pointer;
  transition: opacity 0.3s;
}
.gallery-grid img:hover { opacity: 0.85; }

/* Gallery lightbox */
.lightbox {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.92);
  justify-content: center; align-items: center;
  cursor: pointer;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 90vw; max-height: 90vh; object-fit: contain;
}
.lightbox-close {
  position: absolute; top: 1.5rem; right: 2rem;
  color: #fff; font-size: 2rem; cursor: pointer;
  background: none; border: none;
}

/* ===== PHOTO STRIP ===== */
.photo-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.photo-strip img {
  width: 100%; height: 280px; object-fit: cover;
  transition: opacity 0.3s;
}
.photo-strip img:hover { opacity: 0.85; }
@media (max-width: 768px) {
  .photo-strip { grid-template-columns: 1fr 1fr; }
  .photo-strip img { height: 200px; }
}

/* ===== TEACHER PROFILES ===== */
.teacher-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  align-items: start;
  padding: 2rem 0;
  border-bottom: 1px solid #eee;
}
.teacher-card:last-child { border-bottom: none; }
.teacher-card img {
  width: 100%; aspect-ratio: 3/4; object-fit: cover;
}
.teacher-card .name {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.4rem; font-weight: 200;
  margin-bottom: 0.2rem;
}
.teacher-card .dharma-name {
  font-size: 0.85rem; color: #8b6914;
  letter-spacing: 0.08em;
  margin-bottom: 0.3rem;
}
.teacher-card .role {
  font-size: 0.78rem; color: #999;
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 1rem;
}
.teacher-card .bio { font-size: 0.92rem; color: #555; }
@media (max-width: 768px) {
  .teacher-card { grid-template-columns: 120px 1fr; gap: 1.2rem; }
}

/* ===== EVENTS LIST ===== */
.event-item {
  display: grid;
  grid-template-columns: 100px 1fr 120px;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid #eee;
}
.event-date {
  text-align: center;
  padding: 0.8rem;
  background: #f9f7f4;
}
.event-date .month {
  font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.12em; color: #8b6914;
}
.event-date .day {
  font-family: 'Noto Serif JP', serif;
  font-size: 2rem; font-weight: 200;
  color: #2a2a2a;
}
.event-info h3 { font-size: 1.1rem; margin-bottom: 0.3rem; }
.event-info .meta {
  font-size: 0.8rem; color: #999;
}
.event-type {
  font-size: 0.68rem; text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.4rem 0.5rem;
  border: 1px solid #ddd;
  color: #888;
  white-space: nowrap;
  border-radius: 2px;
  align-self: start;
  text-align: center;
  display: block;
  width: 100%;
  box-sizing: border-box;
}
.event-type.type-sesshin {
  color: #6b4400; background: #ffeaa7; border-color: #d4a017;
}
.event-type.type-retreat {
  color: #5a4510; background: #f0e6d0; border-color: #8b6914;
}
.event-type.type-practice {
  color: #3a6b3a; background: #e8f5e8; border-color: #5a9a5a;
}
.event-type.type-workshop {
  color: #2a4a6b; background: #e6f0ff; border-color: #4a8abf;
}
.event-type.type-ceremony {
  color: #6b2a50; background: #f5e6f0; border-color: #a04a80;
}
.event-type.type-special {
  color: #2a2a2a; background: #fff0e6; border-color: #e67e22;
}
@media (max-width: 768px) {
  .event-item { grid-template-columns: 80px 1fr; }
  .event-type { display: none; }
}

/* ===== CONTACT FORM ===== */
.form-group { margin-bottom: 1.2rem; }
.form-group label {
  display: block;
  font-size: 0.78rem; font-weight: 400;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: #888;
  margin-bottom: 0.4rem;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid #ddd;
  background: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.92rem;
  font-weight: 300;
  color: #2a2a2a;
  transition: border-color 0.3s;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #8b6914;
}
.form-group textarea { min-height: 150px; resize: vertical; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem; font-weight: 400;
  text-transform: uppercase; letter-spacing: 0.14em;
  padding: 0.9rem 2.5rem;
  border: 1px solid #6b5b4e;
  color: #6b5b4e;
  background: transparent;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 1.5rem;
}
.btn:hover { background: #6b5b4e; color: #fff; }
.btn-light { border-color: #d4a843; color: #d4a843; }
.btn-light:hover { background: #d4a843; color: #2a2621; }
.btn-solid { background: #6b5b4e; color: #fff; border-color: #6b5b4e; }
.btn-solid:hover { background: #8b6914; border-color: #8b6914; }

/* ===== ORNAMENTS ===== */
.ornament {
  display: block;
  width: 40px; height: 1px;
  background: #d4a843;
  margin: 2rem auto 0;
}
.ornament-left { margin: 1.5rem 0; }

/* ===== FOOTER ===== */
footer {
  background: #1e1c19;
  color: #9a9080;
  padding: 4rem 2.5rem 2rem;
  font-size: 0.85rem;
}
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
}
footer h3 {
  font-family: 'Noto Serif JP', serif;
  font-weight: 200;
  color: #d4c5a0;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}
footer a { color: #9a9080; transition: color 0.3s; }
footer a:hover { color: #d4a843; }
.footer-address { line-height: 1.8; }
.footer-links p { margin-bottom: 0.5rem; }

.newsletter-form {
  display: flex; gap: 0;
  margin-top: 1.2rem;
  max-width: 360px;
}
.newsletter-form input {
  flex: 1;
  padding: 0.7rem 1rem;
  border: 1px solid #3a3530;
  border-right: none;
  background: #2a2621;
  color: #d4c5a0;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
}
.newsletter-form input::placeholder { color: #6a6050; }
.newsletter-form button {
  padding: 0.7rem 1.5rem;
  background: #8b6914;
  color: #fff;
  border: 1px solid #8b6914;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: background 0.3s;
}
.newsletter-form button:hover { background: #a07a1a; }

.footer-bottom {
  max-width: 1100px; margin: 3rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid #2a2621;
  display: flex; justify-content: space-between;
  font-size: 0.75rem; color: #5a5040;
}
@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; }
}

/* ===== NOTIFICATION / TOAST ===== */
.toast {
  position: fixed; bottom: 2rem; right: 2rem;
  background: #2a2621; color: #e8e2d8;
  padding: 1rem 1.5rem;
  font-size: 0.88rem;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  z-index: 1000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s;
}
.toast.show { transform: translateY(0); opacity: 1; }
