/* =====================================================================
   HibeRota — site.css  (DÜZELTİLMİŞ)
   ---------------------------------------------------------------------
   Bu dosya styles.css'ten SONRA yüklenir; bu yüzden yalnızca
   styles.css'te bulunmayan İŞLEVSEL ve ERİŞİLEBİLİRLİK kuralları içerir.
   Eski gri taslak (wireframe) kuralları kaldırıldı — tema styles.css'te
   tek yerden yönetilir. Buraya renk/ölçü/kart stili EKLEMEYİN.
   ===================================================================== */

/* ----------------------------- ERİŞİLEBİLİRLİK ----------------------------- */
.skip-link {
  background: #ffffff;
  border: 2px solid var(--hr-green, #15875C);
  border-radius: 8px;
  color: var(--hr-ink, #14211B);
  left: 1rem;
  padding: 0.5rem 0.75rem;
  position: fixed;
  top: 0.75rem;
  transform: translateY(-200%);
  transition: transform 0.18s ease;
  z-index: 1100;
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--hr-green, #15875C);
  outline-offset: 3px;
}

main:focus {
  outline: none;
}

/* ----------------------------- ÜST BAŞLIK YARDIMCILARI ----------------------------- */
.site-header .nav-link {
  align-items: center;
  display: inline-flex;
  min-height: 44px;
}

.site-header .container {
  flex-wrap: nowrap;
}

.favorite-shortcut {
  min-height: 34px;
}

.favorite-label-compact {
  display: none;
}

.language-switcher {
  align-items: center;
  border: 1px solid var(--hr-border, #E6EEE9);
  border-radius: 999px;
  display: inline-flex;
  gap: 0.15rem;
  padding: 0.15rem;
}

.language-switcher--mobile {
  width: fit-content;
}

.language-switcher__item {
  align-items: center;
  border-radius: 999px;
  color: var(--hr-muted, #586B61);
  display: inline-flex;
  font-size: 0.76rem;
  font-weight: 800;
  justify-content: center;
  line-height: 1;
  min-height: 1.7rem;
  min-width: 2rem;
  text-decoration: none;
}

.language-switcher__item--active {
  background: var(--hr-green, #15875C);
  color: #ffffff;
}

.language-switcher__item:hover {
  color: var(--hr-green, #15875C);
}

.language-switcher__item--active:hover {
  color: #ffffff;
}

.home-search {
  max-width: 42rem;
}

@media (max-width: 359.98px) {
  .institution-search-form {
    flex-wrap: wrap;
  }

  .institution-search-form > div {
    flex-basis: 100% !important;
  }

  .institution-search-form .btn {
    min-height: 42px;
  }
}

/* ----------------------------- REKLAM ALANI ----------------------------- */
.ad-slot {
  align-items: center;
  background: var(--hr-mint-50, #F1F6F3);
  border: 1px dashed var(--hr-border-2, #D7E6DD);
  border-radius: var(--hr-r, 12px);
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
  min-height: 6rem;
  overflow: hidden;
}

/* ----------------------------- SABİT BANTLAR ----------------------------- */
.survey-prompt {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--hr-border, #E6EEE9);
  border-radius: var(--hr-r-lg, 16px);
  bottom: 1rem;
  box-shadow: var(--hr-shadow-lg, 0 18px 40px rgba(16, 61, 43, 0.16));
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  left: 1rem;
  max-width: min(34rem, calc(100% - 2rem));
  padding: 1rem;
  position: fixed;
  z-index: 1050;
}

.survey-prompt-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 0.5rem;
}

body:has(.offcanvas.show) .survey-prompt,
body:has(.modal.show) .survey-prompt {
  display: none;
}

.consent-banner {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--hr-border, #E6EEE9);
  border-radius: var(--hr-r-lg, 16px);
  bottom: 1rem;
  box-shadow: var(--hr-shadow-lg, 0 18px 40px rgba(16, 61, 43, 0.16));
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  left: 1rem;
  max-width: min(38rem, calc(100% - 2rem));
  padding: 1rem;
  position: fixed;
  /* Consent must remain actionable when the first-visit survey prompt is shown. */
  z-index: 1060;
}

.consent-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 0.5rem;
}

/* ----------------------------- FİLTRE FORMU ----------------------------- */
.call-filter-form {
  display: grid;
  gap: 1rem;
}

.call-filter-form fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

.call-filter-form legend {
  color: var(--hr-muted-2, #8AA197);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.quick-filter-row,
.filter-actions,
.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.filter-section {
  border-top: 1px solid var(--hr-border, #E6EEE9);
  padding-top: 0.85rem;
}

.filter-section summary {
  color: var(--hr-ink, #14211B);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 800;
  list-style-position: outside;
  margin-bottom: 0.75rem;
}

.filter-section > div,
.filter-section > fieldset {
  margin-bottom: 0.9rem;
}

.filter-option-search {
  margin-bottom: 0.35rem;
}

.empty-state__tips {
  color: var(--hr-muted, #586B61);
  display: grid;
  gap: 0.35rem;
  margin: 0 0 1rem;
  padding-left: 1.1rem;
  text-align: left;
}

.guide-category-nav {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  max-width: 100%;
}

.guide-category-nav__item {
  display: inline-flex;
  justify-content: center;
  line-height: 1.2;
  max-width: 100%;
  min-height: 2.25rem;
  text-align: center;
}

.guide-category-nav__item--active {
  box-shadow: inset 0 0 0 1px var(--hr-green, #15875C);
}

.guide-category-nav .active-filter-chip {
  flex: 0 0 auto;
  white-space: nowrap;
}

.guide-link-box {
  background: var(--hr-mint-50, #F1F6F3);
  border: 1px solid var(--hr-mint-border, #CBE6D8);
  border-radius: var(--hr-r-lg, 16px);
  margin-bottom: 1.6rem;
  padding: 1.15rem;
}

.guide-link-box h2 {
  font-size: 1.05rem;
  margin: 0 0 0.75rem;
}

.guide-link-box ul {
  display: grid;
  gap: 0.45rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (max-width: 991.98px) {
  .offcanvas .offcanvas-header {
    align-items: flex-start;
    border-bottom: 1px solid var(--hr-border, #E6EEE9);
  }

  .call-filter-offcanvas__summary {
    color: var(--hr-muted, #586B61);
    font-size: 0.875rem;
    margin: 0.25rem 0 0;
  }

  .call-filter-offcanvas__summary strong {
    color: var(--hr-ink, #14211B);
  }

  .call-filter-offcanvas__active-filters {
    border-bottom: 1px solid var(--hr-border, #E6EEE9);
    margin: -0.25rem 0 1rem;
    padding-bottom: 1rem;
  }

  .call-filter-offcanvas__active-filters > p {
    color: var(--hr-muted, #586B61);
    font-size: 0.8rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
  }

  .call-filter-offcanvas__active-filters .active-filter-list {
    margin: 0;
  }

  .offcanvas .offcanvas-body {
    padding-bottom: 7.5rem;
  }

  .offcanvas .filter-actions {
    background: var(--hr-surface, #ffffff);
    border-top: 1px solid var(--hr-border, #E6EEE9);
    bottom: 0;
    margin: 0 -1rem -1rem;
    padding: 1rem;
    position: sticky;
    z-index: 1;
  }

  .offcanvas .filter-actions .btn {
    flex: 1 1 auto;
  }

  .offcanvas .filter-actions--mobile {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .offcanvas .filter-actions--mobile .btn:last-child {
    grid-column: 1 / -1;
  }
}

/* ----------------------------- FORMLAR ----------------------------- */
.newsletter-page {
  padding: 2rem 1rem 4.5rem;
}

.newsletter-page__inner {
  margin: 0 auto;
  max-width: 44rem;
}

.newsletter-page .alert {
  margin-left: auto;
  margin-right: auto;
  max-width: 42rem;
}

.newsletter-form {
  background: var(--hr-surface, #ffffff);
  border-radius: var(--hr-r-lg, 16px);
  box-shadow: var(--hr-shadow-sm, 0 6px 20px rgba(16, 61, 43, 0.06));
  display: grid;
  gap: 1rem;
  max-width: 42rem;
  padding: 1.5rem;
}

.newsletter-form fieldset {
  border: 0;
  margin: 0;
  min-width: 0;
  padding: 0;
}

.newsletter-fieldset {
  display: grid;
  gap: 0.55rem;
}

.newsletter-form .form-check {
  min-width: 0;
}

.newsletter-form .form-check label,
.newsletter-form .form-check-label {
  overflow-wrap: anywhere;
}

.newsletter-form ul,
.newsletter-option-grid {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.newsletter-form li,
.newsletter-option {
  min-width: 0;
}

.newsletter-option {
  align-items: flex-start;
  background: var(--hr-mint-50, #f2fbf6);
  border: 1px solid var(--hr-border, #d7e6dd);
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  gap: 0.55rem;
  line-height: 1.35;
  min-height: 44px;
  padding: 0.7rem 0.78rem;
}

.newsletter-option .form-check-input {
  flex: none;
  margin: 0.12rem 0 0;
}

.newsletter-option span {
  overflow-wrap: anywhere;
}

.newsletter-option:has(.form-check-input:checked) {
  background: var(--hr-mint-100, #dcf5e7);
  border-color: var(--hr-green, #15875c);
}

.newsletter-form button[type="submit"],
.newsletter-form .btn {
  justify-self: start;
}

@media (min-width: 768px) {
  .newsletter-page {
    padding-bottom: 6rem;
    padding-top: 2.5rem;
  }
}

@media (max-width: 575.98px) {
  .newsletter-page {
    padding: 1.25rem 0.85rem 3.5rem;
  }

  .newsletter-form {
    border-radius: 14px;
    padding: 1.1rem;
  }

  .newsletter-form ul,
  .newsletter-option-grid {
    grid-template-columns: 1fr;
  }

  .newsletter-form button[type="submit"],
  .newsletter-form .btn {
    justify-self: stretch;
    width: 100%;
  }
}

@media (min-width: 576px) and (max-width: 991.98px) {
  .guide-category-nav {
    flex-wrap: nowrap;
    margin-left: -0.85rem;
    margin-right: -0.85rem;
    overflow-x: auto;
    padding: 0 0.85rem 0.35rem;
    scroll-padding-left: 0.85rem;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 575.98px) {
  .guide-category-nav {
    flex-wrap: wrap;
    margin-left: 0;
    margin-right: 0;
    overflow-x: visible;
    padding: 0;
  }

  .guide-category-nav .active-filter-chip {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 0;
    white-space: normal;
  }
}

/* ----------------------------- BLOG İÇERİĞİ ----------------------------- */
.blog-content img {
  height: auto;
  max-width: 100%;
}

/* ----------------------------- VEOR COLLECTION MARKA ALANI ----------------------------- */
.brand-area {
  background: var(--hr-surface, #ffffff);
  border-radius: var(--hr-r-lg, 16px);
  box-shadow: var(--hr-shadow-sm, 0 6px 20px rgba(16, 61, 43, 0.06));
  display: grid;
  gap: 1.25rem;
  max-width: 54rem;
  padding: 1.5rem;
}

.brand-lockup {
  align-items: center;
  border-bottom: 1px solid var(--hr-border, #E6EEE9);
  display: flex;
  gap: 0.75rem;
  padding-bottom: 1.25rem;
}

.brand-mark {
  align-items: center;
  background: var(--hr-mint-100, #E3F4EA);
  border: 1px solid var(--hr-mint-border, #CBE6D8);
  border-radius: 12px;
  color: var(--hr-green, #15875C);
  display: inline-flex;
  flex: 0 0 3rem;
  font-weight: 800;
  height: 3rem;
  justify-content: center;
}

.brand-name {
  color: var(--hr-ink, #14211B);
  font-size: 1.125rem;
  font-weight: 700;
}

/* ----------------------------- ÇOK DAR EKRANLAR ----------------------------- */
@media (max-width: 374.98px) {
  .favorite-shortcut {
    font-size: 0.875rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .favorite-label-full {
    display: none;
  }

  .favorite-label-compact {
    display: inline;
  }

  .language-switcher__item {
    min-width: 1.75rem;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
  }

  .survey-prompt,
  .consent-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .consent-actions {
    justify-content: flex-start;
  }
}

/* -------------------- PORTAL UI POLISH / JULY 2026 -------------------- */
/* The visual layer intentionally keeps Django markup, URL parameters and
   Bootstrap's offcanvas behaviour unchanged. */
:focus-visible {
  outline: 3px solid rgba(0, 74, 198, 0.38);
  outline-offset: 3px;
}

.site-header {
  backdrop-filter: blur(14px);
  background: rgba(247, 249, 254, 0.88);
  border-bottom-color: rgba(195, 198, 215, 0.72);
}

.home-hero {
  background:
    radial-gradient(circle at 88% 18%, rgba(168, 85, 247, 0.10), transparent 25rem),
    radial-gradient(circle at 14% 88%, rgba(34, 211, 238, 0.12), transparent 22rem),
    var(--hr-page-bg);
}

.home-hero__eyebrow,
.home-popular-searches a {
  border-color: rgba(0, 74, 198, 0.18);
}

.home-hero__call {
  border-color: rgba(0, 74, 198, 0.18);
  box-shadow: 0 24px 52px rgba(7, 20, 38, 0.10);
}

.home-hero__featured-label,
.quality-badge--source {
  background: #e8efff;
  color: #003ea8;
}

.home-metrics {
  border: 1px solid var(--hr-border);
  border-radius: var(--hr-r-lg);
  box-shadow: 0 12px 28px rgba(7, 20, 38, 0.05);
}

.quick-start-card,
.call-card,
.institution-card,
.blog-card {
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.quick-start-card:hover,
.institution-card:hover,
.blog-card:hover {
  border-color: rgba(0, 74, 198, 0.34);
}

.call-card {
  isolation: isolate;
}

.call-card::before {
  background: linear-gradient(90deg, var(--hr-primary-bright), var(--hr-violet));
  border-radius: inherit;
  content: "";
  height: 3px;
  left: 0;
  opacity: 0;
  position: absolute;
  right: 0;
  top: 0;
  transition: opacity .2s ease;
}

.call-card:hover::before,
.call-card:focus-within::before {
  opacity: 1;
}

.call-card:focus-within {
  border-color: var(--hr-primary-bright);
  box-shadow: 0 14px 30px rgba(0, 74, 198, 0.13);
}

.call-card__tags,
.call-quality-badges {
  gap: .4rem;
}

.call-card__tag,
.quality-badge,
.deadline-status-badge {
  letter-spacing: .01em;
}

.filter-sidebar,
.list-toolbar {
  box-shadow: 0 12px 30px rgba(7, 20, 38, 0.06);
}

.filter-section summary {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-height: 2rem;
}

.filter-section summary::after {
  color: var(--hr-primary);
  content: "+";
  font-size: 1.1rem;
  font-weight: 500;
}

.filter-section[open] summary::after {
  content: "−";
}

.call-detail-hero__card,
.call-detail-content > section,
.call-info-card {
  box-shadow: 0 12px 30px rgba(7, 20, 38, 0.05);
}

.call-detail-actions .btn-primary {
  background-image: linear-gradient(120deg, #004ac6, #2563eb 55%, #7650d8);
  border-color: #004ac6;
}

@media (max-width: 575.98px) {
  .home-metrics {
    border-radius: 12px;
  }

  .home-metrics > div {
    min-height: 4.5rem;
  }

  .call-card,
  .quick-start-card,
  .institution-card,
  .blog-card {
    transform: none;
  }

  .quick-filter-row .btn,
  .filter-actions .btn,
  .call-detail-actions .btn {
    min-height: 44px;
  }

  .call-detail-actions .btn {
    align-items: center;
    display: inline-flex;
    justify-content: center;
  }
}

/* -------------------- DISCOVERY UX / JULY 2026 -------------------- */
.list-toolbar__summary {
  align-items: center;
  color: var(--hr-muted);
  gap: .7rem;
  min-width: 0;
}

.list-toolbar__summary strong {
  color: var(--hr-ink);
  font-size: 1rem;
}

.list-toolbar__summary-icon {
  align-items: center;
  background: var(--hr-mint-50);
  border: 1px solid var(--hr-border);
  border-radius: var(--hr-r);
  color: var(--hr-primary);
  display: inline-flex;
  height: 2.5rem;
  justify-content: center;
  width: 2.5rem;
}

.call-filter-trigger {
  align-items: center;
  display: inline-flex;
  gap: .5rem;
  justify-content: center;
}

.call-grid--list .call-card h3 {
  max-width: calc(100% - 3.5rem);
}

.call-grid--list .call-card__summary {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

@media (min-width: 992px) {
  .filter-sidebar {
    max-height: calc(100vh - 7.5rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: var(--hr-border-2) transparent;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
  }
}

@media (max-width: 991.98px) {
  .list-toolbar {
    backdrop-filter: blur(14px);
    background: rgba(255, 255, 255, .94);
    position: sticky;
    top: 4.75rem;
    z-index: 1020;
  }
}

@media (max-width: 575.98px) {
  .site-header .language-switcher--header {
    display: none !important;
  }

  .list-toolbar {
    align-items: center;
    display: grid;
    gap: .6rem;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    padding: .6rem;
    top: 4.5rem;
  }

  .list-toolbar > .btn {
    min-width: 0;
    width: auto;
  }

  .sort-form {
    display: block;
    min-width: 0;
  }

  .list-toolbar__sort-label {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
  }

  .sort-form .form-select {
    min-height: 44px;
  }

  .call-grid--list .call-card h3 {
    display: -webkit-box;
    max-width: none;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .survey-prompt {
    align-items: center;
    bottom: .75rem;
    display: grid;
    gap: .65rem;
    grid-template-columns: minmax(0, 1fr) auto;
    left: .75rem;
    max-width: none;
    padding: .8rem;
    right: .75rem;
  }

  .survey-prompt .fw-semibold {
    font-size: .88rem;
    line-height: 1.25;
  }

  .survey-prompt .text-secondary {
    display: none;
  }

  .survey-prompt-actions {
    gap: .4rem;
  }

  .survey-prompt-actions .btn {
    font-size: .78rem;
    min-height: 40px;
    padding: .45rem .65rem;
  }
}

@media (max-width: 359.98px) {
  .site-header .navbar-brand img {
    max-width: 92px;
  }

  .list-toolbar {
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  }

  .call-filter-trigger {
    gap: .35rem;
    padding-inline: .55rem;
  }
}
