* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', sans-serif;
  background: #f2f2f7;
  color: #000;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  text-decoration: none;
  color: inherit;
}

/* header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 0.5px solid rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.nav {
  display: none;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: #4da8da;
}

.nav-about {
  color: #8e8e93 !important;
  font-size: 0.85rem !important;
}

/* ========== HAMBURGER MENU ========== */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  z-index: 200;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #000;
  border-radius: 2px;
  transition: all 0.3s;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* mobile menu overlay */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 150;
  display: none;
  flex-direction: column;
  padding: 1rem 1.5rem;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.mobile-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #000;
  padding: 0.5rem;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.mobile-nav .nav-link {
  font-size: 1.1rem;
  padding: 1rem 0.5rem;
  border-bottom: 0.5px solid #f2f2f7;
  color: #000;
  display: block;
}

.mobile-nav .nav-about {
  color: #8e8e93 !important;
  font-size: 1rem !important;
  margin-top: 1rem;
  border-bottom: none;
}

/* hero */
.hero {
  text-align: center;
  padding: 2.5rem 1.5rem 1.5rem;
}

.hero h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.hero p {
  color: #8e8e93;
  margin-top: 0.3rem;
  font-size: 1rem;
}

/* ========== SLIDER ========== */
.slider-section {
  padding: 0 1.5rem 2rem;
}

.slider {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.slides {
  display: flex;
  transition: transform 0.4s ease;
}

.slide {
  min-width: 100%;
  cursor: pointer;
  position: relative;
}

.slide img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.slide-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.2rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: #fff;
}

.slide-info .slide-title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.slide-info .slide-meta {
  font-size: 0.8rem;
  opacity: 0.85;
  margin-top: 0.2rem;
}

/* dots */
.dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem;
  background: #fff;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: #d1d1d6;
  transition: all 0.3s;
}

.dot.active {
  width: 18px;
  background: #4da8da;
}

/* subject cards */
.subject-grid {
  display: flex;
  gap: 1rem;
  padding: 0 1.5rem 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.subject-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  width: 160px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: transform 0.2s;
  display: block;
}

.subject-card:active {
  transform: scale(0.96);
}

.card-image-wrapper {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #e5e5ea;
}

.card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-label {
  padding: 0.7rem;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: #000;
}

/* sections */
.section {
  padding: 0 1.5rem 2rem;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
}

/* card list */
.card-list {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.recent-item {
  padding: 0.9rem 1.1rem;
  border-bottom: 0.5px solid #f2f2f7;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.recent-item:last-child {
  border-bottom: none;
}

.item-text {
  font-weight: 500;
}

.item-date {
  color: #8e8e93;
  font-size: 0.8rem;
}

.empty-state {
  color: #8e8e93;
  font-size: 0.9rem;
  padding: 1.2rem;
  text-align: center;
}

/* ========== TELEGRAM CHANNEL CARD ========== */
.telegram-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #fff;
  padding: 1.2rem;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: transform 0.2s;
}

.telegram-card:active {
  transform: scale(0.98);
}

.telegram-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #e8f4fb;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.telegram-info {
  flex: 1;
}

.telegram-title {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  color: #000;
}

.telegram-sub {
  display: block;
  font-size: 0.8rem;
  color: #8e8e93;
  margin-top: 0.2rem;
}

.telegram-arrow {
  font-size: 1.2rem;
  color: #4da8da;
  flex-shrink: 0;
}

/* ========== SUPPORT CARDS ========== */
.support-grid {
  display: flex;
  gap: 1rem;
}

.support-card {
  flex: 1;
  background: #fff;
  padding: 1.3rem;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: transform 0.2s;
  display: block;
}

.support-card:active {
  transform: scale(0.96);
}

.support-icon {
  margin-bottom: 0.7rem;
}

.support-title {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: #000;
  margin-bottom: 0.3rem;
}

.support-desc {
  display: block;
  font-size: 0.78rem;
  color: #8e8e93;
  line-height: 1.4;
}

.support-note {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: #8e8e93;
}

.support-note a {
  color: #4da8da;
  font-weight: 500;
}

/* about */
.about-text {
  font-size: 0.93rem;
  color: #333;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.member-grid {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.member-card {
  background: #fff;
  border-radius: 18px;
  padding: 1.2rem;
  text-align: center;
  flex: 1;
  max-width: 200px;
  min-width: 150px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.member-card.featured {
  border: 2px solid #4da8da;
  box-shadow: 0 4px 16px rgba(77,168,218,0.15);
}

.member-photo {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 0.8rem;
  background: #e5e5ea;
}

.member-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-name {
  font-size: 0.95rem;
  font-weight: 600;
}

.member-role {
  font-size: 0.8rem;
  color: #8e8e93;
  margin: 0.2rem 0 0.5rem;
}

.member-telegram {
  font-size: 0.8rem;
  color: #4da8da;
  font-weight: 500;
}

/* subject page */
.subject-top {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.back-link {
  color: #4da8da;
  font-weight: 500;
}

.subject-heading {
  font-size: 1.4rem;
  font-weight: 700;
}

/* ========== SEARCH BAR ========== */
.search-section {
  padding: 0 1.5rem 1rem;
  max-width: 700px;
  margin: 0 auto;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #fff;
  border-radius: 14px;
  padding: 0.7rem 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.search-icon {
  flex-shrink: 0;
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.9rem;
  font-family: inherit;
  color: #000;
  background: transparent;
}

.search-box input::placeholder {
  color: #c7c7cc;
}

/* chapters */
.chapter-list {
  padding: 0 1.5rem 3rem;
  max-width: 700px;
  margin: 0 auto;
}

.chapter-item {
  background: #fff;
  border-radius: 16px;
  margin-bottom: 0.6rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.chapter-header {
  padding: 1rem 1.1rem;
  display: flex;
  align-items: center;
  cursor: pointer;
  gap: 0.5rem;
}

.chapter-header-text {
  flex: 1;
  font-weight: 500;
  font-size: 0.93rem;
}

.chapter-header-date {
  color: #8e8e93;
  font-size: 0.78rem;
}

.chapter-arrow {
  color: #8e8e93;
  font-size: 0.7rem;
}

.chapter-body {
  display: none;
  padding: 0 1.1rem 0;
  border-top: 0.5px solid #f2f2f7;
}

.chapter-body.open {
  display: block;
}

.chapter-body img {
  width: 100%;
  border-radius: 12px;
  margin: 1rem 0 0.8rem;
  max-height: 250px;
  object-fit: cover;
}

.notes {
  font-size: 0.9rem;
  color: #333;
  margin: 0.8rem 0;
  padding-bottom: 0.5rem;
  white-space: pre-wrap;
  line-height: 1.6;
}

.chapter-buttons {
  display: flex;
  gap: 0.6rem;
  margin: 0.5rem 0 1rem;
}

.btn {
  padding: 0.6rem 1.2rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
  display: inline-block;
}

.btn-pdf {
  background: #4da8da;
  color: #fff;
}

.btn-video {
  background: #e8f4fb;
  color: #4da8da;
}

/* ========== SUB-CHAPTERS ========== */
.subchapter-list {
  margin-top: 0.8rem;
  border-top: 0.5px solid #f2f2f7;
  padding-top: 0.5rem;
}

.subchapter-item {
  background: #f9f9fb;
  border-radius: 12px;
  margin-bottom: 0.4rem;
  overflow: hidden;
}

.subchapter-header {
  padding: 0.7rem 0.9rem;
  display: flex;
  align-items: center;
  cursor: pointer;
  gap: 0.4rem;
}

.subchapter-header-text {
  flex: 1;
  font-weight: 500;
  font-size: 0.88rem;
  color: #333;
}

.subchapter-header-date {
  color: #8e8e93;
  font-size: 0.75rem;
}

.subchapter-arrow {
  color: #8e8e93;
  font-size: 0.65rem;
}

.subchapter-body {
  display: none;
  padding: 0 0.9rem 0.9rem;
}

.subchapter-body.open {
  display: block;
}

.subchapter-body img {
  width: 100%;
  border-radius: 10px;
  margin: 0.5rem 0;
  max-height: 200px;
  object-fit: cover;
}

.subchapter-body .notes {
  font-size: 0.85rem;
  margin: 0.5rem 0;
}

.subchapter-body .btn {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
}

.subchapter-body .video-container {
  margin: 0.5rem -0.9rem 0;
  border-radius: 0 0 12px 12px;
}

.subchapter-body .video-container iframe {
  height: 200px;
}

/* ========== VIDEO - CINEMATIC EDGE TO EDGE ========== */
.video-container {
  margin: 1rem -1.1rem 0;
  border-radius: 0 0 16px 16px;
  overflow: hidden;
}

.video-container iframe {
  width: 100%;
  height: 260px;
  border: none;
  display: block;
}

/* footer */
.footer {
  text-align: center;
  padding: 2rem;
  color: #8e8e93;
  font-size: 0.8rem;
  margin-top: auto;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 480px) {
  .hero h1 { font-size: 1.6rem; }
  .subject-card { width: 140px; }
  .member-card { max-width: 160px; }
  .slide img { height: 160px; }
  .video-container iframe { height: 220px; }
  .support-grid { flex-direction: column; }
  .search-section { padding: 0 1rem 0.8rem; }
}

@media (min-width: 600px) {
  .video-container iframe { height: 400px; }
  .slide img { height: 280px; }
}

@media (min-width: 900px) {
  .video-container iframe { height: 500px; }
  .slide img { height: 350px; }
  .chapter-list { max-width: 800px; }
}