/* =======================================================
 * ORGANISASI MAHASISWA (ORMAWA) - Harmonized Green Palette
 * ======================================================= */

:root {
  --org-primary: #015F55;
  --org-primary-dark: #00433c;
  --org-primary-light: #ecfdf5;
  --org-primary-border: #a7f3d0;
  --org-accent: #fed703;
  --org-accent-hover: #e5c200;
  --org-bg: #f8fafc;
  --org-card-bg: #ffffff;
  --org-text-main: #0f172a;
  --org-text-muted: #64748b;
  --org-border: #e2e8f0;
  --org-radius: 4px;
  --org-radius-sm: 2px;
  --org-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --org-shadow-hover: 0 8px 20px -4px rgba(1, 95, 85, 0.14), 0 4px 6px -2px rgba(1, 95, 85, 0.04);
}

.orgs-section {
  background-color: var(--org-bg);
  padding: 35px 0 70px;
}

/* Category Badges (Harmonized Green Tones) */
.cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 8px;
  border-radius: var(--org-radius-sm);
  width: fit-content;
}

/* UKM/UKK: Classic Emerald Green */
.cat-badge-ukm {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

/* Lembaga Kemahasiswaan: Deep Pine / Forest Green */
.cat-badge-lembaga {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

/* Ormada: Olive / Moss Green */
.cat-badge-ormada {
  background: #f7fee7;
  color: #3f6212;
  border: 1px solid #d9f99d;
}

/* Komunitas: Teal / Sea Green */
.cat-badge-komunitas {
  background: #f0fdfa;
  color: #0f766e;
  border: 1px solid #99f6e4;
}

/* Ekstra: Jade / Dark Teal Green */
.cat-badge-ekstra {
  background: #ecfeff;
  color: #155e75;
  border: 1px solid #a5f3fc;
}

/* Default / Umum: Light Slate Green */
.cat-badge-default {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}

/* Filter and Search Container (Light & Sharp) */
.org-filter-wrapper {
  background: #ffffff;
  border: 1px solid var(--org-border);
  border-radius: var(--org-radius);
  padding: 18px 22px;
  box-shadow: var(--org-shadow-sm);
  margin-bottom: 30px;
}

.search-input-wrap {
  position: relative;
}

.search-input-wrap .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #0d9488;
  font-size: 1rem;
  pointer-events: none;
}

.search-input-wrap input {
  padding-left: 40px;
  padding-right: 36px;
  height: 42px;
  border-radius: var(--org-radius);
  border: 1px solid var(--org-border);
  background: #ffffff;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.search-input-wrap input:focus {
  border-color: var(--org-primary);
  box-shadow: 0 0 0 3px rgba(1, 95, 85, 0.12);
  outline: none;
}

.search-clear-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 0.95rem;
  cursor: pointer;
  display: none;
}

.search-clear-btn:hover {
  color: #475569;
}

/* Filter Pills */
.org-pills-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.org-pill-btn {
  background: #ffffff;
  border: 1px solid var(--org-border);
  color: #334155;
  font-size: 0.825rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--org-radius);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.org-pill-btn .badge-pill-count {
  background: #f1f5f9;
  color: #475569;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: var(--org-radius-sm);
  font-weight: 700;
  transition: all 0.2s ease;
}

.org-pill-btn:hover {
  background: #f0fdf4;
  border-color: #86efac;
  color: var(--org-primary);
}

.org-pill-btn.active {
  background: var(--org-primary);
  border-color: var(--org-primary);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(1, 95, 85, 0.25);
}

.org-pill-btn.active .badge-pill-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Card Styling */
.org-card {
  background: var(--org-card-bg);
  border: 1px solid var(--org-border);
  border-radius: var(--org-radius);
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: var(--org-shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.org-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #015F55, #10b981);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.org-card:hover {
  transform: translateY(-4px);
  border-color: #a7f3d0;
  box-shadow: var(--org-shadow-hover);
}

.org-card:hover::before {
  opacity: 1;
}

.org-card-header {
  padding: 18px 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.org-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.org-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--org-radius);
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: var(--org-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

.org-title {
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--org-text-main);
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}

.org-card-body {
  padding: 0 18px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.org-contact-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  color: #334155;
  background: #f8fafc;
  padding: 6px 10px;
  border-radius: var(--org-radius-sm);
  border: 1px solid #f1f5f9;
}

.org-contact-item i {
  color: var(--org-primary);
  font-size: 0.875rem;
}

.org-contact-item a {
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.org-contact-item a:hover {
  color: var(--org-primary);
  text-decoration: underline;
}

.org-snippet {
  font-size: 0.8rem;
  color: #475569;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.org-card-footer {
  padding: 10px 18px;
  background: #fbfcfd;
  border-top: 1px solid var(--org-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.btn-org-detail {
  background: var(--org-primary);
  color: #ffffff;
  border: none;
  font-size: 0.775rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--org-radius);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-org-detail:hover {
  background: var(--org-primary-dark);
  color: #ffffff;
}

.org-action-links {
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-org-subaction {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 0.725rem;
  font-weight: 600;
  padding: 5px 8px;
  border-radius: var(--org-radius);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.btn-org-subaction:hover {
  background: #f0fdf4;
  color: var(--org-primary);
  border-color: #86efac;
}

/* Foto Button synced with Mint/Green theme */
.btn-org-subaction.btn-foto {
  color: #0f766e;
  background: #f0fdfa;
  border-color: #99f6e4;
}

.btn-org-subaction.btn-foto:hover {
  background: #ccfbf1;
  color: #115e59;
  border-color: #5eead4;
}

/* =======================================================
 * Pagination Styles
 * ======================================================= */
.org-pagination-wrap {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.org-pagination-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
  justify-content: center;
}

.org-page-item button,
.org-page-item span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
  background: #ffffff;
  border: 1px solid var(--org-border);
  border-radius: var(--org-radius);
  transition: all 0.15s ease;
  cursor: pointer;
}

.org-page-item button:hover:not(:disabled) {
  background: #f0fdf4;
  border-color: #86efac;
  color: var(--org-primary);
}

.org-page-item.active button {
  background: var(--org-primary);
  border-color: var(--org-primary);
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(1, 95, 85, 0.25);
}

.org-page-item button:disabled {
  color: #94a3b8;
  background: #f8fafc;
  border-color: #f1f5f9;
  cursor: not-allowed;
  opacity: 0.6;
}

.org-page-item.ellipsis span {
  border: none;
  background: none;
  color: #94a3b8;
  cursor: default;
  min-width: 24px;
}

.org-page-info {
  font-size: 0.8rem;
  color: var(--org-text-muted);
  font-weight: 500;
}

/* =======================================================
 * Slide-Over Drawer (Green Synced)
 * ======================================================= */
.org-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.org-drawer-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.org-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 540px;
  background: #ffffff;
  z-index: 1055;
  box-shadow: -6px 0 25px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.org-drawer.open {
  transform: translateX(0);
}

.org-drawer-header {
  padding: 20px 24px;
  background: var(--org-primary);
  color: #ffffff;
  position: relative;
}

.org-drawer-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: var(--org-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.org-drawer-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.org-drawer-header h2,
.org-drawer-title {
  color: #ffffff !important;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  margin-top: 8px;
  margin-bottom: 0;
  padding-right: 30px;
}

.org-drawer-body {
  padding: 22px 24px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.drawer-section {
  background: #f8fafc;
  border: 1px solid var(--org-border);
  border-radius: var(--org-radius);
  padding: 16px 18px;
}

.drawer-section-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--org-primary-dark);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.drawer-section-title i {
  color: var(--org-primary);
  font-size: 1rem;
}

.drawer-content-box {
  color: #334155;
  font-size: 0.875rem;
  line-height: 1.6;
  white-space: pre-line;
}

.drawer-visi-box {
  background: #ffffff;
  padding: 12px 14px;
  border-radius: var(--org-radius-sm);
  font-style: italic;
  color: #0f172a;
  margin-bottom: 10px;
  border: 1px solid var(--org-border);
  border-left: 3px solid var(--org-primary);
}

.org-drawer-footer {
  padding: 14px 24px;
  background: #f8fafc;
  border-top: 1px solid var(--org-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* Empty State */
.org-empty-state {
  text-align: center;
  padding: 50px 20px;
  background: #ffffff;
  border: 1px dashed var(--org-border);
  border-radius: var(--org-radius);
  display: none;
}

.org-empty-state i {
  font-size: 2.5rem;
  color: #0d9488;
  margin-bottom: 12px;
}

.org-empty-state h4 {
  font-weight: 700;
  color: var(--org-text-main);
  margin-bottom: 6px;
  font-size: 1.1rem;
}

.org-empty-state p {
  color: var(--org-text-muted);
  max-width: 380px;
  margin: 0 auto 14px;
  font-size: 0.875rem;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .org-filter-wrapper {
    padding: 14px;
  }
  .org-drawer {
    max-width: 100%;
  }
  .org-drawer-header {
    padding: 16px;
  }
  .org-drawer-body {
    padding: 16px;
  }
}
