:root {
  --navy: #052a52;
  --blue-dark: #074590;
  --blue: #00adef;
  --blue-light: #e7f6fd;
  --gray-bg: #f5f7fb;
  --text: #1c2333;
  --text-muted: #5b6478;
  --border: #e1e6f0;
  --white: #ffffff;
  --radius: 10px;
  --shadow: 0 4px 16px rgba(13, 27, 62, 0.08);
  --max-width: 1160px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.55;
}

img { max-width: 100%; display: block; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { color: var(--blue-dark); line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; color: var(--text); }
ul { margin: 0; padding-left: 1.2em; }
li { margin-bottom: .4em; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--blue-dark);
  font-size: 1.05rem;
}

.brand-logo { height: 52px; width: auto; display: block; }

.footer-logo { height: 40px; width: auto; display: block; margin-bottom: 12px; }

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: #fff;
  font-weight: 800;
  font-size: .8rem;
  letter-spacing: .5px;
}

.main-nav {
  display: flex;
  gap: 28px;
}

.main-nav a {
  font-size: .93rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--blue-dark);
  border-bottom-color: var(--blue);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 6px;
  padding: 5px 12px !important;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .3px;
  border-bottom-color: var(--border) !important;
}
.lang-switch:hover { border-color: var(--blue) !important; background: var(--blue-light); }
.lang-current { color: var(--blue-dark); }
.lang-sep { color: var(--border); font-weight: 400; }
.lang-other { color: var(--text-muted); }
.lang-switch:hover .lang-other { color: var(--blue-dark); }

.footer-bottom-links { display: flex; gap: 20px; align-items: center; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--blue-dark); display: block; }

/* ---------- Hero ---------- */

.hero {
  background: linear-gradient(160deg, var(--blue-dark) 0%, var(--navy) 100%);
  color: #fff;
}

.hero-inner {
  padding: 72px 24px 48px;
  text-align: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: .78rem;
  color: #9fb4e8;
  margin-bottom: 14px;
}

.hero h1 {
  color: #fff;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

.hero-keywords {
  color: #cfd9f5;
  font-size: .95rem;
  max-width: 700px;
  margin: 18px auto 0;
}
.hero-keywords .dot { margin: 0 8px; color: #5f78bd; }

.hero-actions {
  margin-top: 32px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .92rem;
  border: 1px solid transparent;
}
.btn-primary { background: var(--white); color: var(--blue-dark); }
.btn-primary:hover { background: var(--blue-light); }
.btn-outline { border-color: rgba(255,255,255,.5); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.1); }

.hero-values {
  border-top: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.12);
}

.hero-values-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  padding: 20px 24px;
}

.hero-value {
  text-align: center;
  font-size: .82rem;
  color: #dbe4fb;
  font-weight: 600;
}

/* ---------- Sections ---------- */

.section { padding: 56px 0; }
.section-alt { background: var(--gray-bg); }

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

.link-more {
  color: var(--blue);
  font-weight: 600;
  font-size: .92rem;
  display: inline-block;
  margin-top: 12px;
}
.link-more:hover { text-decoration: underline; }

.prose { max-width: 780px; }
.about-teaser { max-width: 780px; }

.page-hero {
  background: var(--blue-light);
  padding: 48px 0;
}
.page-hero-intro {
  max-width: 760px;
  color: var(--text-muted);
  font-size: 1.02rem;
}

/* ---------- Cards / grids ---------- */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.cards-grid-3 { grid-template-columns: repeat(3, 1fr); }
.cards-grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.structure-chart-wrap {
  overflow-x: auto;
  display: flex;
  justify-content: center;
}

.structure-chart-img {
  display: block;
  width: 720px;
  max-width: none;
  height: auto;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

@media (max-width: 760px) {
  .structure-chart-wrap { justify-content: flex-start; }
}
.card-compact { padding: 20px; }
.card h3, .card h4 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }

.two-col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.values-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.value-pill {
  background: var(--blue-light);
  color: var(--blue-dark);
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .88rem;
}

/* Services */
.service-block {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 20px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}
.service-block:last-child { border-bottom: none; }
.service-number {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--blue);
  opacity: .5;
}
.service-subtitle {
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 12px;
}
.bullets-columns {
  columns: 2;
  column-gap: 32px;
}

/* Team */
.team-list { display: flex; flex-direction: column; gap: 40px; }
.team-member {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 28px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}
.team-member:last-child { border-bottom: none; padding-bottom: 0; }
.team-member-photo {
  width: 180px;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--blue-light);
}
.team-member-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 800;
  color: var(--blue);
}
.team-member-role { color: var(--blue-dark); font-weight: 600; margin-bottom: 10px; }
.team-member-bio p { margin: 0 0 .9em; color: var(--text-muted); }

@media (max-width: 640px) {
  .team-member { grid-template-columns: 1fr; }
  .team-member-photo { width: 140px; height: 170px; }
}
.bullets-columns li { font-size: .92rem; break-inside: avoid; }

.product-group { margin-bottom: 40px; }
.product-group:last-child { margin-bottom: 0; }
.product-group h3 { margin-bottom: 16px; }

/* ---------- News ---------- */

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.news-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow);
}
.news-card img, .news-card-placeholder { width: 100%; height: 160px; object-fit: cover; }
.news-card-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: #fff; font-weight: 800; letter-spacing: 1px;
}
.news-card-body { padding: 16px; }
.news-date { font-size: .8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }
.news-card h3 { margin-top: 6px; font-size: 1rem; }

.news-list-vertical { display: flex; flex-direction: column; gap: 16px; }
.news-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}
.news-row img, .news-row .news-card-placeholder { width: 220px; height: 140px; object-fit: cover; }
.news-row-body { padding: 16px 16px 16px 0; align-self: center; }
.news-tag {
  display: inline-block;
  background: var(--blue-light);
  color: var(--blue-dark);
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  margin-right: 10px;
  text-transform: uppercase;
}

.news-detail-cover { border-radius: var(--radius); margin-bottom: 24px; max-height: 420px; object-fit: cover; width: 100%; }
.news-detail { line-height: 1.7; }

.empty-state { color: var(--text-muted); padding: 40px 0; text-align: center; }

.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 32px;
}
.pagination a {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-weight: 600;
  font-size: .9rem;
}
.pagination a.active { background: var(--blue-dark); color: #fff; border-color: var(--blue-dark); }

/* ---------- Contacts ---------- */

.contacts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.contact-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow);
}
.contact-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); }
.contact-value { font-size: 1.1rem; font-weight: 700; color: var(--blue-dark); }

/* ---------- CTA band ---------- */

.cta-band { background: var(--blue-dark); color: #fff; }
.cta-inner { text-align: center; }
.cta-inner h2 { color: #fff; }
.cta-inner p { color: #cfd9f5; max-width: 560px; margin-left: auto; margin-right: auto; }
.cta-inner .btn-primary { margin-top: 12px; }

/* ---------- Footer ---------- */

.site-footer { background: var(--navy); color: #b9c4e8; padding: 48px 0 0; }
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
}
.footer-col h4 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 14px; }
.footer-col a { display: block; margin-bottom: 8px; font-size: .9rem; }
.footer-col a:hover { color: #fff; }
.footer-tagline { font-size: .88rem; margin-top: 12px; max-width: 260px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 18px 24px;
  font-size: .8rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 880px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute;
    top: 76px; left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    padding: 12px 24px 20px;
    display: none;
    border-bottom: 1px solid var(--border);
  }
  .main-nav.open { display: flex; }
  .hero-values-grid { grid-template-columns: repeat(2, 1fr); }
  .cards-grid, .cards-grid-2, .cards-grid-3, .two-col, .contacts-grid { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .news-row { grid-template-columns: 1fr; }
  .news-row img, .news-row .news-card-placeholder { width: 100%; }
  .footer-inner { grid-template-columns: 1fr; }
  .bullets-columns { columns: 1; }
  .service-block { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Admin panel
   ========================================================================== */

.admin-body { background: var(--gray-bg); min-height: 100vh; }

.admin-shell { display: flex; min-height: 100vh; }

.admin-nav-toggle { display: none; }

.table-scroll { overflow-x: auto; }

.admin-sidebar {
  width: 240px;
  background: var(--navy);
  color: #c4cee8;
  padding: 24px 0;
  flex-shrink: 0;
}
.admin-sidebar .brand { color: #fff; padding: 0 20px 24px; }
.admin-sidebar nav { display: flex; flex-direction: column; }
.admin-sidebar a {
  padding: 12px 20px;
  font-size: .92rem;
  font-weight: 500;
  border-left: 3px solid transparent;
}
.admin-sidebar a:hover, .admin-sidebar a.active { background: rgba(255,255,255,.06); color: #fff; border-left-color: var(--blue); }
.admin-sidebar form { margin-top: 20px; padding: 0 20px; }
.admin-sidebar button.link-btn {
  background: none; border: none; color: #c4cee8; cursor: pointer; font-size: .85rem; padding: 0;
}
.admin-sidebar button.link-btn:hover { color: #fff; }

.admin-main { flex: 1; padding: 32px 40px; max-width: 980px; }
.admin-main h1 { margin-bottom: 6px; }
.admin-hint { color: var(--text-muted); font-size: .9rem; margin-bottom: 24px; }

.admin-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px;
}

.form-row { margin-bottom: 18px; }
.form-row label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; color: var(--blue-dark); }
.form-row .field-hint { display: block; font-weight: 400; color: var(--text-muted); font-size: .8rem; margin-top: 4px; }
.form-row input[type=text],
.form-row input[type=email],
.form-row input[type=password],
.form-row input[type=date],
.form-row input[type=file],
.form-row textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .93rem;
  font-family: inherit;
}
.form-row textarea { resize: vertical; }
.form-row textarea.mono { font-family: 'SFMono-Regular', Consolas, Menlo, monospace; font-size: .85rem; line-height: 1.5; }
.form-row.checkbox { display: flex; align-items: center; gap: 8px; }
.form-row.checkbox label { margin: 0; }

.form-actions { display: flex; gap: 12px; align-items: center; }
.btn-admin {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: .9rem;
  border: 1px solid var(--blue-dark);
  background: var(--blue-dark);
  color: #fff;
  cursor: pointer;
}
.btn-admin:hover { background: var(--blue); border-color: var(--blue); }
.btn-admin-outline { background: transparent; color: var(--blue-dark); }
.btn-admin-outline:hover { background: var(--blue-light); }
.btn-admin-danger { background: #b02a37; border-color: #b02a37; }
.btn-admin-danger:hover { background: #8f222c; }

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border); font-size: .9rem; }
.admin-table th { color: var(--text-muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .4px; }
.admin-table img.thumb { width: 48px; height: 32px; object-fit: cover; border-radius: 4px; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.badge-published { background: #e3f6e9; color: #1d7a3d; }
.badge-draft { background: #f1f2f5; color: #6b7280; }
.table-actions { display: flex; gap: 10px; }
.table-actions a, .table-actions button { font-size: .85rem; color: var(--blue); background: none; border: none; cursor: pointer; padding: 0; font-family: inherit; }
.table-actions .danger { color: #b02a37; }

.lang-tabs { display: flex; gap: 8px; margin: 18px 0 10px; }
.lang-tabs a {
  padding: 9px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-muted);
}
.lang-tabs a:hover { border-color: var(--blue); color: var(--blue-dark); }
.lang-tabs a.active { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }

.form-section-title {
  font-size: .95rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--blue);
  margin: 0 0 16px;
}

.badge-warn { background: #fdf0e3; color: #a4590f; }

.stat-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 32px; }
.stat-cards-3 { grid-template-columns: repeat(3, 1fr); }
.stat-card .num-warn { color: #a4590f; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.stat-card .num { font-size: 2rem; font-weight: 800; color: var(--blue-dark); }
.stat-card .label { color: var(--text-muted); font-size: .88rem; }

.quick-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.quick-link { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; font-weight: 600; color: var(--blue-dark); }
.quick-link:hover { border-color: var(--blue); }

.login-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--navy); }
.login-card { background: #fff; border-radius: var(--radius); padding: 40px; width: 100%; max-width: 380px; }
.login-card h1 { font-size: 1.3rem; }
.login-error { background: #fde8e8; color: #b02a37; padding: 10px 14px; border-radius: 8px; font-size: .88rem; margin-bottom: 16px; }

.current-image { margin-bottom: 10px; }
.current-image img { width: 160px; border-radius: 8px; border: 1px solid var(--border); }

.ql-editor { min-height: 220px; background: #fff; }

/* ---------- Admin panel responsive ---------- */
/* Placed after the base admin rules above so this override wins the cascade
   at matching viewport widths (equal specificity, later source order). */
@media (max-width: 880px) {
  .admin-nav-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    position: sticky;
    top: 0;
    z-index: 60;
    width: 100%;
    background: var(--navy);
    border: none;
    cursor: pointer;
    padding: 14px 20px;
    color: #fff;
    font-weight: 700;
    font-size: .92rem;
  }
  .admin-nav-toggle .bars { display: flex; flex-direction: column; gap: 5px; }
  .admin-nav-toggle .bars span { width: 22px; height: 2px; background: #fff; display: block; }

  .admin-shell { flex-direction: column; }
  .admin-sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 70;
    transform: translateX(-100%);
    transition: transform .2s ease;
    overflow-y: auto;
  }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { padding: 20px 16px; max-width: 100%; }
  .stat-cards, .stat-cards-3, .quick-links { grid-template-columns: 1fr; }
}
