/* --- Container --- */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* --- Header --- */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.header__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.header__logo-img {
  height: 32px;
  width: auto;
  display: block;
}

.header__cta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.header__cta .btn {
  padding: 10px 20px;
  font-size: 14px;
}

/* --- Admin Header --- */

.admin-header {
  position: sticky;
  top: 0;
  z-index: 55;
  min-height: var(--header-height);
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.admin-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  gap: var(--space-md);
}

.admin-header__brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
  color: var(--text-primary);
}

.admin-header__logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.admin-header__logo {
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.admin-header__copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}

.admin-header__title {
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 800;
}

.admin-header__subtitle {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.admin-header__actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 8px;
}

.admin-header__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 180ms var(--motion-ease),
    border-color 180ms var(--motion-ease),
    background-color 180ms var(--motion-ease),
    color 180ms var(--motion-ease),
    box-shadow 180ms var(--motion-ease);
}

.admin-header__action:hover,
.admin-header__action:focus-visible {
  border-color: var(--text-primary);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(17, 17, 17, 0.08);
}

.admin-header__action--logout {
  border-color: var(--text-primary);
  background: var(--text-primary);
  color: var(--surface);
}

.admin-header__action--logout:hover,
.admin-header__action--logout:focus-visible {
  background: #000000;
  color: var(--surface);
}

/* --- Main Content --- */

.main {
  padding: var(--space-xl) 0;
  min-height: calc(100vh - var(--header-height) - 80px);
}

/* --- Footer --- */

.footer {
  padding: var(--space-2xl) 0 var(--space-xl);
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-xl);
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.footer__link {
  font-size: 13px;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.footer__link:hover {
  color: var(--text-primary);
}

.footer__socials {
  display: flex;
  gap: var(--space-md);
}

.footer__social-icon {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.footer__social-icon:hover {
  color: var(--text-primary);
}

.footer__bottom {
  margin-top: var(--space-xl);
  text-align: center;
  color: var(--text-secondary);
  font-size: 12px;
}

/* --- About Section --- */

.about {
  margin-top: 80px;
  padding-bottom: 80px;
}

.about__inner {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-3xl);
  align-items: start;
}

.about__title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.about__desc {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.about__features {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.about__feature {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
}

.about__feature-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.about__feature-icon svg {
  width: 18px;
  height: 18px;
}

.about__feature div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.about__feature strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.about__feature span {
  font-size: 13px;
  color: var(--text-secondary);
}

/* --- Info Page --- */

.info-page {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-xl) 0;
}

.info-page h1 {
  font-size: 24px;
  margin-bottom: var(--space-xl);
}

.info-page h2 {
  font-size: 17px;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.info-page p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.info-page ul {
  margin-bottom: var(--space-md);
  padding-left: var(--space-lg);
}

.info-page li {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-secondary);
  list-style: disc;
  margin-bottom: var(--space-xs);
}

.info-page a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.info-page a:hover {
  opacity: 0.7;
}

/* --- Hero --- */

.hero {
  text-align: center;
  padding: var(--space-2xl) 0;
}

.hero__title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-2xl);
}

.hero--compact {
  padding-top: var(--space-lg);
}

.hero--compact .hero__title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px !important;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  white-space: nowrap;
}

/* --- Category Grid --- */

.categories-large {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.categories-small {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

/* --- Listings Grid --- */

.listings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.listings-grid .empty-state,
.listings-grid .spinner {
  grid-column: 1 / -1;
}

/* --- Listing Page Layout --- */

.listing-page {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  max-width: 760px;
}

/* --- Form Page --- */

.form-page {
  max-width: 640px;
  margin: 0 auto;
}

/* --- Admin Layout --- */

.admin-content {
  padding: var(--space-xl) 0;
}

.admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  align-items: flex-end;
}

.admin-filters .form-group {
  margin-bottom: 0;
  min-width: 150px;
}

.admin-listing-filters {
  display: grid;
  grid-template-columns:
    minmax(150px, 0.75fr)
    minmax(220px, 1fr)
    minmax(260px, 1fr)
    auto;
  grid-template-areas:
    "status category search apply"
    "languages languages languages languages";
  align-items: end;
  column-gap: var(--space-md);
  row-gap: 18px;
  padding: var(--space-lg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.admin-listing-filters .admin-filter-field {
  min-width: 0;
}

.admin-filter-field--status {
  grid-area: status;
}

.admin-filter-field--category {
  grid-area: category;
}

.admin-filter-field--search {
  grid-area: search;
}

.admin-filter-field--languages {
  grid-area: languages;
  padding-top: 2px;
}

.admin-filter-field--languages .lang-chips {
  min-height: 38px;
  align-items: center;
  gap: 8px;
}

.admin-filter-field--languages .lang-chip {
  min-height: 36px;
  padding: 0 16px;
}

.admin-filter-field--apply {
  grid-area: apply;
  justify-self: end;
}

.admin-filter-field--apply .btn {
  min-height: 50px;
  padding-inline: 22px;
}

/* --- Section Titles --- */

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
}

.section-header__title {
  font-size: 18px;
  font-weight: 600;
}

.section-header__subtitle {
  margin-top: 6px;
  max-width: 660px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.45;
}

.section-header__count {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 400;
  margin-left: var(--space-sm);
}

/* --- Utility --- */

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.text-center {
  text-align: center;
}

.btn-text-short {
  display: none;
}

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
