@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Source+Serif+4:wght@400;500;600;700&display=swap");

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --cream: #fdf8f0;
  --cream-dark: #f5ede0;
  --beige: #e8dcc8;
  --beige-dark: #d4c4a8;
  --brown: #8b7355;
  --brown-dark: #5c4a32;
  --text: #2c1810;
  --text-light: #6b5b4e;
  --accent: #c0392b;
  --accent-hover: #a93226;
  --accent-gold: #d4a853;
  --accent-green: #27ae60;
  --primary: #a67c52;
  --beige-light: #f5ede0;
  --cream-light: #fdf8f0;
  --card-bg: #ffffff;
  --border: #d4c4a8;
  --white: #ffffff;
  --shadow: 0 2px 12px rgba(44, 24, 16, 0.08);
  --shadow-hover: 0 8px 30px rgba(44, 24, 16, 0.12);
  --radius: 16px;
  --radius-sm: 8px;
  --font: "Inter", Arial, sans-serif;
  --font-heading: Georgia, "Times New Roman", serif;
  --transition: 0.3s ease;
  --navbar-height: 64px;

  /* Claude AI palette */
  --claude-bg: #f7f4ed;
  --claude-surface: #fbfaf7;
  --claude-border: #ded8cc;
  --claude-text: #2b2118;
  --claude-muted: #5f574f;
  --claude-hover: #8a6f4d;
}

body {
  font-family: var(--font);
  background: var(--cream);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
}

a {
  color: var(--brown-dark);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent);
}

img {
  max-width: 100%;
  height: auto;
}

/* =========================================================
   NAVBAR – Moderne avec dropdown, drawer mobile, search overlay
   ========================================================= */

.navbar {
  background: var(--claude-surface);
  border-bottom: 1px solid var(--claude-border);
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--navbar-height);
  display: flex;
  align-items: center;
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  gap: 16px;
}

/* --- Logo --- */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  height: 100%;
  flex-shrink: 0;
}

.nav-logo img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.nav-logo .logo-text {
  display: flex;
  align-items: center;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--claude-text);
  gap: 0;
  font-family: var(--font-heading);
}

.logo-bleu { color: #1e90ff; }
.logo-jaune { color: #ffd700; }
.logo-rouge { color: #ff0000; }

/* --- Desktop nav links --- */
.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 2px;
  height: 100%;
  margin: 0;
  padding: 0;
}

.nav-links > li {
  display: flex;
  align-items: center;
  height: 100%;
  position: relative;
}

.nav-links > li > a,
.nav-links > li > button,
.download-app-link {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--claude-muted);
  text-decoration: none;
  white-space: nowrap;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  transition: color 0.2s ease;
  position: relative;
}

.nav-links > li > a:hover,
.nav-links > li > button:hover,
.nav-links > li > a.active,
.download-app-link:hover {
  color: var(--claude-text);
}

/* --- Dropdown: Actualités de la RDC --- */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  display: flex !important;
  align-items: center;
  gap: 3px;
}

.dropdown-chevron {
  transition: transform 0.2s ease;
}

.nav-dropdown:hover .dropdown-chevron {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: #fff;
  border: 1px solid rgba(139, 108, 72, 0.15);
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
  padding: 6px 0;
  margin: 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
  z-index: 200;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-dropdown-menu li {
  display: block;
  height: auto;
}

.nav-dropdown-menu a {
  display: block;
  height: auto;
  padding: 10px 18px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--claude-muted);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
  border: none;
  background: transparent;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active {
  background: rgba(139, 108, 72, 0.06);
  color: var(--claude-text);
}

/* --- Search button in nav --- */
.nav-search-btn {
  padding: 0 6px !important;
  background: none !important;
  color: var(--claude-muted) !important;
}

.nav-search-btn:hover {
  color: var(--claude-text) !important;
}

.nav-search-btn svg {
  display: block;
}

/* --- Search overlay (like Claude AI) --- */
.nav-search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(8px);
  padding: 0;
  border-bottom: 1px solid rgba(139, 108, 72, 0.12);
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
}

.nav-search-overlay.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.nav-search-overlay-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 24px;
}

.nav-search-form {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.nav-search-form-icon {
  flex-shrink: 0;
  color: var(--claude-muted);
}

.nav-search-input {
  flex: 1;
  min-width: 0;
  height: 48px;
  border: none;
  background: transparent;
  font-size: 1.2rem;
  color: var(--claude-text);
  outline: none;
  font-family: var(--font);
}

.nav-search-input::placeholder {
  color: rgba(139, 108, 72, 0.4);
}

.nav-search-close {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--claude-muted);
  transition: color 0.2s ease;
}

.nav-search-close:hover {
  color: var(--claude-text);
}

/* --- Hamburger toggle --- */
.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  height: 100%;
  z-index: 400;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--claude-muted);
  border-radius: 2px;
  transition: all 0.25s ease;
}

/* --- Drawer overlay --- */
.nav-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 400;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.nav-drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* --- Drawer (mobile menu) --- */
.nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 300px;
  max-width: 85vw;
  background: #fff;
  z-index: 500;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 30px rgba(0,0,0,0.1);
}

.nav-drawer.open {
  transform: translateX(0);
}

.nav-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(139, 108, 72, 0.1);
}

.nav-drawer-header .nav-logo img {
  width: 28px;
  height: 28px;
}

.nav-drawer-header .nav-logo .logo-text {
  font-size: 1.05rem;
}

.nav-drawer-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--claude-muted);
  transition: color 0.2s ease;
}

.nav-drawer-close:hover {
  color: var(--claude-text);
}

.nav-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.nav-drawer-search {
  padding: 12px 20px 16px;
  border-bottom: 1px solid rgba(139, 108, 72, 0.08);
}

.nav-drawer-search form {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(139, 108, 72, 0.2);
  border-radius: 8px;
  padding: 0 14px;
  height: 44px;
}

.nav-drawer-search form svg {
  flex-shrink: 0;
  color: var(--claude-muted);
}

.nav-drawer-search form input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-size: 0.95rem;
  color: var(--claude-text);
  outline: none;
  font-family: var(--font);
}

.nav-drawer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-drawer-links > li > a {
  display: block;
  padding: 14px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--claude-text);
  text-decoration: none;
  transition: background 0.15s ease;
}

.nav-drawer-links > li > a:hover,
.nav-drawer-links > li > a.active {
  background: rgba(139, 108, 72, 0.06);
}

.nav-drawer-section {
  padding: 0;
}

.nav-drawer-section-title {
  display: block;
  padding: 18px 20px 6px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--claude-muted);
  text-decoration: none;
}

.nav-drawer-sublinks {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-drawer-sublinks a {
  display: block;
  padding: 10px 20px 10px 36px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--claude-muted);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-drawer-sublinks a:hover,
.nav-drawer-sublinks a.active {
  background: rgba(139, 108, 72, 0.06);
  color: var(--claude-text);
}

/* --- Supprimer tout pseudo-élément indésirable --- */
.nav-links a::after,
.nav-links a.active::after,
.nav-links a:hover::after,
.download-app-link::after {
  display: none !important;
  content: none !important;
}

/* Fin Navbar
   ========================================================= */

.hero {
  background: var(--cream);
  padding: 42px 20px 28px;
  text-align: center;
}

.hero-content {
  max-width: 700px;
  margin: 0 auto;
}

.hero-title,
.hero h1 {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 700;
  font-size: 36px;
  color: #2A211C;
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.hero-subtitle,
.hero p {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 400;
  font-size: 20px;
  color: #5E544A;
  line-height: 1.65;
  letter-spacing: -0.005em;
  margin-bottom: 0;
}

.hero-categories {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-tag {
  display: inline-block;
  padding: 6px 16px;
  background: var(--white);
  border: 1px solid var(--beige-dark);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--brown-dark);
  transition: all var(--transition);
}

.hero-tag:hover {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.main-layout {
  padding: 24px 0 32px;
  width: 100%;
}

.articles-section {
  width: 100%;
  min-width: 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.section-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  font-family: var(--font-heading);
  letter-spacing: -0.3px;
}

.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-btn {
  padding: 6px 14px;
  border: 1px solid var(--beige-dark);
  background: var(--white);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-light);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
}

.filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-btn.active {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
  width: 100%;
  align-items: start;
}

.article-card {
  background: transparent;
  border: 1px solid rgba(42, 40, 38, 0.10);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.article-card:hover {
  transform: translateY(-3px);
  background: rgba(255,255,255,0.45);
  border-color: rgba(42, 40, 38, 0.18);
}

.article-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.article-card-image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  background: var(--beige);
}

.article-card-body {
  padding: 16px 20px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  text-align: left;
}

.article-card-category {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 6px;
  font-family: var(--font);
}

.article-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
  font-family: var(--font-heading);
  color: var(--text);
  text-align: left;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-light);
  font-family: var(--font);
  text-align: left;
  margin-top: auto;
  padding-top: 8px;
}

.article-card-date {
  font-size: 0.78rem;
  text-align: left;
}

.article-card-author {
  font-size: 0.78rem;
  color: var(--brown-dark);
  font-weight: 500;
  text-align: left;
}

.article-card:hover .article-card-title {
  color: var(--brown-dark);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-widget {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.sidebar-widget h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
  font-family: var(--font-heading);
}

.sidebar-categories {
  list-style: none;
}

.sidebar-categories li {
  padding: 8px 0;
  border-bottom: 1px solid var(--cream-dark);
}

.sidebar-categories li:last-child {
  border-bottom: none;
}

.sidebar-categories a {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--text-light);
}

.sidebar-categories a:hover {
  color: var(--accent);
}

.social-links {
  display: flex;
  gap: 8px;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--white);
  transition: all var(--transition);
}

.social-btn.whatsapp {
  background: #25d366;
}
.social-btn.facebook {
  background: #1877f2;
}
.social-btn.twitter {
  background: #000;
}

.social-btn:hover {
  transform: scale(1.1);
  opacity: 0.9;
  color: var(--white);
}

.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-light);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--beige);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 16px;
}

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

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 32px 10px;
  max-width: 100%;
  width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

.pagination button {
  flex: 0 0 auto;
  min-width: 36px;
  padding: 6px 10px;
  border: 1px solid var(--beige-dark);
  background: var(--white);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
  white-space: nowrap;
  box-sizing: border-box;
  max-width: 100%;
  line-height: 1.3;
}

.pagination button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pagination button.active {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: default;
  border-color: var(--beige);
}

@media (max-width: 768px) {
  .pagination {
    gap: 5px;
    padding: 24px 8px;
  }

  .pagination button {
    min-width: 32px;
    padding: 5px 8px;
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .pagination {
    gap: 4px;
    padding: 20px 6px;
  }

  .pagination button {
    min-width: 28px;
    padding: 4px 7px;
    font-size: 0.7rem;
  }
}

/* --- Page de recherche --- */
.search-page-header {
  padding: 24px 0 8px;
}

.search-form {
  display: flex;
  gap: 8px;
  max-width: 600px;
  margin: 0 auto;
}

.search-input {
  flex: 1;
  padding: 12px 16px;
  font-size: 1rem;
  border: 2px solid var(--beige-dark);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s ease;
  background: var(--white);
  color: var(--claude-text);
}

.search-input:focus {
  border-color: var(--accent);
}

.search-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 2px solid var(--beige-dark);
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
  color: var(--claude-muted);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.search-submit-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--cream-light);
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.home-nav {
  text-align: center;
  padding: 32px 0;
  border-top: 1px solid var(--beige);
  margin-top: 32px;
  display: none;
}

.home-nav p {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 20px;
  font-weight: 500;
}

.home-nav-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.home-nav-btn {
  display: inline-block;
  padding: 10px 24px;
  background: var(--white);
  border: 1px solid var(--beige-dark);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brown-dark);
  text-decoration: none;
  transition: all var(--transition);
}

.home-nav-btn:hover {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

/* =========================================================
   HERO – Layout 58% / 42%
   Grand article à gauche, mini articles en grille 2×5 à droite
   ========================================================= */

.hero-layout {
  display: grid;
  grid-template-columns: 58% 42%;
  gap: 28px;
  align-items: start;
  margin-bottom: 40px;
}

.hero-main {
  min-width: 0;
}

.hero-side-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.hero-article {
  width: 100%;
  border: 1px solid rgba(42, 40, 38, 0.10);
  border-radius: 14px;
  overflow: hidden;
  background: transparent;
  transition: transform .25s ease, border-color .25s ease;
}

.hero-article:hover {
  transform: translateY(-3px);
  border-color: rgba(42, 40, 38, 0.18);
}

.hero-article-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.hero-article-image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.hero-article-overlay {
  padding: 20px 24px 28px;
}

.hero-article-category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
  font-family: var(--font);
}

.hero-article-title {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 10px;
  font-family: var(--font-heading);
  letter-spacing: -0.3px;
  text-align: left;
}

.hero-article-excerpt {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.5;
  margin-bottom: 10px;
  font-family: var(--font);
  text-align: left;
}

.hero-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  text-align: left;
}

.hero-article-author {
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 500;
  text-align: left;
}

.hero-article-date {
  font-size: 0.8rem;
  color: var(--text-light);
  text-align: left;
}

/* Hero side items – Compact horizontal layout with image */
.hero-side-item {
  display: flex;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  padding: 12px;
  align-items: flex-start;
  border-radius: 12px;
  transition: background .2s ease;
  border-bottom: 1px solid rgba(42, 40, 38, 0.06);
}

.hero-side-item:last-child {
  border-bottom: none;
}

.hero-side-item:hover {
  background: rgba(255,255,255,0.5);
}

.hero-side-image {
  width: 90px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  aspect-ratio: 4/3;
}

.hero-side-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
  text-align: left;
}

.hero-side-category {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
  text-align: left;
}

.hero-side-title {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  text-align: left;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: var(--font-heading);
}

.hero-side-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 0.68rem;
  color: var(--text-light);
  text-align: left;
}

.hero-side-date {
  font-size: 0.68rem;
  color: var(--text-light);
  text-align: left;
}

.hero-side-author {
  font-size: 0.68rem;
  color: var(--brown-dark);
  font-weight: 500;
  text-align: left;
}

/* =========================================================
   SECTIONS – Homepage category sections
   1 grand article à gauche, 3 mini articles à droite
   ========================================================= */

.homepage-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 44px;
  width: 100%;
}

.homepage-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
}

.homepage-section-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  font-family: var(--font-heading);
  letter-spacing: -0.3px;
}

.homepage-section-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brown);
  text-decoration: none;
  transition: color var(--transition);
}

.homepage-section-link:hover {
  color: var(--accent);
}

.back-home-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--brown);
  text-decoration: none;
  margin-left: 12px;
}

.back-home-link:hover {
  color: var(--accent);
}

/* Category block – Main article + mini articles */
.category-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.category-block-main {
  min-width: 0;
}

.category-block-main .article-card-image {
  aspect-ratio: 16/9;
}

.category-block-mini {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Mini cards – For category section mini articles */
.mini-card {
  border-bottom: 1px solid rgba(42, 40, 38, 0.06);
  transition: background .2s ease;
}

.mini-card:last-child {
  border-bottom: none;
}

.mini-card:hover {
  background: rgba(255,255,255,0.4);
}

.mini-card-link {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  padding: 14px 0;
  align-items: start;
}

.mini-card-image {
  width: 100px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  aspect-ratio: 4/3;
}

.mini-card-body {
  display: flex;
  flex-direction: column;
  text-align: left;
  gap: 3px;
  min-width: 0;
}

.mini-card-category {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
  text-align: left;
}

.mini-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  text-align: left;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: var(--font-heading);
}

.mini-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 0.7rem;
  color: var(--text-light);
  text-align: left;
}

.mini-card-date {
  font-size: 0.7rem;
  color: var(--text-light);
  text-align: left;
}

.mini-card-author {
  font-size: 0.7rem;
  color: var(--brown-dark);
  font-weight: 500;
  text-align: left;
}

/* =========================================================
   FOOTER – Disposition 4 colonnes premium
   Fond sombre, séparateurs verticaux discrets
   ========================================================= */

.footer {
  background: #171614;
  color: #ece8e3;
  padding: 64px 0 0;
  margin-top: 56px;
  border-top: 1px solid #2a2826;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 0;
}

.footer-col {
  padding: 0 24px;
  position: relative;
}

.footer-col + .footer-col {
  border-left: 1px solid #2a2826;
}

/* Colonne 1 – Brand centrée verticalement */
.footer-col-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.footer-logo {
  height: 72px;
  width: auto;
  object-fit: contain;
}

.footer-col-brand .logo-text {
  color: #ece8e3;
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-heading);
}

.footer-tagline {
  font-size: 0.85rem;
  color: #a9a39b;
  line-height: 1.5;
  font-family: var(--font);
}

.footer-location {
  font-size: 0.85rem;
  color: #a9a39b;
  font-family: var(--font);
}

.footer-social {
  display: flex;
  gap: 16px;
  margin-top: 4px;
}

.footer-social a {
  color: #ffffff;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.2s ease;
  font-family: var(--font);
}

.footer-social a:hover {
  color: var(--accent);
  text-decoration: none;
}

.footer-store {
  margin-top: 4px;
}

.footer-store img {
  height: 40px;
  width: auto;
  transition: transform 0.2s ease;
  opacity: 0.85;
}

.footer-store a:hover img {
  transform: scale(1.05);
  opacity: 1;
}

/* Titres de colonnes */
.footer-col-title {
  font-size: 0.7rem;
  font-weight: 600;
  color: #a9a39b;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 20px;
  font-family: var(--font);
}

.footer-col-title-secondary {
  margin-top: 28px;
}

/* Listes de liens */
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links li {
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: #ffffff;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 400;
  transition: color 0.2s ease;
  font-family: var(--font);
}

.footer-links a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* Barre inférieure */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  margin-top: 48px;
  border-top: 1px solid #2a2826;
  font-size: 0.82rem;
  color: #a9a39b;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--font);
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.footer-bottom-left {
  text-align: left;
  color: #a9a39b;
}

.footer-bottom-right {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-left: auto;
}

.footer-bottom-right a {
  color: #a9a39b;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-bottom-right a:hover {
  color: var(--accent);
}

.footer-bottom-sep {
  color: #a9a39b;
  user-select: none;
}

/* Responsive - footer en 2 colonnes sur mobile et tablette */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 32px !important;
  }

  .footer-col {
    border-left: none !important;
    padding-left: 0 !important;
  }

  .footer-col-brand {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  .footer-col:nth-child(2) {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }

  .footer-col:nth-child(3) {
    grid-column: 1 !important;
    grid-row: 2 !important;
  }

  .footer-col:nth-child(4) {
    grid-column: 2 !important;
    grid-row: 2 !important;
  }

  .footer-bottom {
    margin-top: 40px;
    padding: 20px 16px;
  }
}

@media (max-width: 480px) {
  .footer {
    padding: 48px 0 0;
    margin-top: 40px;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 24px !important;
  }

  .footer-col-brand {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  .footer-col:nth-child(2) {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }

  .footer-col:nth-child(3) {
    grid-column: 1 !important;
    grid-row: 2 !important;
  }

  .footer-col:nth-child(4) {
    grid-column: 2 !important;
    grid-row: 2 !important;
  }

  .footer-logo {
    max-width: 72px !important;
  }

  .footer-col-brand .logo-text {
    font-size: 20px !important;
  }

  .footer-col-title,
  .footer-col a,
  .footer-col p {
    font-size: 13px !important;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 8px;
    margin-top: 36px;
  }

  .footer-bottom-left {
    text-align: center;
  }

  .footer-bottom-right {
    margin-left: 0;
    justify-content: center;
  }
}

/* =========================================================
   ARTICLE PAGE – Centré, lisible, sans sidebar
   ========================================================= */

.article-page {
  min-height: 100vh;
  padding: 0;
}

.article-main {
  max-width: 820px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.article-full {
  background: transparent;
}

/* ========== HEADER / TITLE ========== */

.article-header {
  margin-bottom: 40px;
}

.article-category {
  display: inline-block;
  padding: 4px 14px;
  background: var(--accent);
  color: #fff;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
  font-family: var(--font);
}

.article-full h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(36px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.035em;
  margin-bottom: 32px;
  color: var(--text);
  max-width: 95%;
}

/* ========== META ========== */

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  padding: 24px 0 28px;
  border-bottom: 1px solid var(--beige);
  font-size: 0.9rem;
  color: var(--text-light);
  font-family: var(--font);
}

.article-author-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.article-author-avatar {
  width: 40px;
  height: 40px;
  background: var(--brown);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.article-author-name {
  font-weight: 600;
  color: var(--text);
}

.article-date {
  color: var(--text-light);
}

/* ========== FEATURED IMAGE ========== */

.article-featured-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  margin: 0 0 48px;
  box-shadow: none;
  border: none;
}

/* ========== ARTICLE BODY ========== */

.article-content {
  max-width: 760px;
  margin: 0 auto;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 21px;
  font-weight: 400;
  line-height: 1.9;
  color: #2A211C;
  text-align: left;
  letter-spacing: -0.005em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.article-content h2 {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 600;
  font-size: 1.7rem;
  margin: 52px 0 20px;
  color: #241915;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.article-content h3 {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 600;
  font-size: 1.35rem;
  margin: 42px 0 16px;
  color: #241915;
  letter-spacing: -0.005em;
  line-height: 1.35;
}

.article-content h4 {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 600;
  font-size: 1.15rem;
  margin: 36px 0 12px;
  color: #241915;
  line-height: 1.4;
}

.article-content p {
  margin-bottom: 2rem;
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 400;
  color: #2A211C;
}

.article-content strong {
  font-weight: 600;
  color: #241915;
}

.article-content a {
  color: var(--brown-dark);
  text-decoration: underline;
  text-decoration-color: var(--beige-dark);
  text-underline-offset: 3px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.article-content a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.article-content ul,
.article-content ol {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 21px;
  line-height: 1.9;
  color: #2A211C;
  margin: 0 0 2rem;
  padding-left: 1.5em;
}

.article-content li {
  margin-bottom: 0.4em;
}

.article-content img {
  border-radius: 6px;
  margin: 44px 0;
  box-shadow: none;
  border: none;
  width: 100%;
  height: auto;
}

.article-content blockquote {
  font-family: "Source Serif 4", Georgia, serif;
  border-left: 4px solid var(--accent);
  padding: 24px 32px;
  margin: 44px 0;
  background: var(--cream-dark);
  border-radius: 0 6px 6px 0;
  font-style: italic;
  color: var(--text-light);
  font-size: 0.95em;
  line-height: 1.8;
}

/* ========== TAGS ========== */

.article-keywords {
  padding: 36px 0 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.article-keyword {
  display: inline-block;
  padding: 6px 16px;
  background: var(--cream-dark);
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--brown);
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease;
}
.article-keyword:hover {
  background: var(--beige-dark);
  color: var(--brown-dark);
}

/* ========== ARTICLE FOOTER ========== */

.article-footer-meta {
  padding: 28px 0 0;
  border-top: 1px solid var(--beige);
  font-size: 0.85rem;
  color: var(--text-light);
  font-family: var(--font);
  margin-top: 8px;
}

.article-footer-meta a {
  color: var(--brown-dark);
  text-decoration: underline;
}

/* ========== SHARE SECTION ========== */

.share-section {
  margin: 56px 0 0;
  padding: 36px 0 0;
  border-top: 1px solid var(--beige);
}

.share-section h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 16px;
  font-family: var(--font);
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.share-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--beige);
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: var(--font);
  color: var(--text);
  background: var(--cream-dark);
  text-decoration: none;
  line-height: 1;
}

.share-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.share-btn:hover {
  transform: translateY(-1px);
  background: var(--beige-light);
  border-color: var(--beige-dark);
}

.share-btn.copy-link {
  color: var(--brown);
}

.admin-page {
  background: var(--cream);
}

.admin-badge {
  background: var(--accent);
  color: var(--white);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.admin-container h1 {
  font-size: 1.8rem;
  font-weight: 700;
  padding: 32px 0;
  font-family: var(--font-heading);
}

.admin-login {
  display: flex;
  justify-content: center;
  padding: 40px 0;
}

.admin-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 440px;
}

.admin-card h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
  font-family: var(--font-heading);
}

.admin-card p {
  color: var(--text-light);
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.form-group {
  margin-bottom: 16px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--beige-dark);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: var(--font);
  background: var(--white);
  color: var(--text);
  transition: border-color var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: all var(--transition);
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
  width: 100%;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-action {
  background: var(--white);
  color: var(--text);
  border: 1px solid var(--beige-dark);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  font-size: 0.9rem;
}

.btn-action:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-generate {
  background: var(--accent-gold);
  color: var(--white);
}

.btn-generate:hover {
  background: #c49a3c;
}

.btn-publish {
  background: var(--accent-green);
  color: var(--white);
}

.btn-publish:hover {
  background: #219a52;
}

.btn-preview {
  background: var(--brown);
  color: var(--white);
}

.btn-preview:hover {
  background: var(--brown-dark);
}

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

.error-message {
  color: var(--accent);
  font-size: 0.85rem;
  margin-top: 12px;
}

.admin-actions {
  margin-bottom: 24px;
}

.admin-actions-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.action-result {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  display: none;
}

.action-result.success {
  display: block;
  background: #e8f5e9;
  color: #2e7d32;
}

.action-result.error {
  display: block;
  background: #ffebee;
  color: #c62828;
}

.admin-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

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

.admin-table-wrapper {
  overflow-x: auto;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.admin-table th {
  background: var(--cream-dark);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  border-bottom: 2px solid var(--beige);
}

.admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--cream-dark);
  vertical-align: middle;
}

.admin-table tr:hover {
  background: var(--cream);
}

.admin-table .status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-draft {
  background: #fff3e0;
  color: #e65100;
}

.status-generated {
  background: #e3f2fd;
  color: #1565c0;
}

.status-published {
  background: #e8f5e9;
  color: #2e7d32;
}

.admin-table .thumbnail {
  width: 60px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  background: var(--beige);
}

.admin-actions-cell {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.text-center {
  text-align: center;
  padding: 40px !important;
  color: var(--text-light);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.modal {
  background: var(--white);
  border-radius: var(--radius);
  max-width: 800px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--cream-dark);
}

.modal-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
  padding: 4px;
}

.modal-body {
  padding: 24px;
}

.modal-lg {
  max-width: 900px;
}

/* === MEDIA UPLOADER MODAL === */
.media-uploader-zone {
  border: 2px dashed var(--beige-dark);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  background: var(--beige-light);
  transition: all .2s;
  position: relative;
}
.media-uploader-zone:hover,
.media-uploader-zone.drag-over {
  border-color: var(--primary);
  background: #e8dcc8;
}
.media-uploader-zone.drag-over {
  transform: scale(1.01);
}
.media-uploader-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: .7;
}
.media-uploader-text {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 6px;
}
.media-uploader-hint {
  font-size: .82rem;
  color: var(--text-light);
}
.media-preview-inner {
  margin-bottom: 12px;
}
.media-preview-img {
  max-width: 100%;
  max-height: 200px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.media-preview-icon {
  font-size: 3rem;
  margin-bottom: 8px;
}
.media-preview-filename {
  font-weight: 600;
  font-size: .9rem;
  word-break: break-all;
}
.media-preview-meta {
  display: flex;
  justify-content: space-between;
  font-size: .82rem;
  color: var(--text-light);
  margin-top: 4px;
  padding: 0 4px;
}
.media-upload-progress {
  margin-top: 16px;
}
.media-progress-bar-track {
  width: 100%;
  height: 6px;
  background: var(--beige-dark);
  border-radius: 3px;
  overflow: hidden;
}
.media-progress-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width .3s ease;
}
.media-upload-status {
  font-size: .82rem;
  color: var(--text-light);
  margin-top: 6px;
  text-align: center;
}
.media-result-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
  flex-wrap: wrap;
}
/* === PUBLIC ARTICLE MEDIA STYLES === */
.article-media {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 16px 0;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
.article-attachment {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--beige-light);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: .9rem;
  margin: 8px 0;
  border: 1px solid var(--beige-dark);
  transition: all .2s;
}
.article-attachment:hover {
  background: var(--cream-dark);
  border-color: var(--primary);
  color: var(--accent);
}
.article-audio {
  width: 100%;
  max-width: 500px;
  margin: 16px 0;
  border-radius: 8px;
}
.media-uploader-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}
.media-uploader-modal {
  background: var(--white);
  border-radius: var(--radius);
  max-width: 700px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
  z-index: 2001;
  position: relative;
}
.media-uploader-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--cream-dark);
}
.media-uploader-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
}
.media-uploader-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
  padding: 4px;
  line-height: 1;
}
.media-uploader-close:hover {
  color: var(--text);
}
.media-uploader-body {
  padding: 24px;
}
.media-uploader-message {
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: .85rem;
  text-align: center;
}
.media-uploader-message.error {
  background: #fdecea;
  color: #d32f2f;
  border: 1px solid #f5c6cb;
}
.media-uploader-message.success {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}
.media-uploader-formats {
  font-size: .75rem;
  color: var(--text-light);
  margin-top: 8px;
  line-height: 1.4;
}
.media-preview-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 16px;
  flex-wrap: wrap;
}
.media-preview-icon-big {
  font-size: 3rem;
  margin-bottom: 8px;
}
.media-preview-filename {
  font-weight: 600;
  font-size: .9rem;
  word-break: break-all;
}
.is-dragging {
  border-color: var(--primary) !important;
  background: #e8dcc8 !important;
  transform: scale(1.01);
}
body.media-modal-open {
  overflow: hidden;
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--beige-dark);
  color: var(--text);
}
.btn-outline:hover {
  background: var(--beige-light);
  border-color: var(--primary);
}
/* === END MEDIA UPLOADER === */

.admin-layout {
  display: flex;
  gap: 24px;
  min-height: 70vh;
}

.admin-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 0;
  position: sticky;
  top: 88px;
  align-self: flex-start;
}

.admin-nav {
  display: flex;
  flex-direction: column;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border: none;
  background: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
  text-align: left;
  width: 100%;
  text-decoration: none;
  box-sizing: border-box;
}

.admin-nav-item:hover {
  background: var(--cream);
  color: var(--accent);
}

.admin-nav-item.active {
  background: var(--cream-dark);
  color: var(--accent);
  font-weight: 600;
  border-right: 3px solid var(--accent);
}

.nav-icon {
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
}

.admin-nav-divider {
  border: none;
  border-top: 1px solid var(--beige);
  margin: 8px 16px;
}

.admin-content {
  flex: 1;
  min-width: 0;
}

.admin-section {
  display: none;
}

.admin-section.active {
  display: block;
}

.admin-section h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.section-header h2 {
  margin-bottom: 0;
}

.section-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  text-align: center;
  border: 1px solid var(--beige);
  transition: transform var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.stat-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-top: 4px;
}

.table-wrapper {
  overflow-x: auto;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.pagination {
  margin-top: 16px;
}

.pagination-inner {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
}

.page-btn {
  padding: 8px 14px;
  border: 1px solid var(--beige-dark);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text);
  font-size: 0.85rem;
  cursor: pointer;
  font-family: var(--font);
  transition: all var(--transition);
}

.page-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.page-btn.active {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

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

.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.form-row .flex-1 {
  flex: 1;
  min-width: 200px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}

.form-textarea {
  resize: vertical;
  font-family: var(--font);
  line-height: 1.5;
}

.inline-add-group {
  display: flex;
  gap: 6px;
}

.inline-add-group .form-input {
  flex: 1;
}

.inline-add-group .btn {
  white-space: nowrap;
  width: auto;
}

.keywords-select-wrapper select[multiple] {
  height: auto;
  min-height: 100px;
}

.keyword-tag {
  display: inline-block;
  background: var(--cream-dark);
  color: var(--brown-dark);
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  margin: 2px;
}

.selected-keywords {
  margin-top: 6px;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.form-actions .btn {
  width: auto;
}

.form-result {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.form-result.success {
  background: #e8f5e9;
  color: #2e7d32;
}

.form-result.error {
  background: #ffebee;
  color: #c62828;
}

.btn-delete {
  background: var(--accent);
  color: var(--white);
}

.btn-delete:hover {
  background: var(--accent-hover);
}

select[multiple].form-input {
  padding: 4px 8px;
}

select[multiple].form-input option {
  padding: 6px 8px;
  border-radius: 4px;
}

select[multiple].form-input option:checked {
  background: var(--accent);
  color: var(--white);
}

@media (max-width: 1024px) {
  .hero-layout {
    grid-template-columns: 1fr;
  }
  .hero-side-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }
  .category-block {
    grid-template-columns: 1fr;
  }
  .category-block-mini {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }
  .admin-sidebar {
    width: 56px;
  }
  .admin-sidebar .admin-nav-item {
    padding: 12px 8px;
    font-size: 0;
    justify-content: center;
    gap: 0;
  }
  .admin-sidebar .admin-nav-item .nav-icon {
    font-size: 1.3rem;
    width: auto;
  }
  .admin-sidebar .admin-nav-divider {
    margin: 4px 8px;
  }
  .admin-content {
    min-width: 0;
  }
  .admin-profile-details { display: none; }
  .admin-profile-info { gap: 0; }
  .admin-profile-avatar { width: 32px; height: 32px; font-size: 0.8rem; }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-title,
  .hero h1 {
    font-size: 30px;
  }

  .hero-subtitle,
  .hero p {
    font-size: 18px;
  }

  .hero-layout {
    grid-template-columns: 1fr;
    margin-bottom: 32px;
  }

  .hero-article-title {
    font-size: 1.3rem;
  }

  .hero-article-overlay {
    padding: 16px 20px 20px;
  }

  .hero-side-item {
    padding: 10px;
  }

  .hero-side-image {
    width: 80px;
    height: 56px;
  }

  .hero-side-grid {
    grid-template-columns: 1fr;
  }

  .category-block {
    grid-template-columns: 1fr;
  }

  .category-block-mini {
    grid-template-columns: 1fr;
  }

  .mini-card-link {
    grid-template-columns: 100px 1fr;
  }

  .articles-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
  }

  .article-main {
    padding: 40px 28px 64px;
  }

  .article-full h1 {
    font-size: clamp(28px, 4.5vw, 42px);
    max-width: 95%;
  }

  .article-content {
    font-size: 20px;
    line-height: 1.85;
  }

  .share-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .share-btn {
    justify-content: center;
  }

  .admin-layout {
    flex-direction: column;
    gap: 0;
  }

  .admin-sidebar {
    width: 100%;
    position: static;
    border-radius: var(--radius);
    margin-bottom: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .admin-sidebar .admin-nav {
    flex-direction: row;
    flex-wrap: nowrap;
    padding: 4px;
    min-width: max-content;
  }

  .admin-sidebar .admin-nav-item {
    font-size: 0.78rem;
    padding: 10px 14px;
    white-space: nowrap;
    border-right: none !important;
    border-bottom: 2px solid transparent;
    width: auto;
    flex-shrink: 0;
  }

  .admin-sidebar .admin-nav-item.active {
    border-right: none !important;
    border-bottom: 2px solid var(--accent);
  }

  .admin-sidebar .admin-nav-divider {
    display: none;
  }

  .admin-content {
    min-width: 0;
  }

  .admin-actions-grid {
    flex-direction: column;
  }

  .admin-table {
    font-size: 0.75rem;
  }

  .admin-table th,
  .admin-table td {
    padding: 6px 8px;
  }

  .admin-table .thumbnail {
    width: 40px;
    height: 28px;
  }

  .admin-actions-cell {
    flex-direction: column;
    gap: 4px;
  }

  .admin-actions-cell .btn-sm {
    font-size: 0.7rem;
    padding: 4px 8px;
    text-align: center;
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .stat-card {
    padding: 14px;
  }

  .stat-value {
    font-size: 1.6rem;
  }

  .stat-label {
    font-size: 0.72rem;
  }

  .modal {
    max-width: 100%;
    margin: 10px;
    max-height: 90vh;
  }

  .modal-body {
    padding: 16px;
  }
  .media-uploader-zone {
    padding: 24px 16px;
  }
  .media-result-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .form-row {
    flex-direction: column;
    gap: 12px;
  }

  .section-header {
    flex-direction: column;
    align-items: stretch;
  }

  .section-header-actions {
    flex-direction: column;
  }

  .section-header-actions .btn {
    width: 100%;
  }

  .inline-add-group {
    flex-direction: column;
  }

  .admin-filters {
    flex-direction: column;
  }

  .admin-filters .form-group {
    min-width: 0;
  }

  .admin-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -20px;
    padding: 0 20px;
  }

  .admin-card {
    padding: 24px 20px;
  }

  #editModal .modal,
  #confirmModal .modal {
    margin: 10px;
    width: auto;
  }

  #editModal .form-row {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 32px 16px 24px;
  }

  .hero-title,
  .hero h1 {
    font-size: 24px;
  }

  .hero-subtitle,
  .hero p {
    font-size: 17px;
  }

  .hero-side-image {
    width: 80px;
    height: 56px;
  }

  .mini-card-link {
    grid-template-columns: 90px 1fr;
    gap: 10px;
  }

  .mini-card-image {
    width: 90px;
    height: 66px;
  }

  .articles-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .article-main {
    padding: 24px 18px 48px;
  }

  .article-full h1 {
    font-size: clamp(24px, 7vw, 36px);
    max-width: 100%;
  }

  .article-content {
    font-size: 19px;
    line-height: 1.8;
  }

  .article-featured-image {
    margin: 0 -18px 36px;
    border-radius: 0;
    width: calc(100% + 36px);
    aspect-ratio: 16 / 9;
  }

  .article-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .share-buttons {
    grid-template-columns: 1fr 1fr;
  }
}

/* ===== Jobs & Tenders Pages ===== */
.jobs-page {
  padding: 32px 0;
}
.jobs-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--text);
  margin-bottom: 8px;
}
/* --- Opportunity Notice (jobs & tenders warning blocks) --- */
.opportunity-notice {
  position: relative;
  margin: 1.5rem 0 2rem;
  padding: 1.35rem 1.5rem 1.35rem 2rem;
  background: transparent;
  border: 1px solid rgba(154, 125, 87, 0.25);
  border-radius: 10px;
  color: #2a211c;
}
.opportunity-notice::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 8px;
  border-radius: 10px 0 0 10px;
  background: #c83a2d;
}
.opportunity-notice h2 {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  line-height: 1.3;
  font-weight: 700;
  color: #2a211c;
  text-transform: uppercase;
}
.opportunity-notice p {
  margin: 0 0 0.7rem;
  font-size: 1rem;
  line-height: 1.6;
  text-align: left;
}
.opportunity-notice p:last-child {
  margin-bottom: 0;
}
.opportunity-notice a {
  color: #c83a2d;
  font-weight: 700;
  text-decoration: none;
}
.opportunity-notice a:hover {
  text-decoration: underline;
}
@media (max-width: 768px) {
  .opportunity-notice {
    padding: 1.1rem 1rem 1.1rem 1.5rem;
    margin: 1rem 0 1.5rem;
  }
  .opportunity-notice::before { width: 6px; }
  .opportunity-notice h2 { font-size: 1rem; }
  .opportunity-notice p { font-size: 0.95rem; line-height: 1.55; }
}

/* --- Opportunity Search Area --- */
.opportunities-search {
  width: 100%;
  margin: 1.5rem 0 2rem;
}
.search-title {
  margin: 0 0 0.85rem;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(1.7rem, 2.3vw, 2.35rem);
  line-height: 1.15;
  font-weight: 700;
  color: #2a211c;
}
.search-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  width: 100%;
}
.search-input {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 1rem;
  border: 1px solid rgba(139, 108, 72, 0.45);
  border-radius: 5px;
  background: transparent;
  color: #2a211c;
  font-size: 1rem;
  outline: none;
  box-sizing: border-box;
}
.search-input:focus {
  border-color: #c7372c;
  box-shadow: 0 0 0 3px rgba(199, 55, 44, 0.10);
}
.search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1rem;
  border: 0;
  border-radius: 5px;
  background: #c7372c;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.search-button:hover {
  background: #a92e25;
}
.search-button:active {
  transform: translateY(1px);
}
.search-button svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}
.status-legend {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(139, 108, 72, 0.4);
  border-radius: 5px;
  background: transparent;
  box-sizing: border-box;
}
.legend-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-width: 0;
  color: #2a211c;
  font-size: 0.95rem;
  white-space: nowrap;
}
.status-arrow {
  position: relative;
  display: inline-block;
  width: 20px;
  height: 11px;
  border-radius: 2px 0 0 2px;
  flex: 0 0 auto;
}
.status-arrow::after {
  content: "";
  position: absolute;
  top: 0;
  right: -7px;
  width: 0;
  height: 0;
  border-top: 5.5px solid transparent;
  border-bottom: 5.5px solid transparent;
  border-left: 7px solid currentColor;
}
.legend-active .status-arrow { color: #32b568; background: #32b568; }
.legend-warning .status-arrow { color: #ed8619; background: #ed8619; }
.legend-expired .status-arrow { color: #ca382d; background: #ca382d; }
.legend-unknown .status-arrow { color: #9ba9aa; background: #9ba9aa; }
.sort-row {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  margin-top: 0.85rem;
}
.sort-select {
  min-width: 270px;
  min-height: 48px;
  padding: 0 2.8rem 0 1rem;
  border: 1px solid rgba(139, 108, 72, 0.45);
  border-radius: 5px;
  background-color: transparent;
  color: #2a211c;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-sizing: border-box;
}
@media (max-width: 1024px) {
  .status-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .legend-item { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .opportunities-search { margin: 1.25rem 0 1.5rem; }
  .search-title { margin-bottom: 0.75rem; font-size: 1.85rem; }
  .search-form { gap: 0.6rem; }
  .search-input, .search-button { min-height: 52px; font-size: 1rem; }
  .status-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem 0.75rem; padding: 1rem; }
  .legend-item { justify-content: flex-start; white-space: normal; line-height: 1.25; }
  .sort-row { justify-content: stretch; }
  .sort-select { width: 100%; min-width: 0; min-height: 52px; }
}
@media (max-width: 380px) {
  .status-legend { grid-template-columns: 1fr; }
}

/* --- Opportunities table responsive wrapper --- */
.opportunities-table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.opportunities-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.job-notice {
  background: var(--cream);
  border: 1px solid var(--beige);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  margin-bottom: 24px;
  font-size: 0.92rem;
  color: var(--text-light);
}
.job-notice a {
  color: var(--accent);
  font-weight: 600;
}
.jobs-toolbar {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.jobs-search-form {
  display: flex;
  gap: 8px;
  flex: 1;
  min-width: 280px;
}
.jobs-sort {
  flex-shrink: 0;
}
.job-legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: var(--claude-surface);
  border: 1px solid var(--claude-border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}
.job-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-light);
}
.job-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.job-status-active { background: #27ae60; color: #27ae60; }
.job-status-urgent { background: #e67e22; color: #e67e22; }
.job-status-expired { background: #c0392b; color: #c0392b; }
.job-status-unknown { background: #95a5a6; color: #95a5a6; }

span.job-status-active,
span.job-status-urgent,
span.job-status-expired,
span.job-status-unknown {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}


.jobs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.jobs-table th {
  text-align: left;
  padding: 12px 14px;
  background: var(--cream-dark);
  color: var(--text-light);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--beige);
}
.jobs-table td {
  padding: 14px;
  border-bottom: 1px solid var(--beige);
  vertical-align: top;
}
.jobs-table tbody tr:hover {
  background: var(--cream);
}
.job-title-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.job-title-cell a {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}
.job-title-cell a:hover {
  color: var(--accent);
}

.deadline-status-icon {
  width: 22px;
  height: 14px;
  flex: 0 0 22px;
  display: inline-block;
  clip-path: polygon(0 20%, 70% 20%, 100% 50%, 70% 80%, 0 80%);
}
.deadline-status-icon.active { background: #53b900; }
.deadline-status-icon.urgent { background: #ff9500; }
.deadline-status-icon.expired { background: #ff1f13; }
.deadline-status-icon.unspecified { background: #a7a7a7; }

/* Job detail page */
.job-detail {
  padding: 32px 0;
}
.job-detail-header {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--beige);
}
.job-detail-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.3;
}
.job-detail-meta {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.job-detail-ref {
  color: var(--text-light);
  font-size: 0.9rem;
}
.job-detail-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
  padding: 20px;
  background: var(--claude-surface);
  border: 1px solid var(--claude-border);
  border-radius: var(--radius-sm);
}
.job-detail-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.job-detail-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
  font-weight: 600;
}
.job-detail-value {
  font-size: 1rem;
  color: var(--text);
  font-weight: 500;
}
.job-detail-description {
  margin-bottom: 28px;
}
.job-detail-description h2 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: 16px;
}
.job-description-content {
  line-height: 1.8;
  color: var(--text);
  font-size: 1rem;
  width: 100%;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* Job/Tender description — document-style vertical image display */
.job-description-content .article-attachment {
  display: block;
  width: 100%;
}

.job-description-content figure.article-media,
.job-description-content figure.article-image {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0 0 1.75rem;
  padding: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  border-bottom: 1px solid rgba(42, 33, 28, 0.08);
  padding-bottom: 1.5rem;
}

.job-description-content figure.article-media:last-child,
.job-description-content figure.article-image:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.job-description-content figure.article-media + figure.article-media,
.job-description-content figure.article-image + figure.article-image,
.job-description-content figure.article-media + figure.article-image,
.job-description-content figure.article-image + figure.article-media {
  margin-top: 1.5rem;
}

.job-description-content figure.article-media img,
.job-description-content figure.article-image img {
  display: block;
  width: 100%;
  max-width: 850px;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
}

.job-description-content img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 0 auto 1.5rem;
  object-fit: contain;
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
}

.job-description-content p:has(> img) {
  display: block;
  width: 100%;
  margin: 0 0 1.5rem;
  text-align: center;
}

.job-description-content a.article-attachment-link,
.job-description-content .article-attachment a {
  display: inline-block;
  margin: 8px 0;
}

@media (max-width: 1024px) {
  .job-description-content {
    max-width: 100%;
  }
  .job-description-content figure.article-media img,
  .job-description-content figure.article-image img {
    width: 100%;
    max-width: 100%;
    height: auto;
  }
}

@media (max-width: 640px) {
  .job-description-content {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
    overflow: visible;
  }
  .job-description-content figure.article-media,
  .job-description-content figure.article-image {
    width: 100%;
    margin-bottom: 1rem;
  }
  .job-description-content figure.article-media img,
  .job-description-content figure.article-image img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0 auto 1rem;
  }
}

.job-detail-file {
  margin-bottom: 20px;
}
.job-detail-source {
  margin-bottom: 28px;
  font-size: 0.9rem;
  color: var(--text-light);
}
.job-detail-source a {
  color: var(--accent);
}
.job-detail-back {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--beige);
}

@media (max-width: 768px) {
  .jobs-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .jobs-search-form {
    min-width: 100%;
  }
  .job-detail-info {
    grid-template-columns: 1fr;
  }
  .job-detail-title {
    font-size: 1.4rem;
  }
  .job-legend {
    gap: 12px;
    font-size: 0.8rem;
  }
  .jobs-table th,
  .jobs-table td {
    padding: 10px 8px;
    font-size: 0.85rem;
  }
  .jobs-table th:nth-child(3),
  .jobs-table td:nth-child(3) {
    display: none;
  }
}

@media (max-width: 480px) {
  .jobs-table th:nth-child(2),
  .jobs-table td:nth-child(2) {
    display: none;
  }
  .jobs-table th:nth-child(4),
  .jobs-table td:nth-child(4) {
    display: none;
  }
}

@media (max-width: 768px) {
  .media-uploader-backdrop {
    padding: 10px;
    align-items: flex-end;
  }
  .media-uploader-modal {
    max-width: 100%;
    max-height: 92vh;
    border-radius: var(--radius) var(--radius) 0 0;
  }
  .media-uploader-body {
    padding: 16px;
  }
  .media-preview-actions,
  .media-result-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .media-preview-actions .btn,
  .media-result-actions .btn {
    width: 100%;
  }
}

/* ==================== AUTH SYSTEM STYLES ==================== */

.admin-profile {
  position: relative;
  cursor: pointer;
  user-select: none;
}

.admin-profile-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-profile-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary, #a67c52);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  overflow: hidden;
  flex-shrink: 0;
}

.admin-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-profile-details {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.admin-profile-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text, #2c1810);
}

.admin-profile-role {
  font-size: 0.72rem;
  color: var(--text-light, #6b5b4e);
}

.admin-profile-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  border: 1px solid var(--border, #d4c4a8);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  min-width: 200px;
  z-index: 1000;
  overflow: hidden;
}

.admin-profile-menu.open {
  display: block;
}

.admin-profile-menu a {
  display: block;
  padding: 10px 16px;
  color: var(--text, #2c1810);
  text-decoration: none;
  font-size: 0.85rem;
  transition: background 0.15s;
}

.admin-profile-menu a:hover {
  background: var(--cream, #fdf8f0);
}

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.status-badge.status-active { background: #d1fae5; color: #065f46; }
.status-badge.status-inactive { background: #fef3c7; color: #92400e; }
.status-badge.status-blocked { background: #fee2e2; color: #991b1b; }

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.admin-toolbar-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border, #d4c4a8);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  z-index: 100;
  max-height: 200px;
  overflow-y: auto;
}

.search-result-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.9rem;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.15s;
}

.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--cream, #fdf8f0); }

.selected-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--cream, #fdf8f0);
  border-radius: 6px;
  font-size: 0.9rem;
  margin-top: 6px;
}

.admin-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.admin-modal {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

.admin-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
}

.admin-modal-header h3 {
  font-size: 1.1rem;
  margin: 0;
}

.admin-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #888;
  padding: 0 4px;
}

.admin-modal-close:hover { color: #333; }

.admin-modal-body {
  padding: 20px;
}

.admin-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 20px;
  border-top: 1px solid #eee;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #444;
  margin-bottom: 5px;
}

.form-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.form-input:focus { border-color: #2563eb; }

.btn-warning { background: #f59e0b; color: #fff; }
.btn-warning:hover { background: #d97706; }
.btn-success { background: #10b981; color: #fff; }
.btn-success:hover { background: #059669; }
.btn-sm { padding: 4px 10px; font-size: 0.8rem; border-radius: 4px; }
.btn-outline { background: transparent; border: 1px solid #ddd; color: #555; }
.btn-outline:hover { background: #f5f5f5; }

.actions-cell {
  white-space: nowrap;
}

/* Admin Profile Avatar */
.admin-profile-avatar {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.admin-profile-avatar-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.admin-profile-avatar-fallback {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brown);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1rem;
}

/* Author Avatar Styles */
.article-author-avatar-fallback,
.article-author-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #8b7355;
  color: #fff;
  font-weight: 600;
  font-size: 0.85em;
  flex-shrink: 0;
}

.article-author-avatar {
  object-fit: cover;
}

.article-author-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Homepage hero article meta */
.hero-article-meta .article-author-meta {
  gap: 4px;
}

/* Card meta author */
.mini-card-meta .article-author-meta,
.article-card-meta .article-author-meta,
.hero-side-meta .article-author-meta {
  gap: 4px;
}

/* Detail page */
.article-full .article-author-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.article-full .article-author-meta .article-author-avatar,
.article-full .article-author-meta .article-author-avatar-fallback {
  width: 46px;
  height: 46px;
  font-size: 1.2em;
}

/* Author photo upload preview in admin */
.author-photo-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--brown);
  margin-bottom: 8px;
}

.author-photo-preview-fallback {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--brown);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.author-photo-upload {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-photo-upload .btn {
  white-space: nowrap;
}

@media (max-width: 768px) {
  .admin-profile-details { display: none; }
  .admin-profile-info { gap: 0; }
  .admin-profile-avatar { width: 32px; height: 32px; font-size: 0.8rem; }
  .admin-toolbar { flex-direction: column; align-items: stretch; }
  .admin-toolbar-filters { flex-direction: column; }
  .admin-toolbar-filters .form-input { max-width: 100% !important; }
  .admin-container { padding: 12px 8px; }
  .admin-layout { gap: 0; }
  .nav-container { padding: 0 12px; gap: 8px; }
  .logo-text { font-size: 0.85rem; }
  .nav-logo { gap: 6px; }
  .nav-logo img { height: 26px !important; }
  .table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

@media (max-width: 480px) {
  .admin-profile-avatar { width: 28px; height: 28px; font-size: 0.7rem; }
  .logo-text { font-size: 0.75rem; }
  .nav-logo img { height: 22px !important; }
  .admin-content { padding: 0; }
  .section-header { flex-direction: column; gap: 8px; }
}
