:root {
  --gp-primary: #1e407a;
  /* Accent 1 */
  --gp-accent: #ffc53a;
  /* Accent 2 */
  --gp-soft: #cdd4fb;
  /* Accent 3 */
  --gp-chip-bg: #b7d8ef;
  /* Accent 7 */
  --gp-text-main: #292929;
  --gp-text-muted: #545454;
  --gp-border-soft: #cdd4fb;
  --gp-page-bg: #fbfbfb;
  --gp-card-bg: #ffffff;
  --gp-radius-lg: 20px;
  --gp-radius-md: 14px;
  --gp-shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
}

/* HIDE THEME HEADERS */
.post-type-archive-graduation_project .page-header,
.post-type-archive-graduation_project .page-title,
.post-type-archive-graduation_project .entry-title,
.post-type-archive-graduation_project #sub-header,
.post-type-archive-graduation_project .elementor-page-title {
  display: none !important;
}

/* HERO SECTION - Full Bleed */
.gp-hero-wrapper {
  position: relative !important;
  width: 100vw !important;
  max-width: none !important;
  margin-left: calc(50% - 50vw) !important;
  margin-top: 0 !important;
  left: 0;
  height: 450px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: flex-end;
  margin-bottom: 0 !important;
  background-color: var(--gp-primary);
}

/* Override parent container clipping for full-width hero */
.limit-wrapper,
.vamtam-box-outer-padding {
  overflow: visible !important;
}

.gp-hero-overlay-box {
  background: var(--gp-primary);
  color: #ffffff;
  padding: 2.5rem 3rem;
  width: 90%;
  max-width: 600px;
  margin-left: 10%;
  margin-bottom: -3rem;
  position: relative;
  z-index: 10;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.gp-hero-title {
  margin: 0 0 0.75rem;
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ffffff !important;
}

.gp-hero-subtitle {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  opacity: 0.9;
  font-weight: 400;
}

/* RTL Support */
html[dir="rtl"] .gp-hero-overlay-box,
html[lang="ar"] .gp-hero-overlay-box,
body.rtl .gp-hero-overlay-box {
  margin-left: 0 !important;
  margin-right: 10% !important;
  text-align: right !important;
  direction: rtl;
}


html[dir="rtl"] .gp-hero-title,
body.rtl .gp-hero-title {
  text-align: right;
}

html[dir="rtl"] .gp-hero-subtitle,
body.rtl .gp-hero-subtitle {
  text-align: right;
}

@media (max-width: 768px) {
  .gp-hero-wrapper {
    height: 300px;
  }

  .gp-hero-overlay-box {
    width: 95%;
    margin-left: 2.5%;
    margin-bottom: -2rem;
    padding: 1.5rem 2rem;
  }

  html[dir="rtl"] .gp-hero-overlay-box,
  body.rtl .gp-hero-overlay-box {
    margin-left: 0;
    margin-right: 2.5%;
  }
}

/* RTL Support for Hero Wrapper - Full bleed fix */
html[dir="rtl"] .gp-hero-wrapper,
html[lang="ar"] .gp-hero-wrapper,
body.rtl .gp-hero-wrapper {
  margin-left: 0 !important;
  margin-right: calc(50% - 50vw) !important;
  right: 0;
  left: auto;
}

/* Pagination */
.gp-pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 32px;
}

.gp-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--gp-primary);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  border: 1px solid var(--gp-border-soft);
  transition: all 0.2s ease;
}

.gp-pagination .page-numbers.current {
  background: linear-gradient(135deg, var(--gp-primary), #164885);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(30, 64, 122, 0.35);
}

.gp-pagination .page-numbers:hover:not(.current) {
  background: #f3f4ff;
  color: var(--gp-primary);
}

/* Main Layout */
.gp-archive-page {
  width: 100%;
  min-height: 100vh;
  padding: 40px 0 60px;
}

.gp-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Force card title size on Graduation Project archive */
.post-type-archive-graduation_project .gp-card-title {
  font-size: 0.95rem !important;
  line-height: 1.35 !important;
  margin: 2px 0 4px;
  font-weight: 700;
  color: var(--gp-primary);
}

.post-type-archive-graduation_project .gp-card-title a {
  font-size: inherit !important;
  line-height: inherit !important;
  font-weight: inherit !important;
  text-decoration: none;
}

/* HEADER (New separate section) */
.gp-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-top: 30px;
  margin-bottom: 26px;
}

.gp-header-main {
  max-width: 650px;
}

.gp-header-label {
  text-transform: uppercase;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gp-primary);
  letter-spacing: 0.05em;
}

/* Stat Card - Standalone */
.gp-stat-card {
  min-width: 220px;
  padding: 14px 18px;
  border-radius: var(--gp-radius-md);
  background: linear-gradient(135deg, var(--gp-primary), #164885);
  color: #ffffff;
  box-shadow: 0 16px 40px rgba(6, 30, 72, 0.45);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gp-stat-label {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}

.gp-stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.1;
  direction: ltr;
  /* Ensure +10 displays as +10 */
  unicode-bidi: embed;
}

.gp-stat-note {
  font-size: 0.8rem;
  opacity: 0.9;
}

@media (max-width: 900px) {
  .gp-header {
    flex-direction: column;
  }

  .gp-stat-card {
    align-self: stretch;
  }
}

/* ========================================
   4. SMART FILTERS - PREMIUM PILL STYLE
   ======================================== */
.gp-smart-filters {
  margin-bottom: 50px;
}

/* Controls Wrapper */
.gp-controls-wrapper {
  background: #ffffff;
  border: 1px solid var(--gp-border-soft);
  border-radius: var(--gp-radius-lg);
  padding: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-end;
  box-shadow: var(--gp-shadow-soft);
}

.gp-control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 220px;
  flex: 1;
}

.gp-group-search {
  min-width: 280px;
  flex: 1.5;
}

.gp-control-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 800;
  color: var(--gp-primary);
  margin-bottom: 6px;
  display: block;
  padding-left: 10px;
  border-left: 3px solid var(--gp-accent);
  line-height: 1;
}

html[dir="rtl"] .gp-control-label {
  padding-left: 0;
  padding-right: 10px;
  border-left: none;
  border-right: 3px solid var(--gp-accent);
}

.gp-select,
.gp-input {
  width: 100%;
  padding: 12px 18px;
  border-radius: 10px;
  border: 2px solid var(--gp-border-soft);
  background: var(--gp-page-bg);
  font-size: 0.95rem;
  color: var(--gp-text-main);
  transition: all 0.2s ease;
  box-sizing: border-box;
  font-weight: 500;
}

.gp-select:focus,
.gp-input:focus {
  outline: none;
  border-color: var(--gp-primary);
  box-shadow: 0 0 0 3px rgba(30, 64, 122, 0.15);
}

/* ===== GRID ===== */
.gp-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 1024px) {
  .gp-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .gp-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.gp-card {
  background: var(--gp-card-bg);
  border-radius: var(--gp-radius-lg);
  box-shadow: var(--gp-shadow-soft);
  border: 1px solid rgba(205, 212, 251, 0.7);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gp-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.18);
}

.gp-card-image {
  height: 170px;
  background: #e5e7eb;
  overflow: hidden;
}

.gp-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gp-card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.gp-card-meta {
  margin: 0;
  font-size: 0.78rem;
  color: var(--gp-text-muted);
}

.gp-card-abstract {
  margin: 8px 0 8px;
  font-size: 0.84rem;
  color: var(--gp-text-muted);
  line-height: 1.6;
  flex: 1;
}

.gp-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 6px;
}

.gp-tag {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--gp-chip-bg);
  border: 1px solid rgba(205, 212, 251, 0.9);
  font-size: 0.7rem;
  color: var(--gp-text-main);
}

.gp-keywords-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.gp-keyword {
  padding: 3px 7px;
  border-radius: 999px;
  background: #fff7e5;
  border: 1px solid #ffe0a3;
  font-size: 0.7rem;
  color: #92400e;
}

.gp-card-footer {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.74rem;
  align-items: center;
}

.gp-card-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.gp-btn {
  padding: 5px 10px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(120deg, var(--gp-accent), #ffb200);
  color: #292929;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease,
    box-shadow 0.15s ease, transform 0.15s ease;
}

.gp-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.gp-btn--ghost {
  background: #ffffff;
  border: 1px solid var(--gp-accent);
}

.gp-id {
  color: var(--gp-text-muted);
}

.gp-empty {
  margin-top: 18px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--gp-text-muted);
}