* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Tajawal", sans-serif;
  background: #f9f3f7;
  color: #3a2834;
  overflow-x: hidden;
}

body.dark {
  background: #130912;
  color: #fce9f5;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: rgba(252, 233, 242, 0.95);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(187, 118, 149, 0.3);
}

body.dark .navbar {
  background: rgba(31, 16, 29, 0.95);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

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

.nav-logo {
  font-weight: 700;
  font-size: 20px;
  color: #b04673;
}

.nav-logo span {
  color: #e777a5;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 18px;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  font-size: 14px;
  color: #5c4052;
}

body.dark .nav-links a {
  color: #f7ddeb;
}

.nav-links a:hover {
  color: #b04673;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-cta {
  background: linear-gradient(135deg, #e777a5, #b04673);
  color: #fff;
  padding: 8px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 14px;
  box-shadow: 0 6px 18px rgba(176, 70, 115, 0.3);
}

.nav-cta:hover {
  filter: brightness(1.05);
}

.lang-toggle,
.icon-btn {
  border: 1px solid rgba(176, 70, 115, 0.4);
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  color: #5c4052;
}

body.dark .lang-toggle,
body.dark .icon-btn {
  background: #261325;
  color: #fce9f5;
  border-color: rgba(255, 255, 255, 0.2);
}

.lang-toggle:hover,
.icon-btn:hover {
  background: #fdf3f8;
}

body.dark .lang-toggle:hover,
body.dark .icon-btn:hover {
  background: #3a1a37;
}

.particles {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}

.particles span {
  position: absolute;
  bottom: -80px;
  width: 18px;
  height: 18px;
  background: radial-gradient(circle, rgba(247, 210, 231, 0.95), rgba(247, 210, 231, 0));
  border-radius: 50%;
  animation: floatUp 22s linear infinite;
  opacity: 0.7;
}

body.dark .particles span {
  background: radial-gradient(circle, rgba(107, 58, 90, 0.9), rgba(107, 58, 90, 0));
}

.particles span:nth-child(1) { left: 5%;  animation-duration: 19s; animation-delay: 0s; }
.particles span:nth-child(2) { left: 18%; animation-duration: 24s; animation-delay: 2s; }
.particles span:nth-child(3) { left: 35%; animation-duration: 21s; animation-delay: 4s; }
.particles span:nth-child(4) { left: 52%; animation-duration: 26s; animation-delay: 1s; }
.particles span:nth-child(5) { left: 68%; animation-duration: 20s; animation-delay: 3s; }
.particles span:nth-child(6) { left: 80%; animation-duration: 23s; animation-delay: 5s; }
.particles span:nth-child(7) { left: 90%; animation-duration: 27s; animation-delay: 7s; }
.particles span:nth-child(8) { left: 25%; animation-duration: 25s; animation-delay: 9s; }
.particles span:nth-child(9) { left: 60%; animation-duration: 29s; animation-delay: 11s; }
.particles span:nth-child(10){ left: 40%; animation-duration: 31s; animation-delay: 13s; }

@keyframes floatUp {
  0% { transform: translateY(0) scale(0.7); opacity: 0; }
  15% { opacity: 0.8; }
  100% { transform: translateY(-120vh) scale(1.2); opacity: 0; }
}

.hero {
  padding: 60px 16px 40px;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
}

.hero-text h1 {
  font-size: 40px;
  margin: 8px 0 12px;
  color: #5a3246;
}

body.dark .hero-text h1 {
  color: #fbe4f3;
}

.hero-kicker {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b04673;
}

.hero-sub {
  font-size: 14px;
  line-height: 1.8;
  color: #624457;
  max-width: 430px;
}

body.dark .hero-sub {
  color: #f1cadd;
}

.hero-actions {
  margin-top: 18px;
  display: flex;
  gap: 10px;
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 14px;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #e777a5, #b04673);
  color: #fff;
  box-shadow: 0 6px 16px rgba(176, 70, 115, 0.35);
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-ghost {
  border: 1px solid rgba(176, 70, 115, 0.4);
  color: #5c4052;
  background: rgba(255, 255, 255, 0.7);
}

body.dark .btn-ghost {
  background: rgba(27, 14, 25, 0.9);
  color: #fce9f5;
  border-color: rgba(255, 255, 255, 0.25);
}

.hero-image {
  display: flex;
  justify-content: center;
}

.hero-img {
  width: 320px;
  max-width: 90%;
  border-radius: 40px;
  box-shadow: 0 18px 40px rgba(48, 31, 40, 0.45);
  animation: glowCard 4s ease-in-out infinite alternate;
}

@keyframes glowCard {
  from { box-shadow: 0 18px 40px rgba(48, 31, 40, 0.6); }
  to   { box-shadow: 0 26px 60px rgba(176, 70, 115, 0.7); }
}

.about {
  margin-top: 16px;
  padding: 22px 20px;
  background: #fbe9f2;
  border-radius: 26px;
  box-shadow: 0 10px 26px rgba(176, 70, 115, 0.18);
}

body.dark .about {
  background: #2a1527;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.6);
}

.about h2 {
  margin-top: 0;
  color: #b04673;
}

body.dark .about h2 {
  color: #f8bfdc;
}

.about p {
  font-size: 14px;
  line-height: 1.9;
}

.courses {
  margin-top: 40px;
}

.courses h2 {
  text-align: center;
  color: #5a3246;
}

body.dark .courses h2 {
  color: #fbe4f3;
}

.courses-sub {
  text-align: center;
  font-size: 14px;
  color: #7a5870;
  max-width: 500px;
  margin: 6px auto 22px;
}

body.dark .courses-sub {
  color: #f1cadd;
}

.course-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 16px;
}

.filter-pill {
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  border: 1px solid rgba(176, 70, 115, 0.3);
  background: #fff;
  cursor: pointer;
}

.filter-pill.active {
  background: linear-gradient(135deg, #e777a5, #b04673);
  color: #fff;
  border-color: transparent;
}

body.dark .filter-pill {
  background: #261325;
  color: #fce9f5;
  border-color: rgba(255, 255, 255, 0.2);
}

body.dark .filter-pill.active {
  background: linear-gradient(135deg, #e777a5, #b04673);
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}

.course-card {
  background: #ffffff;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(105, 69, 89, 0.18);
  display: flex;
  flex-direction: column;
}

body.dark .course-card {
  background: #261325;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.7);
}

.course-img-wrap {
  position: relative;
  height: 190px;
  overflow: hidden;
  cursor: zoom-in;
}

.course-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 0.7s ease;
}

.course-card:hover .course-img-wrap img {
  transform: scale(1.09);
}

.course-content {
  padding: 16px 18px 18px;
}

.course-title {
  font-size: 18px;
  margin: 0 0 6px;
  color: #5a3246;
}

body.dark .course-title {
  color: #fbe4f3;
}

.course-desc {
  font-size: 13px;
  line-height: 1.8;
  color: #6a4a5f;
}

body.dark .course-desc {
  color: #f1cadd;
}

.course-meta {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.course-price {
  font-weight: 700;
  color: #b04673;
}

body.dark .course-price {
  color: #f7c1df;
}

.course-tag {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fbe9f2;
  color: #7a5870;
}

body.dark .course-tag {
  background: #3a1a37;
  color: #f1cadd;
}

.course-actions {
  margin-top: 14px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.wa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 13px;
  background: linear-gradient(135deg, #e777a5, #b04673);
  color: #fff;
  box-shadow: 0 6px 16px rgba(176, 70, 115, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wa-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(176, 70, 115, 0.45);
}

.detail-link {
  font-size: 12px;
  text-decoration: none;
  color: #7a5870;
}

body.dark .detail-link {
  color: #f1cadd;
}

.detail-link:hover {
  text-decoration: underline;
}

.testimonials {
  margin-top: 52px;
}

.testimonials h2 {
  text-align: center;
  color: #5a3246;
}

body.dark .testimonials h2 {
  color: #fbe4f3;
}

.testimonial-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.testimonial-card {
  background: #fbe9f2;
  border-radius: 22px;
  padding: 18px 20px;
  box-shadow: 0 8px 22px rgba(105, 69, 89, 0.2);
  position: relative;
  overflow: hidden;
}

body.dark .testimonial-card {
  background: #2a1527;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.7);
}

.testimonial-card::before {
  content: "“";
  position: absolute;
  font-size: 60px;
  color: rgba(224, 153, 186, 0.5);
  top: -20px;
  left: 18px;
}

.quote {
  font-size: 13px;
  line-height: 1.9;
}

.name {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #b04673;
}

body.dark .name {
  color: #f7c1df;
}

.contact {
  margin-top: 52px;
  text-align: center;
  padding: 22px 16px 26px;
  background: #fbe9f2;
  border-radius: 26px;
  box-shadow: 0 8px 20px rgba(176, 70, 115, 0.18);
}

body.dark .contact {
  background: #2a1527;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.7);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin-top: 16px;
}

.contact-grid a {
  color: #b04673;
  text-decoration: none;
  font-weight: 600;
}

body.dark .contact-grid a {
  color: #f7c1df;
}

footer {
  text-align: center;
  padding: 26px 10px 34px;
  background: #f2d5e3;
  font-size: 13px;
}

body.dark footer {
  background: #1c0e1a;
}

.admin-secret {
  font-size: 8px;
  opacity: 0.01;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(17, 10, 17, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 60;
}

.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}

.lightbox-close {
  position: absolute;
  top: -22px;
  inset-inline-end: 0;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}

/* Scroll animations */
.scroll-anim {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease, scale 0.8s ease;
}

.scroll-anim.fade.in-view {
  opacity: 1;
  transform: none;
}

.scroll-anim.up.in-view {
  opacity: 1;
  transform: translateY(0);
}

.scroll-anim.zoom {
  transform: scale(0.92);
}

.scroll-anim.zoom.in-view {
  opacity: 1;
  transform: scale(1);
}

/* Admin + auth */
.admin-body {
  background: #f9f0f6;
}

.admin-header {
  text-align: center;
  padding: 26px 10px;
  background: #b04673;
  color: #fff;
  border-radius: 0 0 22px 22px;
}

.admin-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

.admin-section {
  background: #ffffff;
  border-radius: 24px;
  padding: 20px;
  box-shadow: 0 10px 24px rgba(143, 94, 119, 0.25);
  margin-bottom: 24px;
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hint {
  font-size: 12px;
  color: #7a5870;
}

.input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(176, 70, 115, 0.4);
  font-size: 14px;
}

.textarea {
  height: 120px;
  resize: vertical;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: linear-gradient(135deg, #e777a5, #b04673);
  color: #fff;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(176, 70, 115, 0.35);
}

.button:hover {
  filter: brightness(1.05);
}

.button-secondary {
  background: #f3d1e3;
  color: #5c4052;
  box-shadow: none;
}

.button-secondary:hover {
  background: #e5b5d1;
}

#adminCourseList .course-card {
  margin-top: 10px;
}

/* Auth pages */
.auth-body {
  background: #f9f0f6;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.auth-card {
  background: #ffffff;
  padding: 26px 22px;
  border-radius: 24px;
  box-shadow: 0 10px 28px rgba(143, 94, 119, 0.25);
  max-width: 360px;
  width: 92%;
}

.auth-card h1 {
  margin-top: 0;
  margin-bottom: 12px;
  color: #b04673;
  text-align: center;
}

.auth-alt {
  font-size: 13px;
  margin-top: 12px;
  text-align: center;
}

/* Detail page */
.detail-body {
  background: #f9f3f7;
}

.detail-main {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 16px 40px;
}

.back-link {
  text-decoration: none;
  font-size: 14px;
  color: #7a5870;
}

.back-link:hover {
  text-decoration: underline;
}

.course-detail-card {
  margin-top: 18px;
  background: #ffffff;
  border-radius: 26px;
  box-shadow: 0 12px 28px rgba(105, 69, 89, 0.2);
  padding: 18px 18px 24px;
}

.course-detail-img-wrap img {
  width: 100%;
  border-radius: 22px;
  margin-bottom: 18px;
}

.detail-price {
  font-weight: 700;
  color: #b04673;
}

.detail-tag {
  font-size: 13px;
  color: #7a5870;
  margin-bottom: 10px;
}

.detail-desc {
  font-size: 14px;
  line-height: 1.9;
  margin-bottom: 16px;
}

.detail-wa {
  margin-top: 6px;
}

/* RTL / LTR */
html[dir="ltr"] body {
  direction: ltr;
  text-align: left;
}

html[dir="ltr"] .hero-inner {
  direction: ltr;
}

html[dir="ltr"] .testimonial-card::before {
  left: auto;
  right: 18px;
}

/* Responsive */
@media (max-width: 850px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-text {
    order: 2;
  }
  .hero-image {
    order: 1;
  }
  .hero-sub {
    max-width: none;
    margin: 0 auto;
  }
  .hero-actions {
    justify-content: center;
  }
}

@media (max-width: 720px) {
  .navbar {
    flex-wrap: wrap;
    gap: 8px;
  }
  .nav-links {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }
  .nav-cta {
    margin-inline-start: auto;
  }
}
