/* En Xin Charity Classic Clean Theme */
@font-face {
  font-family: 'icomoon';
  src: url('/assets/fonts/icomoon.eot?t0y29j');
  src: url('/assets/fonts/icomoon.eot?#iefixt0y29j') format('embedded-opentype'),
       url('/assets/fonts/icomoon.woff?t0y29j') format('woff'),
       url('/assets/fonts/icomoon.ttf?t0y29j') format('truetype'),
       url('/assets/fonts/icomoon.svg?t0y29j#icomoon') format('svg');
  font-weight: normal;
  font-style: normal;
}

[class^="dfd-icon-"], [class*=" dfd-icon-"] {
  font-family: 'icomoon' !important;
  speak: none;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.dfd-icon-house_love:before { content: "\e830"; }
.dfd-icon-plate:before { content: "\ea6f"; }
.dfd-icon-student:before { content: "\e662"; }
.dfd-icon-hands_leaf:before { content: "\eace"; }

:root {
  --primary: #c2410c; /* En Xin Terracotta Red/Orange */
  --primary-hover: #9a3412;
  --secondary: #047857;
  --dark: #1e293b;
  --text: #334155;
  --text-muted: #64748b;
  --bg-light: #f8fafc;
  --white: #ffffff;
  --border: #e2e8f0;
  --radius: 3px; /* Reduced roundness - classic crisp styling */
}

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

body {
  font-family: "Asap", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background-color: var(--white);
  line-height: 1.6;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header.site-header {
  position: sticky;
  top: 0;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.top-bar {
  background: #111827;
  color: #9ca3af;
  font-size: 0.85rem;
  padding: 8px 0;
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.top-bar a {
  color: #d1d5db;
  text-decoration: none;
}

.top-bar a:hover {
  color: #ffffff;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.site-logo img {
  height: 52px;
  width: auto;
}

.logo-text h1 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--dark);
  line-height: 1.2;
}

.logo-text span {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
  display: block;
}

nav.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

nav.main-nav a {
  color: #1f2937;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 6px;
  border-radius: var(--radius);
  transition: color 0.2s;
}

nav.main-nav a:hover,
nav.main-nav a.active {
  color: var(--primary);
}

.nav-dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #ffffff;
  min-width: 170px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  z-index: 1000;
  padding: 6px 0;
}

.dropdown-content a {
  color: var(--dark) !important;
  padding: 10px 16px !important;
  display: block !important;
  font-size: 0.9rem !important;
  border-bottom: 1px solid #f1f5f9;
  text-decoration: none;
  font-weight: 600;
}

.dropdown-content a:last-child {
  border-bottom: none;
}

.dropdown-content a:hover {
  background: var(--bg-light) !important;
  color: var(--primary) !important;
}

.nav-dropdown:hover .dropdown-content {
  display: block !important;
}

.nav-cta {
  background: var(--primary);
  color: #ffffff !important;
  padding: 9px 18px !important;
  border-radius: var(--radius);
  font-weight: 700 !important;
}

.nav-cta:hover {
  background: var(--primary-hover) !important;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--dark);
  cursor: pointer;
}

/* Classic Crisp Buttons (Less rounded) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-secondary {
  background: var(--white);
  color: var(--dark);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--bg-light);
  border-color: #94a3b8;
}

/* Clean Sharp Cards */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s;
}

.card:hover {
  border-color: #cbd5e1;
}

.card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: top;
  display: block;
}

.card-body {
  padding: 22px;
}

.card-body h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 10px;
}

.card-body p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 16px;
}

/* Grids */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 30px;
}

.section {
  padding: 60px 0;
}

.section-bg {
  background-color: var(--bg-light);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 40px auto;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--dark);
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-top: 8px;
}

/* Hero Slider - Full Viewport Landing Experience */
.hero-slider {
  position: relative;
  background: #0b1120;
  height: calc(100vh - 105px);
  height: calc(100dvh - 105px);
  min-height: 640px;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  display: flex;
  align-items: center;
}

.slide.active {
  opacity: 1;
}

.slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  transform-origin: center top;
  transform: scale(1.02);
  transition: transform 6s ease;
}

.slide.active .slide-bg {
  transform: scale(1.06);
}

.slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.75) 50%, rgba(15, 23, 42, 0.45) 100%);
}

.slide-content {
  position: relative;
  max-width: 760px;
  color: var(--white);
  padding: 50px 0;
  z-index: 2;
}

.slide-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(234, 88, 12, 0.92);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 14px;
  border-radius: 4px;
  margin-bottom: 16px;
  backdrop-filter: blur(4px);
}

.slide-content h2 {
  font-size: 2.85rem;
  line-height: 1.18;
  font-weight: 800;
  margin-bottom: 16px;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
  letter-spacing: -0.02em;
}

.slide-content p {
  font-size: 1.18rem;
  line-height: 1.6;
  color: #f1f5f9;
  margin-bottom: 28px;
  max-width: 680px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

.slider-controls {
  position: absolute;
  bottom: 28px;
  right: 32px;
  display: flex;
  gap: 10px;
  z-index: 10;
}

.slider-btn {
  background: rgba(15, 23, 42, 0.8);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.35);
  width: 44px;
  height: 44px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.15rem;
  transition: all 0.2s;
  backdrop-filter: blur(4px);
}

.slider-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.slider-dots {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.slider-dot {
  width: 28px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.25s;
}

.slider-dot.active {
  background: var(--primary);
  width: 46px;
}

/* Stats Ribbon */
.stats-ribbon {
  background: #1e293b;
  color: var(--white);
  padding: 40px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}

.stat-item h3 {
  font-size: 2.4rem;
  font-weight: 800;
  color: #fed7aa;
  margin-bottom: 4px;
}

.stat-item p {
  font-size: 0.9rem;
  color: #94a3b8;
}

/* Tax Banner (Clean, subtle box) */
.tax-badge-banner {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 30px;
}

/* Footer */
footer.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 50px 0 25px 0;
  border-top: 1px solid #1e293b;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 35px;
}

.footer-col h4 {
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.footer-col p {
  font-size: 0.88rem;
  line-height: 1.6;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.88rem;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.82rem;
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 4px;
  color: var(--dark);
}

.form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.92rem;
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
}

textarea.form-control {
  min-height: 100px;
}

/* Responsive Layout Enhancements */
@media (max-width: 992px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

@media (max-width: 768px) {
  /* Prevent iOS Safari auto-zoom on input focus */
  .form-control, input, select, textarea {
    font-size: 16px !important;
  }

  .container {
    padding: 0 16px;
  }

  /* Top Bar & Header on Mobile */
  .top-bar-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 0.78rem;
  }

  .header-inner {
    padding: 10px 0;
  }

  .site-logo {
    gap: 8px;
  }

  .site-logo img {
    height: 42px;
  }

  .logo-text h1 {
    font-size: 1.1rem;
    line-height: 1.2;
  }

  .logo-text span {
    font-size: 0.72rem;
  }

  /* Mobile Navigation Drawer */
  .mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    cursor: pointer;
    font-size: 1.5rem;
  }

  nav.main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    flex-direction: column;
    padding: 12px 18px 22px 18px;
    border-top: 1px solid var(--border);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.18);
    z-index: 9999;
    max-height: 82vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0;
  }

  nav.main-nav.show {
    display: flex;
  }

  nav.main-nav > a,
  nav.main-nav .nav-dropdown > a {
    width: 100%;
    padding: 13px 4px;
    font-size: 1rem;
    font-weight: 600;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
  }

  .nav-dropdown {
    width: 100%;
    position: static;
  }

  .dropdown-content {
    position: static !important;
    display: none !important;
    box-shadow: none !important;
    border: none !important;
    background: #f8fafc !important;
    border-left: 3px solid var(--primary) !important;
    border-radius: 0 6px 6px 0 !important;
    margin: 4px 0 10px 10px !important;
    padding: 4px 0 !important;
    min-width: unset !important;
  }

  .nav-dropdown.mobile-open .dropdown-content {
    display: block !important;
  }

  .dropdown-content a {
    padding: 10px 14px !important;
    font-size: 0.92rem !important;
    color: #334155 !important;
  }

  .nav-cta {
    width: 100% !important;
    margin-top: 16px;
    text-align: center;
    justify-content: center;
    display: flex !important;
    padding: 13px 20px !important;
    font-size: 1.05rem !important;
    border-radius: 6px !important;
  }

  /* Hero Slider on Mobile */
  .hero-slider {
    min-height: 460px;
    height: auto;
  }

  .slide {
    padding: 48px 0;
  }

  .slide-content h2 {
    font-size: clamp(1.45rem, 5.5vw, 2.1rem);
    line-height: 1.25;
    margin-bottom: 12px;
  }

  .slide-content p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 22px;
  }

  .slide-content > div[style*="display: flex"] {
    flex-direction: column !important;
    width: 100%;
    gap: 10px !important;
  }

  .slide-content .btn {
    width: 100% !important;
    justify-content: center;
  }

  /* Grids & Content */
  .footer-grid,
  .grid-2,
  .grid-3,
  .grid-4,
  .category-hub-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  section {
    padding: 44px 0;
  }

  .section-title h2 {
    font-size: 1.6rem;
  }

  .table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 440px) {
  .site-logo img {
    height: 36px;
  }
  .logo-text h1 {
    font-size: 0.95rem;
  }
  .logo-text span {
    display: none;
  }
  .hero-slider {
    min-height: 420px;
  }
}

/* Clickable Image Zoom & Global Lightbox Modal */
.clickable-image-wrap {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  border-radius: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.clickable-image-wrap:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.clickable-image-wrap:hover img {
  filter: brightness(0.96);
}

.image-lightbox-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(5px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 24px;
  animation: fadeInLightbox 0.2s ease-out;
}
.image-lightbox-modal.active {
  display: flex;
}
@keyframes fadeInLightbox {
  from { opacity: 0; }
  to { opacity: 1; }
}
.image-lightbox-container {
  position: relative;
  max-width: 95vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.image-lightbox-img {
  max-width: 92vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.image-lightbox-caption {
  margin-top: 14px;
  text-align: center;
  color: white;
  max-width: 800px;
}
.image-lightbox-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: #ffffff;
}
.image-lightbox-desc {
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.5;
}
.image-lightbox-close {
  position: absolute;
  top: -46px;
  right: 0;
  color: white;
  font-size: 1.4rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.image-lightbox-close:hover {
  background: #ef4444;
  border-color: #ef4444;
  transform: scale(1.1);
}
