/* ===================================================================
   AllUpdate247 — Global Styles
   =================================================================== */

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.container--narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

/* --- Typography Utilities --- */
.text-xs     { font-size: var(--text-xs); }
.text-sm     { font-size: var(--text-sm); }
.text-base   { font-size: var(--text-base); }
.text-lg     { font-size: var(--text-lg); }
.text-xl     { font-size: var(--text-xl); }
.text-2xl    { font-size: var(--text-2xl); }
.text-3xl    { font-size: var(--text-3xl); }
.text-muted  { color: var(--muted); }
.text-primary { color: var(--primary); }
.text-secondary-color { color: var(--secondary); }
.fw-medium   { font-weight: var(--fw-medium); }
.fw-semibold { font-weight: var(--fw-semibold); }
.fw-bold     { font-weight: var(--fw-bold); }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.truncate    { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- Layout Utilities --- */
.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.items-center{ align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-2       { gap: var(--space-2); }
.gap-3       { gap: var(--space-3); }
.gap-4       { gap: var(--space-4); }
.gap-6       { gap: var(--space-6); }
.gap-8       { gap: var(--space-8); }
.flex-1      { flex: 1; }
.flex-wrap   { flex-wrap: wrap; }

/* --- Spacing --- */
.mt-2  { margin-top: var(--space-2); }
.mt-4  { margin-top: var(--space-4); }
.mt-6  { margin-top: var(--space-6); }
.mt-8  { margin-top: var(--space-8); }
.mb-2  { margin-bottom: var(--space-2); }
.mb-4  { margin-bottom: var(--space-4); }
.mb-6  { margin-bottom: var(--space-6); }
.mb-8  { margin-bottom: var(--space-8); }
.py-4  { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.py-8  { padding-top: var(--space-8); padding-bottom: var(--space-8); }
.py-12 { padding-top: var(--space-12); padding-bottom: var(--space-12); }
.py-16 { padding-top: var(--space-16); padding-bottom: var(--space-16); }

/* --- Section Spacing --- */
.section {
  padding: var(--space-12) 0;
}

.section--sm {
  padding: var(--space-8) 0;
}

/* --- Section Header --- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 2px solid var(--border);
}

.section-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xl);
  font-weight: var(--fw-bold);
  color: var(--text);
}

.section-title .icon {
  font-size: 1.4em;
}

.section-link {
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  transition: gap var(--transition-fast);
}

.section-link:hover {
  gap: var(--space-2);
  text-decoration: underline;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

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

.btn--primary:hover:not(:disabled) {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow: var(--shadow-primary);
}

.btn--secondary {
  background: var(--secondary);
  color: #fff;
  border-color: var(--secondary);
}

.btn--secondary:hover:not(:disabled) {
  background: var(--secondary-dark);
}

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

.btn--outline:hover:not(:disabled) {
  background: var(--primary-light);
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}

.btn--ghost:hover:not(:disabled) {
  background: var(--surface-2);
}

.btn--danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.btn--danger:hover:not(:disabled) {
  background: #b91c1c;
}

.btn--sm {
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
}

.btn--lg {
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-base);
  border-radius: var(--radius-md);
}

.btn--full {
  width: 100%;
}

/* --- Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2em;
  padding: 0.15em 0.65em;
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  border-radius: var(--radius-full);
  line-height: 1.4;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge--primary  { background: var(--primary-light); color: var(--primary-dark); }
.badge--success  { background: var(--success-light); color: var(--success); }
.badge--danger   { background: var(--danger-light);  color: var(--danger); }
.badge--warning  { background: var(--warning-light); color: var(--warning); }
.badge--info     { background: var(--info-light);    color: var(--info); }
.badge--muted    { background: var(--surface-2);     color: var(--muted); }

.badge--tech     { background: #eef2ff; color: var(--cat-tech); }
.badge--govt     { background: #dcfce7; color: var(--cat-govt); }
.badge--jobs     { background: #fff7ed; color: var(--cat-jobs); }
.badge--edu      { background: #e0f2fe; color: var(--cat-edu); }
.badge--exam     { background: #f3e8ff; color: var(--cat-exam); }
.badge--service  { background: var(--primary-light); color: var(--cat-service); }

.badge--live {
  background: #fee2e2;
  color: var(--danger);
  animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

/* --- Skeleton Loaders --- */
.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius);
}

@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text  { height: 1em; margin-bottom: 0.5em; }
.skeleton-image { aspect-ratio: 16/9; }
.skeleton-title { height: 1.5em; width: 70%; margin-bottom: 0.75em; }
.skeleton-meta  { height: 0.8em; width: 40%; }

/* --- Breadcrumb --- */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-1);
  font-size: var(--text-sm);
  color: var(--muted);
  margin-bottom: var(--space-4);
}

.breadcrumb a {
  color: var(--muted);
  transition: color var(--transition-fast);
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb-sep {
  color: var(--muted-light);
  font-size: 0.85em;
}

.breadcrumb-current {
  color: var(--text-secondary);
  font-weight: var(--fw-medium);
}

/* --- Alert / Notice Boxes --- */
.alert {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: var(--text-sm);
}

.alert--info    { background: var(--info-light);    border-color: #a5f3fc; color: #0c4a6e; }
.alert--success { background: var(--success-light); border-color: #86efac; color: #14532d; }
.alert--warning { background: var(--warning-light); border-color: #fcd34d; color: #78350f; }
.alert--danger  { background: var(--danger-light);  border-color: #fca5a5; color: #7f1d1d; }

/* --- Quick Info Table --- */
.info-table {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: var(--space-6) 0;
}

.info-table table {
  width: 100%;
}

.info-table th, .info-table td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-size: var(--text-sm);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.info-table th {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: var(--fw-semibold);
  width: 40%;
  white-space: nowrap;
}

.info-table tr:last-child th,
.info-table tr:last-child td {
  border-bottom: none;
}

/* --- Pagination --- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-8);
  flex-wrap: wrap;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

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

.page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* --- Divider --- */
.divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  color: var(--muted);
  font-size: var(--text-sm);
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: var(--space-16) var(--space-8);
  color: var(--muted);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: var(--space-4);
  opacity: 0.4;
}

.empty-state h3 {
  font-size: var(--text-xl);
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.empty-state p {
  font-size: var(--text-sm);
  max-width: 400px;
  margin: 0 auto;
}

/* --- Spinner --- */
.spinner {
  width: 1.5rem;
  height: 1.5rem;
  border: 2.5px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Toast Notifications --- */
#toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: var(--z-overlay);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-width: 350px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--text);
  color: #fff;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  box-shadow: var(--shadow-md);
  pointer-events: all;
  animation: toast-in 0.25s ease;
}

.toast--success { background: var(--success); }
.toast--danger  { background: var(--danger); }
.toast--warning { background: var(--warning); }

@keyframes toast-in {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* --- Verify Badge --- */
.verify-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  font-size: var(--text-xs);
  color: var(--success);
  font-weight: var(--fw-semibold);
  background: var(--success-light);
  border-radius: var(--radius-full);
  padding: 0.2em 0.7em;
}

/* --- Social Share Buttons --- */
.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  border: 1.5px solid transparent;
}

.share-btn--whatsapp { background: #25d366; color: #fff; }
.share-btn--telegram { background: #229ed9; color: #fff; }
.share-btn--facebook { background: #1877f2; color: #fff; }
.share-btn--twitter  { background: #000; color: #fff; }
.share-btn--copy     { background: var(--surface); color: var(--text); border-color: var(--border); }

.share-btn:hover {
  filter: brightness(0.92);
  box-shadow: var(--shadow-sm);
}

/* --- Ad Placeholder (initially hidden) --- */
.ad-placeholder {
  display: none; /* Enable after AdSense approval */
  background: var(--surface-2);
  border: 1px dashed var(--border-dark);
  border-radius: var(--radius);
  padding: var(--space-4);
  text-align: center;
  color: var(--muted);
  font-size: var(--text-xs);
}

/* --- Utility --- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden { display: none !important; }
.block  { display: block; }
.w-full { width: 100%; }
