/*
Theme Name:  Won Buddhism SF
Theme URI:   https://zeminage.com
Author:      Won Buddhism San Francisco Temple
Author URI:  https://zeminage.com
Description: Custom theme for Won Buddhism San Francisco Temple
Version:     1.0.0
License:     GNU General Public License v2 or later
Text Domain: wonbuddhism
*/

/* ══ RESET ══ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Lato', sans-serif; color: #333; background: #fff; font-size: 14px; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ══ HEADER ══ */
#wbs-header {
  position: relative; top: 0; left: 0; right: 0; z-index: 999;
  background: #fff; border-bottom: 1px solid #e0e0e0;
  transition: box-shadow .3s;
}
#wbs-header.scrolled { box-shadow: 0 2px 14px rgba(0,0,0,.1); }
.header-inner {
  max-width: 960px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 20px; gap: 20px;
}

/* Logo */
.wbs-logo { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.logo-won { display: flex; align-items: baseline; line-height: 1; }
.logo-w, .logo-n { font-size: 30px; font-weight: 900; color: #111; line-height: 1; }
.logo-o { font-size: 30px; font-weight: 900; color: #D4860A; line-height: 1; }
.logo-right {
  display: flex; flex-direction: column;
  margin-left: 5px; padding-left: 5px;
  border-left: 1px solid #ddd; line-height: 1.2;
}
.logo-right .r1 { font-size: 11px; font-weight: 700; color: #111; letter-spacing: 1.5px; text-transform: uppercase; }
.logo-right .r2,
.logo-right .r3 { font-size: 8px; font-weight: 400; color: #666; letter-spacing: .8px; text-transform: uppercase; }

/* Desktop Nav */
.wbs-nav-menu { display: flex; align-items: center; gap: 24px; }
.wbs-nav-item { position: relative; }
.wbs-nav-link {
  font-size: 13px; font-weight: 400; color: #333;
  display: flex; align-items: center; gap: 3px;
  padding: 4px 0; cursor: pointer; white-space: nowrap;
  border: none; background: none; font-family: 'Lato', sans-serif;
}
.wbs-nav-link:hover, .wbs-nav-link:focus { color: #D4860A; outline: none; }
.nav-arrow { font-size: 8px; color: #888; margin-left: 2px; pointer-events: none; }

/* Dropdown */
.wbs-dropdown {
  position: absolute; top: 100%; left: 0;
  background: #D4860A; min-width: 200px;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(-2px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
  z-index: 1000;
}
.wbs-nav-item:hover .wbs-dropdown,
.wbs-nav-item:focus-within .wbs-dropdown {
  opacity: 1; visibility: visible; pointer-events: all; transform: translateY(0);
}
.wbs-dropdown a {
  display: block; padding: 10px 16px;
  font-size: 12px; color: #fff; font-weight: 400;
  border-bottom: 1px solid rgba(255,255,255,.18);
  transition: background .12s; white-space: nowrap;
}
.wbs-dropdown a:last-child { border-bottom: none; }
.wbs-dropdown a:hover, .wbs-dropdown a:focus { background: rgba(0,0,0,.18); outline: none; }
.wbs-nav-item.kb-open .wbs-dropdown {
  opacity: 1 !important; visibility: visible !important;
  pointer-events: all !important; transform: translateY(0) !important;
}

/* Social icons */
.wbs-nav-social { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.wbs-nav-social a { color: #444; display: flex; align-items: center; transition: color .15s; }
.wbs-nav-social a:hover { color: #D4860A; }
.wbs-nav-social svg { width: 15px; height: 15px; fill: currentColor; }

/* Hamburger */
.wbs-hamburger {
  display: none; flex-direction: column; gap: 4px;
  background: none; border: none; cursor: pointer; padding: 4px; flex-shrink: 0;
}
.wbs-hamburger span { width: 20px; height: 2px; background: #333; display: block; transition: all .28s; }

/* Mobile overlay + nav */
.wbs-mobile-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.45); z-index: 997;
}
.wbs-mobile-overlay.show { display: block; }
.wbs-mobile-nav {
  display: none; position: fixed; left: 0; right: 0;
  background: #fff; z-index: 998;
  border-bottom: 2px solid #D4860A;
  overflow-y: auto; max-height: 70vh;
}
.wbs-mobile-nav.show { display: block; }
.wbs-mobile-nav a {
  display: block; padding: 11px 20px;
  font-size: 13px; color: #333; border-bottom: 1px solid #f0f0f0;
}
.wbs-mobile-nav a.sub-link {
  padding-left: 36px; font-size: 12px;
  color: #D4860A; background: #fff9f0;
}
.wbs-mobile-nav a:hover { background: #f5f5f5; }

/* ══ HERO ══ */
.wbs-hero {
  margin-top: 0/*53*/px;
  position: relative; width: 100%;
  height: calc(100vh - 53px);
  min-height: 320px; max-height: 540px;
  overflow: hidden; display: flex; align-items: center;
}
.wbs-hero .hero-bg-img {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  background-repeat: no-repeat;
}
/* Fallback gradient when no image is set */
.wbs-hero .hero-bg-img:not([style*="background-image"]) {
  background: linear-gradient(to bottom,
    #e8c080 0%, #d4a855 20%, #b88a40 40%,
    #7a6040 55%, #5a7050 65%, #4a6040 80%, #3a5030 100%);
}
.wbs-hero .hero-landscape {
  position: absolute; bottom: 0; left: 0; right: 0; height: 55%;
  background: linear-gradient(to top, #2a3a22 0%, #3a5030 20%, #4a6040 40%, #5a7050 60%, transparent 100%);
}
.wbs-hero .hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,.45) 0%, rgba(0,0,0,.15) 50%, transparent 100%);
}
.wbs-hero .hero-content {
  position: relative; z-index: 2; padding: 0 60px; text-align:center;margin:0 auto;;
}
.wbs-hero .hero-content h1 {
  font-family: 'Merriweather', serif;
  font-size: clamp(32px, 5.5vw, 58px);
  font-weight: 300; color: #fff;
  line-height: 1.2; margin-bottom: 10px;
  text-shadow: 0 2px 16px rgba(0,0,0,.5);
}
.wbs-hero .hero-sub {
  font-size: 13px; font-weight: 300;
  color: rgba(255,255,255,.88); letter-spacing: .2px;
  text-shadow: 0 1px 8px rgba(0,0,0,.4);
}

/* ══ ONGOING PROGRAMS ══ */
.wbs-programs-wrap { background: #fff; padding: 30px 20px 16px; }
.wbs-programs-box {
  max-width: 920px; margin: 0 auto;
  border: 1px solid #d8d8d8;
  display: flex; align-items: stretch; background: #fff;
}
.prog-left {
  width: 190px; flex-shrink: 0;
  border-right: 1px solid #d8d8d8;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 24px 16px; gap: 10px;
}
.prog-left-label { font-size: 13px; color: #888; font-weight: 300; text-align: center; }
.prog-right { flex: 1; padding: 16px 28px; display: flex; align-items: center; }
.prog-right ul { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
.prog-right li {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 9px 0; font-size: 13px; color: #444; line-height: 1.45;
  border-bottom: 1px solid #f0f0f0;
}
.prog-right li:nth-child(odd) { padding-right: 24px; border-right: 1px solid #f0f0f0; }
.prog-right li:nth-child(even) { padding-left: 24px; }
.prog-right li:nth-last-child(-n+2) { border-bottom: none; }
.prog-bullet { width: 7px; height: 7px; border-radius: 50%; background: #D4860A; flex-shrink: 0; margin-top: 5px; }

/* ══ SEPARATOR ══ */
.wbs-section-hr { max-width: 920px; margin: 20px auto; padding: 0 20px; }
.wbs-section-hr hr { border: none; border-top: 1px solid #ddd; width: 50px; margin: 0 auto; }

/* ══ FEATURED PROGRAMS ══ */
.wbs-featured-wrap { max-width: 920px; margin: 0 auto; padding: 24px 20px 50px; }
.wbs-featured-title {
  text-align: center;
  font-family: 'Merriweather', serif;
  font-size: 21px; font-weight: 300; color: #333; margin-bottom: 26px;
}
.wbs-featured-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.wbs-feat-card { cursor: pointer; }
.wbs-feat-card-img {
  width: 100%; height: 160px;
  position: relative; overflow: hidden; margin-bottom: 10px;
  background: #c8a870;
}
.wbs-feat-card-img img {
  width: 100%; height: 100%; object-fit: cover;
}
.wbs-feat-card-title { font-size: 14px; color: #333; line-height: 1.4; font-weight: 400; }

/* ══ PRACTICE SECTION ══ */
.wbs-practice-section { background: #f0f0e4; padding: 36px 20px; }
.wbs-practice-inner { max-width: 920px; margin: 0 auto; }
.wbs-practice-inner h2 {
  font-family: 'Merriweather', serif;
  font-size: 17px; font-weight: 400; color: #D4860A; margin-bottom: 12px;
}
.wbs-practice-inner p { font-size: 13.5px; color: #555; line-height: 1.8; max-width: 760px; }

/* ══ WELCOME / ABOUT ══ */
.wbs-welcome-section { background: #f5f5f3; }
.wbs-welcome-inner { max-width: 920px; margin: 0 auto; display: flex; align-items: stretch; }
.wbs-welcome-img {
  width: 260px; flex-shrink: 0; overflow: hidden; min-height: 220px;
}
.wbs-welcome-img img { width: 100%; height: 100%; object-fit: cover; }
.wbs-welcome-text {
  flex: 1; padding: 34px 38px;
  display: flex; flex-direction: column; justify-content: center;
}
.wbs-welcome-text p { font-size: 13.5px; color: #444; line-height: 1.85; margin-bottom: 14px; }
.wbs-welcome-text p:last-child { margin-bottom: 0; }

/* ══ FOOTER ══ */
#wbs-footer { background: #222; padding: 40px 20px 0; }
.wbs-footer-inner {
  max-width: 920px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr auto 1fr;
  gap: 32px; padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  align-items: start;
}
.wbs-footer-col h4 { font-size: 13px; font-weight: 700; color: #D4860A; margin-bottom: 12px; }
.wbs-footer-col p,
.wbs-footer-col a { font-size: 12px; color: rgba(255,255,255,.55); line-height: 2; }
.wbs-footer-social { display: flex; gap: 12px; }
.wbs-footer-social a { color: rgba(255,255,255,.55); display: flex; align-items: center; transition: color .15s; }
.wbs-footer-social a:hover { color: #D4860A; }
.wbs-footer-social svg { width: 15px; height: 15px; fill: currentColor; }
.wbs-email-form label { font-size: 11px; color: rgba(255,255,255,.5); display: block; margin-bottom: 4px; }
.wbs-email-form input {
  width: 100%; padding: 7px 9px;
  background: #fff; border: 1px solid #bbb;
  font-size: 12px; color: #333; font-family: 'Lato', sans-serif;
  margin-bottom: 8px;
}
.wbs-email-form input::placeholder { color: #aaa; }
.wbs-email-form input:focus { outline: 2px solid #D4860A; }
.wbs-footer-bottom { max-width: 920px; margin: 0 auto; padding: 16px 0; text-align: center; }
.wbs-footer-bottom p { font-size: 11px; color: rgba(255,255,255,.28); }

/* ══ RESPONSIVE ══ */
@media (max-width: 800px) {
  .wbs-nav-menu, .wbs-nav-social { display: none; }
  .wbs-hamburger { display: flex; }
  .wbs-hero .hero-content { padding: 0 24px; }
  .prog-right ul { grid-template-columns: 1fr; }
  .prog-right li:nth-child(odd) { border-right: none; padding-right: 0; }
  .prog-right li:nth-child(even) { padding-left: 0; }
  .prog-right li:nth-last-child(-n+2) { border-bottom: 1px solid #f0f0f0; }
  .prog-right li:last-child { border-bottom: none; }
  .wbs-featured-grid { grid-template-columns: 1fr; gap: 16px; }
  .wbs-welcome-inner { flex-direction: column; }
  .wbs-welcome-img { width: 100%; min-height: 180px; }
  .wbs-footer-inner { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 500px) {
  .wbs-programs-box { flex-direction: column; }
  .prog-left { width: 100%; border-right: none; border-bottom: 1px solid #d8d8d8; flex-direction: row; padding: 14px 16px; justify-content: flex-start; }
  .wbs-hero .hero-content h1 { font-size: 28px; }
}
