/* ==========================================================
   RUSTIC Website - Enterprise NGO Component Library
   ========================================================== */

/* 1. Buttons & CTA Elements */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--font-sans);
  font-size: 0.94rem;
  font-weight: 700;
  padding: 12px 26px;
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.btn i {
  font-size: 0.92rem;
  transition: transform var(--transition-fast);
}

.btn:hover i {
  transform: translateX(3px);
}

.btn-primary, .btn-terracotta {
  background: linear-gradient(135deg, var(--terracotta-700) 0%, var(--terracotta-900) 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(192, 82, 74, 0.38);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-primary:hover, .btn-terracotta:hover {
  background: linear-gradient(135deg, var(--terracotta-600) 0%, var(--terracotta-800) 100%);
  box-shadow: 0 7px 22px rgba(192, 82, 74, 0.48);
  transform: translateY(-2px);
  color: #ffffff;
}

.btn-navy {
  background: linear-gradient(135deg, var(--primary-900) 0%, var(--primary-950) 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(15, 48, 87, 0.38);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-navy:hover {
  background: linear-gradient(135deg, var(--primary-800) 0%, var(--primary-900) 100%);
  box-shadow: 0 7px 22px rgba(15, 48, 87, 0.48);
  transform: translateY(-2px);
  color: #ffffff;
}

.btn-green, .btn-secondary {
  background: linear-gradient(135deg, var(--secondary-700) 0%, var(--secondary-900) 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(32, 98, 54, 0.38);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-green:hover, .btn-secondary:hover {
  background: linear-gradient(135deg, var(--secondary-600) 0%, var(--secondary-800) 100%);
  box-shadow: 0 7px 22px rgba(32, 98, 54, 0.48);
  transform: translateY(-2px);
  color: #ffffff;
}

.btn-outline {
  background: transparent;
  border-color: var(--primary-900);
  color: var(--primary-900);
}

.btn-outline:hover {
  background: var(--primary-900);
  color: #ffffff;
  transform: translateY(-2px);
}

[data-theme="dark"] .btn-outline {
  border-color: var(--primary-400);
  color: var(--primary-400);
}

[data-theme="dark"] .btn-outline:hover {
  background: var(--primary-600);
  color: #ffffff;
  border-color: var(--primary-600);
}

.btn-white {
  background: #ffffff;
  color: var(--primary-900);
  box-shadow: var(--shadow-md);
}

.btn-white:hover {
  background: #f8fafc;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--primary-950);
}

.btn-outline-white {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
  backdrop-filter: blur(8px);
}

.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #ffffff;
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.84rem;
}

.btn-lg {
  padding: 15px 34px;
  font-size: 1.05rem;
}

/* 2. Thematic Program Cards */
.programs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.program-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.program-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-500);
}

.program-img-wrapper {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.program-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.program-card:hover .program-img-wrapper img {
  transform: scale(1.06);
}

.program-icon-badge {
  position: absolute;
  bottom: -20px;
  right: 22px;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
  color: #ffffff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: var(--shadow-md);
  border: 3px solid var(--bg-surface);
}

.program-content {
  padding: 32px 26px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.program-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-main);
  line-height: 1.3;
}

.program-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.68;
  margin-bottom: 20px;
  flex: 1;
}

.program-footer {
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.program-metric {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--primary-700);
  font-family: var(--font-sans);
}

[data-theme="dark"] .program-metric {
  color: var(--primary-400);
}

/* 3. Partner & Donor Trust Banner */
.partners-section {
  background: var(--bg-alt);
  padding: 60px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.partners-carousel {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.partner-item {
  background: var(--bg-surface);
  padding: 14px 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.partner-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-500);
}

.partner-item i {
  font-size: 1.4rem;
  color: var(--primary-600);
}

/* 4. Filter Bars & Search */
.filter-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

.filter-btn {
  background: var(--bg-surface);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 9px 22px;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover, .filter-btn.active {
  background: var(--primary-700);
  color: #ffffff;
  border-color: var(--primary-700);
  box-shadow: 0 4px 12px rgba(15, 48, 87, 0.25);
}

.search-box {
  position: relative;
  max-width: 480px;
  margin: 0 auto 36px;
}

.search-input {
  width: 100%;
  padding: 13px 18px 13px 46px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  transition: all var(--transition-fast);
}

.search-input:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* 5. Gallery Grid & Lightbox */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 280px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7, 23, 43, 0.95) 0%, rgba(7, 23, 43, 0.25) 60%, transparent 100%);
  opacity: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  color: #ffffff;
  transition: all var(--transition-normal);
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-tag {
  font-family: var(--font-sans);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 700;
  color: var(--accent-400);
  margin-bottom: 6px;
}

.gallery-title {
  font-family: var(--font-serif);
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.35;
}

/* 6. Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(7, 12, 24, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox-modal.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 900px;
  width: 100%;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

.lightbox-img-wrapper {
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 60vh;
}

.lightbox-img-wrapper img {
  max-height: 60vh;
  width: auto;
  object-fit: contain;
}

.lightbox-caption {
  padding: 20px 24px;
  background: var(--bg-surface);
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  font-size: 1.2rem;
  z-index: 10;
  transition: background var(--transition-fast);
}

.lightbox-close:hover {
  background: var(--terracotta-700);
}

/* 7. Legal Certification Cards */
.cert-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 22px;
  align-items: center;
  transition: all var(--transition-normal);
}

.cert-card:hover {
  border-color: var(--primary-500);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.cert-icon {
  width: 68px;
  height: 68px;
  background: var(--primary-100);
  color: var(--primary-700);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  flex-shrink: 0;
}

[data-theme="dark"] .cert-icon {
  background: rgba(96, 165, 250, 0.15);
  color: var(--primary-400);
}

.cert-details {
  flex: 1;
}

.cert-authority {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary-700);
  letter-spacing: 0.8px;
}

[data-theme="dark"] .cert-authority {
  color: var(--primary-400);
}

.cert-reg-no {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 4px 0 8px;
}

.cert-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* 8. Forms & Inputs */
.form-card {
  background: var(--bg-surface);
  padding: 40px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-group.full-width {
  grid-column: span 2;
}

.form-label {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-control, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  transition: all var(--transition-fast);
}

.form-control:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
  background: var(--bg-surface);
}

.form-textarea {
  min-height: 140px;
  resize: vertical;
}

/* 9. Report / Publication Card */
.report-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 24px;
  display: flex;
  gap: 22px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.report-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-500);
}

.report-cover {
  width: 115px;
  height: 155px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.report-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.report-meta {
  font-family: var(--font-sans);
  display: flex;
  gap: 12px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-700);
  text-transform: uppercase;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

[data-theme="dark"] .report-meta {
  color: var(--primary-400);
}

.report-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-main);
  line-height: 1.35;
}

.report-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 16px;
}
