/* KTP Pharmaceutical - Bilingual (Farsi/English) */
:root {
  --color-primary: #0d4f8b;
  --color-primary-dark: #083a6b;
  --color-accent: #1a936f;
  --color-text: #1a1a1a;
  --color-text-muted: #555;
  --color-bg: #fff;
  --color-bg-alt: #f8f9fa;
  --font-en: 'Source Sans 3', -apple-system, sans-serif;
  --font-fa: 'Vazirmatn', 'Source Sans 3', sans-serif;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,.08);
  --transition: 0.2s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-en);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.rtl {
  font-family: var(--font-fa);
  text-align: right;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.98);
  box-shadow: var(--shadow);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--color-primary);
  font-weight: 700;
  font-size: 1.5rem;
}

.logo img {
  height: 96px;
  width: auto;
}

.main-nav {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.main-nav::-webkit-scrollbar {
  display: none;
}

.main-nav a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
  font-size: clamp(0.8125rem, 1.8vw, 1rem);
  display: inline-block;
}

.main-nav a:hover {
  color: var(--color-primary);
}

/* Nav toggle (hamburger) – shown only on small screens via media query */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle:hover {
  background: var(--color-bg-alt);
  color: var(--color-primary);
}

.nav-toggle:focus {
  outline: none;
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform var(--transition), opacity var(--transition);
}

body.nav-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.nav-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

body.nav-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.lang-switch {
  font-size: 0.9rem;
}

.lang-switch a {
  color: var(--color-text-muted);
  text-decoration: none;
  padding: 0 .3rem;
}

.lang-switch a.active {
  color: var(--color-primary);
  font-weight: 600;
}

.lang-switch .sep {
  color: #ccc;
  margin: 0 .2rem;
}

/* Header search */
.header-search-wrap {
  position: relative;
  flex: 0 0 auto;
  min-width: 0;
}

.site-search-input {
  width: 100%;
  min-width: 180px;
  max-width: 260px;
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.site-search-input::placeholder {
  color: var(--color-text-muted);
}

.site-search-input:hover {
  border-color: #cbd5e1;
}

.site-search-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(13, 79, 139, 0.15);
}

.rtl .site-search-input {
  padding: 0.5rem 0.75rem 0.5rem 2rem;
}

.site-search-clear {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 0.5rem;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: none;
  background: none;
  color: var(--color-text-muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition), background var(--transition);
}

.rtl .site-search-clear {
  right: auto;
  left: 0.5rem;
}

.site-search-clear:hover {
  color: var(--color-text);
  background: rgba(0, 0, 0, 0.06);
}

.site-search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  min-width: 320px;
  max-width: 420px;
  max-height: 70vh;
  overflow-y: auto;
  background: var(--color-bg);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border: 1px solid #e2e8f0;
  z-index: 200;
}

.rtl .site-search-dropdown {
  right: 0;
  left: auto;
}

.site-search-dropdown[hidden] {
  display: none !important;
}

.site-search-dropdown .search-dropdown-loading,
.site-search-dropdown .search-dropdown-empty {
  padding: 1rem 1.25rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.site-search-dropdown .search-dropdown-item {
  display: block;
  padding: 0.75rem 1.25rem;
  text-decoration: none;
  color: var(--color-text);
  border-bottom: 1px solid #f1f5f9;
  transition: background var(--transition);
  text-align: left;
  cursor: pointer;
}

.rtl .site-search-dropdown .search-dropdown-item {
  text-align: right;
}

.site-search-dropdown .search-dropdown-item:last-child {
  border-bottom: none;
}

.site-search-dropdown .search-dropdown-item:hover,
.site-search-dropdown .search-dropdown-item:focus {
  background: var(--color-bg-alt);
  outline: none;
}

.site-search-dropdown .search-dropdown-item[aria-selected="true"] {
  background: rgba(13, 79, 139, 0.08);
}

.search-dropdown-type {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}

.search-dropdown-title {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}

.search-dropdown-snippet {
  display: block;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.search-dropdown-view-all {
  display: block;
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  border-top: 1px solid #e2e8f0;
  transition: background var(--transition);
  text-align: center;
}

.search-dropdown-view-all:hover {
  background: var(--color-bg-alt);
}

.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;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
    order: 1;
  }
  .logo {
    order: 0;
  }
  .main-nav {
    order: 4;
    flex-basis: 100%;
    width: 100%;
    display: none;
    flex-direction: column;
    flex-wrap: nowrap;
    overflow-x: visible;
    overflow-y: auto;
    gap: 0;
    background: var(--color-bg-alt);
    margin: 0 -1.5rem;
    padding: 0.5rem 1.5rem 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    max-height: 70vh;
  }
  body.nav-open .main-nav {
    display: flex;
  }
  .main-nav a {
    padding: 0.75rem 0.5rem;
    font-size: 1rem;
    white-space: normal;
    min-height: 44px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }
  .main-nav a:last-child {
    border-bottom: none;
  }
  .lang-switch {
    order: 2;
  }
  .header-search-wrap {
    order: 3;
    width: 100%;
    flex-basis: 100%;
  }
  .site-search-input {
    max-width: none;
  }
  .site-search-dropdown {
    min-width: 100%;
    max-width: none;
  }
  .header-inner {
    padding: 0.75rem 1rem;
    gap: 0.75rem;
  }
  .logo img {
    height: 56px;
  }
}

.main-content {
  flex: 1;
}

/* Hero Slider */
.hero-slider {
  position: relative;
  height: 480px;
  overflow: hidden;
  background: var(--color-bg-alt);
}

.slider-track {
  position: relative;
  height: 100%;
}

.slide,
.slide-link {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.5s ease;
  text-decoration: none;
  display: block;
}

.slide-link {
  cursor: pointer;
}

.slide.active {
  opacity: 1;
  z-index: 1;
}

.slide-placeholder {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
}

.slide-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 3rem 2rem;
  background: linear-gradient(transparent, rgba(0,0,0,.7));
  color: #fff;
}

.rtl .slide-content {
  left: 0;
  right: 0;
}

.slide-title {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.slide-subtitle {
  font-size: 1.1rem;
  opacity: .9;
  margin-bottom: 1rem;
}

.slide-cta {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background: var(--color-accent);
  color: #fff !important;
  text-decoration: none;
  border-radius: var(--radius);
  font-weight: 500;
  transition: background var(--transition);
}

.slide-cta:hover {
  background: #15885a;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 48px;
  height: 48px;
  border: none;
  background: rgba(255,255,255,.9);
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  transition: background var(--transition);
}

.slider-btn:hover {
  background: #fff;
}

.slider-btn.prev { left: 1rem; }
.slider-btn.next { right: 1rem; }

.rtl .slider-btn.prev { left: auto; right: 1rem; }
.rtl .slider-btn.next { right: auto; left: 1rem; }

.slider-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 0.5rem;
}

.slider-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  cursor: pointer;
  transition: background var(--transition);
}

.slider-dots span.active {
  background: #fff;
}

/* About section */
.about-section {
  padding: 4rem 1.5rem;
}

.container {
  max-width: 900px;
  margin: 0 auto;
}

.section-title {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  color: var(--color-primary);
}

.content-body {
  line-height: 1.8;
}

.content-body p {
  margin-bottom: 1rem;
}

/* Content body: responsive images (best practices) */
.content-body img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
}

/* Content body: tables */
.content-body table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95rem;
  overflow-x: auto;
  display: block;
}

.content-body table:not(:last-child) {
  margin-bottom: 1.5rem;
}

.content-body thead {
  background: var(--color-bg-alt);
}

.content-body th,
.content-body td {
  border: 1px solid #e2e8f0;
  padding: 0.6rem 0.75rem;
  text-align: inherit;
}

.content-body th {
  font-weight: 600;
  color: var(--color-primary);
}

.content-body tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.02);
}

.content-body tbody tr:hover {
  background: rgba(13, 79, 139, 0.04);
}

@media (max-width: 640px) {
  .content-body table {
    font-size: 0.875rem;
  }
  .content-body th,
  .content-body td {
    padding: 0.5rem;
  }
}

/* Content body: chart block (CMS-inserted) */
.content-body .ktp-chart {
  margin: 1.5rem 0;
  max-width: 100%;
  min-height: 200px;
}

.content-body .ktp-chart canvas {
  max-width: 100% !important;
  height: auto !important;
}

/* Page section */
.page-section {
  padding: 3rem 1.5rem;
}

.page-title {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--color-primary);
}

.page-intro .intro-content {
  margin-bottom: 2rem;
  color: var(--color-text-muted);
}

/* Articles grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.article-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform var(--transition);
}

.article-card:hover {
  transform: translateY(-4px);
}

.article-image {
  display: block;
  aspect-ratio: 16/10;
  overflow: hidden;
}

.article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-body {
  padding: 1.25rem;
}

.article-body h2 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.article-body h2 a {
  color: inherit;
  text-decoration: none;
}

.article-body h2 a:hover {
  color: var(--color-primary);
}

.excerpt {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.btn-link {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
}

.btn-link:hover {
  text-decoration: underline;
}

/* Product filters */
.product-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.product-filter-pill {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  background: var(--color-bg-alt);
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
}

.product-filter-pill:hover {
  background: #e2e8f0;
  color: var(--color-primary);
}

.product-filter-pill.active {
  background: var(--color-primary);
  color: #fff;
}

.product-filter-pill.active:hover {
  background: var(--color-primary-dark);
  color: #fff;
}

/* Products grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2rem;
}

.product-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform var(--transition);
}

.product-card:hover {
  transform: translateY(-4px);
}

.product-image {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-body {
  padding: 1.25rem;
}

.product-body h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.product-body h3 a {
  color: inherit;
  text-decoration: none;
}

.product-body h3 a:hover {
  color: var(--color-primary);
}

.product-card-category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-primary);
  margin-bottom: 0.35rem;
}

/* Article detail */
.article-detail {
  padding: 2rem 1.5rem;
}

.article-hero {
  margin-bottom: 2rem;
  border-radius: var(--radius);
  overflow: hidden;
}

.article-hero img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
}

.article-header h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--color-primary);
}

.article-content {
  font-size: 1.05rem;
}

/* News list */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.news-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform var(--transition);
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-4px);
}

.news-card-image {
  display: block;
  aspect-ratio: 16/10;
  overflow: hidden;
}

.news-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-card-date {
  font-size: 0.85rem;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: block;
}

.news-card-title {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.news-card-title a {
  color: inherit;
  text-decoration: none;
}

.news-card-title a:hover {
  color: var(--color-primary);
}

.news-card-excerpt {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  flex: 1;
}

.news-card-body .btn-link {
  margin-top: auto;
}

/* News detail */
.news-detail {
  padding: 2rem 1.5rem;
}

.news-detail-hero {
  margin-bottom: 2rem;
  border-radius: var(--radius);
  overflow: hidden;
}

.news-detail-hero img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
}

.news-detail-header {
  margin-bottom: 1.5rem;
}

.news-detail-date {
  display: block;
  font-size: 0.95rem;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.news-detail-header h1 {
  font-size: 2rem;
  color: var(--color-primary);
}

.news-detail-content {
  font-size: 1.05rem;
}

/* Product detail */
.product-detail {
  padding: 2rem 1.5rem;
}

.product-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 768px) {
  .product-layout {
    grid-template-columns: 1fr;
  }
}

.product-image-wrap img {
  width: 100%;
  border-radius: var(--radius);
}

.product-detail-category {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.product-info h1 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

/* Empty state */
.empty-state {
  color: var(--color-text-muted);
  text-align: center;
  padding: 3rem;
}

/* Error page */
.error-page {
  text-align: center;
  padding: 4rem 1rem;
}

.error-page h1 {
  font-size: 4rem;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.btn-primary {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.6rem 1.5rem;
  background: var(--color-primary);
  color: #fff !important;
  text-decoration: none;
  border-radius: var(--radius);
}

/* Map (About Us) */
.map-container {
  margin-top: 2rem;
}

.map-iframe {
  border: 0;
  border-radius: var(--radius);
  width: 100%;
  height: 400px;
  display: block;
}

.map-link-wrap {
  margin-top: 1rem;
}

.map-link {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--color-primary);
  color: #fff !important;
  text-decoration: none;
  border-radius: var(--radius);
  font-weight: 500;
}

.map-link:hover {
  background: var(--color-primary-dark);
}

/* Documents (Addresses, Distribution) */
.documents-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid #eee;
}

.documents-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--color-primary);
}

.documents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.document-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.document-preview {
  height: 360px;
  background: #f1f5f9;
}

.pdf-embed {
  width: 100%;
  height: 100%;
  border: none;
}

.document-info {
  padding: 1rem 1.25rem;
}

.document-info h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.document-info .btn-link {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
}

.document-info .btn-link:hover {
  text-decoration: underline;
}

/* Footer */
.site-footer {
  background: var(--color-bg-alt);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin-top: 3rem;
  padding: 2.5rem 1.5rem 2rem;
  text-align: center;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* Useful links section */
.footer-useful-links {
  width: 100%;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.footer-links-heading {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin: 0 0 0.75rem 0;
  line-height: 1.3;
}

.footer-links {
  display: block;
}

.footer-links-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
  row-gap: 0.5rem;
}

.footer-links-list li {
  margin: 0;
  padding: 0;
}

.footer-links-list a {
  display: inline-block;
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.footer-links-list a:hover {
  color: var(--color-primary-dark);
  background: rgba(13, 79, 139, 0.08);
  text-decoration: none;
}

.footer-links-list a:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.footer-links-list a:focus:not(:focus-visible) {
  outline: none;
}

.footer-links-list a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.rtl .footer-links-heading {
  text-transform: none;
  letter-spacing: 0;
}

.footer-inner p {
  margin: 0;
  text-align: center;
}

.footer-copyright {
  margin-bottom: 0.5rem;
  font-weight: 500;
  text-align: center;
}

.footer-legal {
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  margin-top: 0;
  font-size: 0.85rem;
  line-height: 1.6;
  opacity: 0.9;
  max-width: 700px;
  width: 100%;
  text-align: center;
}

/* Search results page */
.search-results-page {
  padding: 2rem 1.5rem 3rem;
}

.search-results-page .page-title {
  margin-bottom: 1.5rem;
}

.search-form-inline {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  max-width: 480px;
}

.search-form-inline .search-input {
  flex: 1;
  padding: 0.65rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
}

.search-form-inline .search-input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.search-submit-btn {
  padding: 0.65rem 1.25rem;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.search-submit-btn:hover {
  background: var(--color-primary-dark);
}

.search-hint,
.search-meta {
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.search-empty {
  padding: 2rem;
  text-align: center;
  background: var(--color-bg-alt);
  border-radius: var(--radius);
}

.search-empty-text {
  margin-bottom: 0.5rem;
}

.search-query-display {
  font-weight: 600;
  color: var(--color-text);
}

.search-results-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.search-result-item {
  margin-bottom: 0.5rem;
}

.search-result-link {
  display: block;
  padding: 1rem 1.25rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-result-link:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow);
}

.search-result-type {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-primary);
  margin-bottom: 0.35rem;
}

.search-result-title {
  display: block;
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.search-result-snippet {
  display: block;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* ========== Responsive: tablets & phones ========== */
html {
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
}

/* Base font size for readability on mobile (avoids zoom on focus) */
@media (max-width: 768px) {
  body {
    font-size: 16px;
  }
}

/* Hero / slider */
@media (max-width: 768px) {
  .hero-slider {
    height: 360px;
  }
  .slide-content {
    padding: 1.5rem 1rem;
  }
  .slide-title {
    font-size: 1.5rem;
  }
  .slide-subtitle {
    font-size: 1rem;
  }
  .slide-cta {
    padding: 0.6rem 1rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .slider-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }
  .slider-btn.prev { left: 0.5rem; }
  .slider-btn.next { right: 0.5rem; }
  .rtl .slider-btn.prev { right: 0.5rem; }
  .rtl .slider-btn.next { left: 0.5rem; }
}

@media (max-width: 480px) {
  .hero-slider {
    height: 280px;
  }
  .slide-content {
    padding: 1rem 0.75rem;
  }
  .slide-title {
    font-size: 1.25rem;
  }
  .slide-subtitle {
    font-size: 0.9rem;
  }
}

/* Sections & containers */
@media (max-width: 768px) {
  .about-section {
    padding: 2.5rem 1rem;
  }
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .section-title {
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
  }
  .page-section {
    padding: 2rem 1rem;
  }
  .page-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }
}

@media (max-width: 480px) {
  .about-section {
    padding: 2rem 0.75rem;
  }
  .page-section {
    padding: 1.5rem 0.75rem;
  }
}

/* Grids: single column on small screens */
@media (max-width: 640px) {
  .articles-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .products-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .news-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .documents-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Cards: touch-friendly and spacing */
@media (max-width: 640px) {
  .article-card,
  .product-card,
  .news-card {
    margin: 0;
  }
  .article-body,
  .product-body,
  .news-card-body {
    padding: 1rem;
  }
  .product-filter-pill {
    padding: 0.6rem 1rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* Article / news detail */
@media (max-width: 768px) {
  .article-detail,
  .news-detail,
  .product-detail {
    padding: 1.5rem 1rem;
  }
  .article-hero img,
  .news-detail-hero img {
    max-height: 280px;
  }
  .article-header h1,
  .news-detail-header h1 {
    font-size: 1.5rem;
  }
  .article-content,
  .news-detail-content {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .article-detail,
  .news-detail,
  .product-detail {
    padding: 1rem 0.75rem;
  }
  .article-hero img,
  .news-detail-hero img {
    max-height: 220px;
  }
}

/* Map */
@media (max-width: 768px) {
  .map-container {
    margin-top: 1.5rem;
  }
  .map-iframe {
    height: 300px;
  }
  .map-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.25rem;
  }
}

@media (max-width: 480px) {
  .map-iframe {
    height: 250px;
  }
}

/* Document cards */
@media (max-width: 640px) {
  .document-preview {
    height: 280px;
  }
  .document-info {
    padding: 1rem;
  }
}

/* Footer */
@media (max-width: 768px) {
  .site-footer {
    padding: 2rem 1rem 1.5rem;
    margin-top: 2rem;
  }
  .footer-links-list a {
    padding: 0.5rem 0.75rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .footer-links-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }
  .footer-links-list a {
    justify-content: center;
  }
  .footer-legal {
    font-size: 0.8rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

/* Search results page */
@media (max-width: 640px) {
  .search-results-page {
    padding: 1.5rem 1rem 2rem;
  }
  .search-form-inline {
    flex-direction: column;
    max-width: none;
  }
  .search-form-inline .search-input {
    min-height: 44px;
  }
  .search-submit-btn {
    min-height: 44px;
    width: 100%;
  }
  .search-result-link {
    padding: 1rem;
  }
}

/* Buttons: touch targets */
@media (max-width: 768px) {
  .btn-primary {
    min-height: 44px;
    padding: 0.75rem 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* Error page */
@media (max-width: 480px) {
  .error-page h1 {
    font-size: 2.5rem;
  }
  .error-page {
    padding: 2rem 0.75rem;
  }
}

/* Lang switch: touch-friendly on small screens */
@media (max-width: 768px) {
  .lang-switch a {
    padding: 0.5rem 0.6rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}
