/* ==========================================================================
   CSC Telecom – Joomla 6 template "j6csc"
   Written from scratch; the design follows the saved CSC 2026 pages.
   Sections: 1 tokens · 2 base · 3 layout · 4 header & navigation · 5 content
             6 forms & buttons · 7 components · 8 modules · 9 footer
             10 utilities · 11 special pages · 12 print
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
@font-face {
  font-family: "Inter";
  src: url("../fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap; 
}

:root {
  --ink: #0a0a0b;
  --ink-2: #3a3a40;
  --muted: #6b6b73;
  --line: #e8e8e8;
  --line-2: #d9d9d9;
  --bg: #f5f5f5;
  --card: #ffffff;
  --brand: #ff5330;
  --brand-text: #c93a1c;
  --grad: linear-gradient(135deg, #ff3030 0%, #ff5330 100%);
  --grad-btn: linear-gradient(135deg, #dc2f1b 0%, #c73516 100%);
  --ok-bg: #e7f3df;
  --ok-ink: #2e6413;
  --err-bg: #fce1da;
  --err-ink: #a3240f;
  --warn-bg: #fff3d6;
  --warn-ink: #7a5200;
  --info-bg: #e3eefb;
  --info-ink: #174a85;
  --radius: 16px;
  --radius-sm: 8px;
  --radius-btn: 6px;
  --wrap: 1200px;
  --gutter: 24px;
  --header-h: 72px;
  --sticky-top: 0px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Магазин карт ------------------------------------------------------------- */
.csc-cards { color: var(--ink-2); }
.csc-cards__heading { display: flex; justify-content: space-between; align-items: start; gap: 20px; margin-bottom: 24px; }
.csc-cards__heading form { flex: 0 0 auto; }
.csc-cards h2 { color: var(--ink); }
.csc-cards h2::before { content: ""; display: block; width: 40px; height: 4px; margin-bottom: 18px; border-radius: 2px; background: var(--grad); }
.csc-cards__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 20px; }
.csc-cards__product { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.csc-cards__image { display: block; width: 100%; height: auto; border-radius: 10px; }
.csc-cards__product h3 { margin: 0; font-size: 15px; line-height: 1.4; }
.csc-cards__product-details { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.csc-cards__unit { color: var(--muted); font-size: 15px; white-space: nowrap; }
.csc-cards__quantity { display: flex; gap: 4px; align-items: center; }
.csc-cards__quantity button, .csc-cards__remove { display: inline-flex; flex: 0 0 36px; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line-2); border-radius: 50%; background: white; color: var(--ink); cursor: pointer; font-size: 20px; }
.csc-cards__quantity input[type="number"], .csc-cards__table input[type="number"] { width: 58px; min-width: 0; min-height: 36px; padding: 6px; text-align: center; }
.csc-cards__product-total { grid-column: 1 / -1; color: var(--ink); font-size: 20px; }
.csc-cards__product-details .csc-cards__primary { grid-column: 1 / -1; width: 100%; }
.csc-cards .csc-cards__primary, .csc-cards .csc-cards__secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 20px; border: 1px solid transparent; border-radius: var(--radius-btn); font: inherit; font-weight: 600; cursor: pointer; }
.csc-cards .csc-cards__primary { background: var(--grad-btn); color: #fff; }
.csc-cards .csc-cards__primary:hover:not(:disabled) { filter: brightness(.9); }
.csc-cards .csc-cards__primary:disabled { opacity: .5; cursor: not-allowed; }
.csc-cards .csc-cards__secondary { background: #fff; border-color: var(--line-2); color: var(--ink); }
.csc-cards .csc-cards__secondary:hover, .csc-cards__remove:hover { border-color: var(--brand); color: var(--brand-text); }
.csc-cards--checkout { max-width: 900px; }
.csc-cards__table-wrap { width: 100%; overflow-x: auto; }
.csc-cards__table { width: 100%; border-collapse: collapse; text-align: left; }
.csc-cards__table th, .csc-cards__table td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.csc-cards__table th { font-size: 14px; color: var(--muted); }
.csc-cards__table tfoot th, .csc-cards__table tfoot td { color: var(--ink); font-size: 20px; }
.csc-cards__form fieldset { margin: 28px 0; padding: 0; border: 0; }
.csc-cards__form legend, .csc-cards--checkout h3 { margin: 0 0 14px; color: var(--ink); font-size: 20px; font-weight: 600; }
.csc-cards__fields, .csc-cards__summary { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 380px); gap: 12px 20px; align-items: center; }
.csc-cards__fields input, .csc-cards__fields select { width: 100%; }
.csc-cards__invoice { margin-top: 18px; }
.csc-cards__invoice[hidden] { display: none; }
.csc-cards__checkbox { display: inline-flex; gap: 8px; align-items: center; }
.csc-cards__summary { margin-bottom: 28px; }
.csc-cards__summary dt { font-weight: 600; }
.csc-cards__summary dd { margin: 0; overflow-wrap: anywhere; }
.csc-cards__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.csc-cards__errors, .csc-cards__notice { padding: 12px 16px; border-radius: var(--radius-sm); }
.csc-cards__errors { margin-bottom: 20px; background: var(--err-bg); color: var(--err-ink); }
.csc-cards__errors p:last-child { margin-bottom: 0; }
.csc-cards__notice { background: var(--warn-bg); color: var(--warn-ink); }
.csc-cards__sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 600px) {
  .csc-cards__heading { flex-direction: column; }
  .csc-cards__grid { grid-template-columns: 1fr; }
  .csc-cards__fields, .csc-cards__summary { grid-template-columns: 1fr; gap: 6px; }
  .csc-cards__fields input, .csc-cards__fields select, .csc-cards__summary dd { margin-bottom: 10px; }
  .csc-cards__table { min-width: 550px; }
  .csc-cards__actions > button { flex: 1 1 100%; }
}

/* 2. Base ------------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 0.6em;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.header-sticky {
  --sticky-top: var(--header-h);
}

h1 { font-size: clamp(30px, 4vw, 44px); letter-spacing: -0.035em; }
h2 { font-size: clamp(24px, 3vw, 32px); }
h3 { font-size: 20px; }
h4 { font-size: 18px; }
h5,
h6 { font-size: 16px; }

p,
ul,
ol,
dl,
table,
blockquote,
pre,
figure {
  margin: 0 0 1em;
}

strong,
b { font-weight: 600; }

img,
svg,
video {
  max-width: 100%;
  height: auto;
}

iframe { max-width: 100%; border: 0; }

hr {
  height: 1px;
  margin: 24px 0;
  border: 0;
  background: var(--line);
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--brand);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

a:hover,
a:focus {
  color: var(--brand-text);
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

::selection {
  background: rgba(255, 83, 48, 0.25);
}

/* 3. Layout ---------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.site-body {
  flex: 1 0 auto;
  padding: 40px 0 56px;
}

.site-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.has-sidebar .site-layout {
  grid-template-columns: minmax(0, 1fr) 300px;
}

.site-top {
  margin-bottom: 32px;
}

.site-bottom {
  margin-top: 32px;
}

/* The component output is the white card of the page */
.site-main {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 48px);
  color: var(--ink-2);
  overflow: hidden;
  /* clip keeps the rounded corners without creating a scroll container,
     so sticky table headers inside the card keep working */
  overflow: clip;
}

.site-main::after {
  content: "";
  display: table;
  clear: both;
}

.site-content > * + * {
  margin-top: 24px;
}

/* 4. Header & navigation ---------------------------------------------------- */
.site-header {
  position: relative;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
}

.site-header.is-sticky {
  position: sticky;
  top: 0;
  -webkit-backdrop-filter: saturate(1.4) blur(8px);
  backdrop-filter: saturate(1.4) blur(8px);
}

.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 32px;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  height: var(--header-h);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.site-logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  text-decoration: none;
}

.site-logo__img {
  display: block;
  width: auto;
  height: 44px;
  max-width: 220px;
}

.site-nav {
  margin-left: auto;
}

.site-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav .mod-menu {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav .nav-item {
  position: relative;
  display: flex;
  align-items: center;
}

.site-nav .nav-item > a,
.site-nav .nav-item > span,
.site-nav .nav-item > button:not(.mod-menu__toggle-sub) {
  display: flex;
  align-items: center;
  height: var(--header-h);
  padding: 0 14px;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
}

.site-nav .nav-item > a:hover,
.site-nav .nav-item > a:focus {
  color: var(--brand-text);
}

.site-nav .nav-item.current > a,
.site-nav .nav-item.active > a {
  font-weight: 600;
  box-shadow: inset 0 -3px 0 var(--brand);
}

.site-nav .nav-item.active > a img,
.site-nav .nav-item > a img {
  display: none;
}

/* Submenu toggle button rendered by mod_menu */
.mod-menu__toggle-sub {
  display: none;
  width: 32px;
  height: 32px;
  margin-left: -8px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--ink);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.mod-menu__toggle-sub[aria-expanded="true"] .icon-chevron-down {
  transform: rotate(180deg);
}

.site-nav .deeper > .mod-menu__toggle-sub {
  display: inline-flex;
}

/* Dropdown (desktop) */
.site-nav .mod-menu__sub {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 60;
  display: none;
  min-width: 240px;
  margin: 0;
  padding: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 16px 32px rgba(10, 10, 11, 0.1);
}

.site-nav .nav-item:hover > .mod-menu__sub,
.site-nav .nav-item:focus-within > .mod-menu__sub,
.site-nav .nav-item.is-open > .mod-menu__sub {
  display: block;
}

.site-nav .mod-menu__sub .nav-item {
  display: block;
}

.site-nav .mod-menu__sub .nav-item > a,
.site-nav .mod-menu__sub .nav-item > span {
  height: auto;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  box-shadow: none;
  white-space: normal;
}

.site-nav .mod-menu__sub .nav-item > a:hover {
  background: var(--bg);
}

.site-nav .mod-menu__sub .mod-menu__sub {
  position: static;
  display: block;
  min-width: 0;
  padding: 0 0 0 12px;
  border: 0;
  box-shadow: none;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-toggle svg {
  display: block;
  width: 22px;
  height: 22px;
  fill: var(--ink);
}

.nav-toggle__close {
  display: none !important;
}

.is-nav-open .nav-toggle__open {
  display: none !important;
}

.is-nav-open .nav-toggle__close {
  display: block !important;
}

@media (max-width: 860px) {
  :root {
    --gutter: 16px;
    --header-h: 64px;
  }

  .site-header__inner {
    gap: 12px;
  }

  .site-logo__img {
    height: 40px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    margin: 0;
    padding: 8px var(--gutter) 16px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 32px rgba(10, 10, 11, 0.08);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }

  .is-nav-open .site-nav {
    display: block;
  }

  .site-nav .mod-menu {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .site-nav .nav-item {
    flex-wrap: wrap;
  }

  .site-nav .nav-item + .nav-item {
    border-top: 1px solid #ededed;
  }

  .site-nav .nav-item > a,
  .site-nav .nav-item > span {
    flex: 1 1 0;
    height: 52px;
    padding: 0 4px;
    font-size: 16px;
  }

  .site-nav .nav-item.current > a,
  .site-nav .nav-item.active > a {
    padding-left: 14px;
    box-shadow: inset 3px 0 0 var(--brand);
  }

  .site-nav .mod-menu__toggle-sub {
    width: 44px;
    height: 44px;
    margin-left: 0;
  }

  .site-nav .mod-menu__sub,
  .site-nav .nav-item:hover > .mod-menu__sub,
  .site-nav .nav-item:focus-within > .mod-menu__sub {
    position: static;
    display: none;
    width: 100%;
    min-width: 0; 
    padding: 0 0 8px 14px;
    border: 0;
    box-shadow: none;
  }

  .site-nav .nav-item.is-open > .mod-menu__sub {
    display: block;
  }

  .has-sidebar .site-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-body {
    padding: 24px 0 40px;
  }
}

/* 5. Content ---------------------------------------------------------------- */
.page-header {
  margin: 0 0 24px;
}

.page-header h1,
.page-header h2 {
  margin: 0;
}

/* Short gradient rule above the page title */
.page-header::before,
.com-content-article > h1::before,
.item-page > h1::before {
  content: "";
  display: block;
  width: 40px;
  height: 4px;
  margin-bottom: 18px;
  border-radius: 2px;
  background: var(--grad);
}

.site-main > .page-header:first-child h1,
.site-main > .page-header:first-child h2 {
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: -0.035em;
}

.com-content-article__body,
.item-page,
.blog,
.category-list {
  line-height: 1.65;
}

.item-page p,
.item-page li {
  max-width: 72ch;
}

.site-main ul,
.site-main ol {
  padding-left: 1.3em;
}

.site-main li {
  margin-bottom: 6px;
}

.site-main li::marker {
  color: var(--brand);
}

.site-main ul.list-unstyled,
.site-main ul.nav,
.site-main ul.pagination,
.site-main ul.mod-menu {
  padding-left: 0;
}

.site-main img {
  border-radius: 12px;
}

.site-main figure {
  max-width: 100%;
}

.site-main figcaption {
  color: var(--muted);
  font-size: 14px;
}

blockquote {
  margin: 0 0 1em;
  padding: 12px 20px;
  border-left: 4px solid var(--brand);
  background: var(--bg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

code,
kbd,
pre,
samp {
  font-family: ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
  font-size: 0.9em;
}

pre {
  padding: 16px;
  overflow: auto;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

/* Tables */
table,
.table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

th,
td {
  padding: 10px 12px;
  border-top: 1px solid #ededed;
  text-align: left;
  vertical-align: top;
  line-height: 1.4;
}

thead th,
tr:first-child > th {
  border-top: 0;
  background: var(--bg);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: bottom;
}

tbody tr:hover > td {
  background: #fafafa;
}

caption {
  padding: 8px 0;
  color: var(--muted);
  text-align: left;
}

.table-responsive,
.com-content-article__body > table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Joomla article details */
.article-info {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0 0 16px;
  padding: 0;
  color: var(--muted);
  font-size: 14px;
  list-style: none;
}

.article-info dd {
  margin: 0;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.tags a,
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.pagenavigation .pagination {
  justify-content: space-between;
}

.blog-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.blog-item {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.blog-item h2 {
  font-size: 22px;
}

.readmore {
  margin: 0;
}

/* 6. Forms & buttons --------------------------------------------------------- */
label,
legend {
  font-weight: 600;
}

fieldset {
  min-width: 0;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 8px;
  padding: 0;
  color: var(--ink);
  font-size: 18px;
}

input,
select,
textarea,
button {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.4;
  color: var(--ink);
}

.form-control,
.form-select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="search"],
input[type="date"],
select,
textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea,
textarea.form-control {
  min-height: 120px;
  padding: 12px 14px;
}

select,
.form-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 42px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236B6B73'%3E%3Cpath d='M16.939 7.939 12 12.879l-4.939-4.94-2.122 2.122L12 17.121l7.061-7.06z'/%3E%3C/svg%3E") no-repeat right 12px center / 18px 18px;
  cursor: pointer;
}

select[multiple],
select[size]:not([size="1"]) {
  background-image: none;
  padding: 8px 14px;
}

.form-control:focus,
.form-select:focus,
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(255, 83, 48, 0.18);
}

input::placeholder,
textarea::placeholder {
  color: #8a8a92;
}

input:disabled,
select:disabled,
textarea:disabled,
input[readonly] {
  background: var(--bg);
  color: var(--muted);
}

input[type="checkbox"],
input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 0 6px 0 0;
  accent-color: var(--brand);
  vertical-align: middle;
}

input[type="file"] {
  width: 100%;
  padding: 8px 0;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.form-check-input {
  margin: 0;
}

.form-check-label,
.form-check label {
  margin: 0;
  font-weight: 500;
}

.form-control.invalid,
.form-control.is-invalid,
input.invalid,
select.invalid,
textarea.invalid,
.form-control[aria-invalid="true"] {
  border-color: #d9361c;
}

.invalid-feedback,
.form-text,
.form-control-feedback {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.invalid-feedback {
  color: var(--err-ink);
}

.control-group {
  margin-bottom: 16px;
}

.control-label label,
.control-group > label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}

.star,
.required,
span.required {
  color: #d9361c;
}

.btn,
button[type="submit"],
input[type="submit"],
input[type="button"],
a.button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-btn);
  background: var(--grad-btn);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: filter 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}

.btn:hover,
button[type="submit"]:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
a.button:hover,
.button:hover {
  color: #fff;
  filter: brightness(1.06);
  box-shadow: 0 6px 18px rgba(255, 64, 48, 0.28);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled,
.btn.disabled,
.btn[disabled] {
  opacity: 0.55;
  cursor: default;
  box-shadow: none;
  filter: none;
}

.btn-secondary,
.btn-outline-secondary,
.btn-link {
  background: #fff;
  border-color: var(--line-2);
  color: var(--ink);
}

.btn-secondary:hover,
.btn-outline-secondary:hover,
.btn-link:hover {
  color: var(--ink);
  border-color: var(--brand);
  box-shadow: none;
  filter: none;
}

.btn-danger {
  background: #b42a12;
}

.btn-success {
  background: #2e6413;
}

.btn-sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 14px;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-group {
  display: inline-flex;
  gap: 4px;
}

.dropdown-menu {
  display: none;
  position: absolute;
  z-index: 60;
  min-width: 180px;
  margin: 4px 0 0;
  padding: 6px;
  list-style: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 16px 32px rgba(10, 10, 11, 0.1);
}

.dropdown-menu.show {
  display: block;
}

.dropdown-menu a,
.dropdown-item {
  display: block;
  padding: 8px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  text-decoration: none;
  text-align: left;
  width: 100%;
}

.dropdown-menu a:hover,
.dropdown-item:hover {
  background: var(--bg);
}

/* 7. Components ------------------------------------------------------------- */
/* System messages. <joomla-alert> brings its own styles. */
.alert {
  margin: 0 0 20px;
  padding: 14px 18px;
  border: 1px solid transparent;
  border-radius: 12px;
}

.alert-danger,
.alert-error {
  background: var(--err-bg);
  border-color: #f4c3b6;
  color: var(--err-ink);
}

.alert-success {
  background: var(--ok-bg);
  border-color: #c9e3b8;
  color: var(--ok-ink);
}

.alert-warning {
  background: var(--warn-bg);
  border-color: #f0d9a1;
  color: var(--warn-ink);
}

.alert-info {
  background: var(--info-bg);
  border-color: #bcd4f0;
  color: var(--info-ink);
} 

/* Inside <joomla-alert> the .alert-message is a text wrapper, not a message box */
joomla-alert .alert-message,
joomla-alert .alert-wrapper {
  background: transparent;
  border: 0;
  color: inherit;
}

joomla-alert[type="danger"],
joomla-alert[type="error"] {
  background: var(--err-bg);
  border-color: #f4c3b6;
  color: var(--err-ink);
}

joomla-alert[type="success"] {
  background: var(--ok-bg);
  border-color: #c9e3b8;
  color: var(--ok-ink);
}

joomla-alert[type="warning"] {
  background: var(--warn-bg);
  border-color: #f0d9a1;
  color: var(--warn-ink);
}

joomla-alert[type="info"],
joomla-alert[type="message"] {
  background: var(--info-bg);
  border-color: #bcd4f0;
  color: var(--info-ink);
}

joomla-alert {
  margin-bottom: 20px;
  border-radius: 12px;
}

#system-message-container:empty {
  display: none;
}

/* Breadcrumbs */
.mod-breadcrumbs__wrapper {
  margin-bottom: 24px;
}

.mod-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 14px;
  list-style: none;
}

.mod-breadcrumbs li {
  margin: 0;
}

.mod-breadcrumbs__item:not(:last-child)::after {
  content: "/";
  margin-left: 8px;
  color: var(--line-2);
}

.mod-breadcrumbs__divider {
  display: none;
}

/* Pagination */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 24px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.pagination li {
  margin: 0;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  background: #fff;
  text-decoration: none;
}

.page-item.active .page-link {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.page-item.disabled .page-link {
  color: var(--muted);
  pointer-events: none;
}

/* Login and user forms */
.com-users-login,
.com-users-registration,
.com-users-reset,
.com-users-remind,
.com-users-profile__edit,
.mod-login {
  max-width: 520px;
}

.com-users-login__options,
.mod-login__options {
  margin: 20px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid #ededed;
  list-style: none;
  font-size: 14px;
}

.com-users-login__options li {
  margin-bottom: 6px;
}

.com-users-login__submit .btn,
.mod-login__submit .btn {
  width: 100%;
}

.password-group,
.input-password-toggle {
  position: relative;
  display: flex;
  gap: 4px;
}

/* Cards (core views) */
.card {
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.card-header,
.card-body,
.card-footer {
  padding: 16px 20px;
}

.card-header {
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}

/* Frontend edit icons */
.icons {
  float: right;
  margin-left: 12px;
}

.icons .btn {
  min-height: 32px;
  padding: 0 10px;
}

/* 7b. Article data tables (tariffs) --------------------------------------------
   Editor content arrives with inline styles (width: 700px, black 1px borders,
   align="center", a bold first row of <td> instead of <thead>), so the rules
   below use !important where they have to beat inline styles.             */
.com-content-article__body table {
  width: 100% !important;
  max-width: 100%;
  margin: 8px 0 12px;
  border: 1px solid var(--line) !important;
  border-collapse: separate !important;
  border-spacing: 0;
  border-radius: 12px;
  font-size: 15px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.com-content-article__body table td,
.com-content-article__body table th {
  padding: 9px 14px !important;
  border: 0 !important;
  border-top: 1px solid #ededed !important;
  background: #fff;
  line-height: 1.35;
  vertical-align: middle;
  text-align: start;
}

/* Keep the author's centring for everything except the first column */
.com-content-article__body table td[align="center"],
.com-content-article__body table th[align="center"] {
  text-align: center;
}

.com-content-article__body table td:first-child,
.com-content-article__body table th:first-child {
  text-align: start;
  font-weight: 500;
}

/* Header row: a real <thead>, <th> cells, or the first row of a table without them */
.com-content-article__body table thead > tr > *,
.com-content-article__body table th,
.com-content-article__body table:not(:has(thead, th)) > tbody > tr:first-child > td {
  position: sticky;
  top: var(--sticky-top);
  z-index: 2;
  border-top: 0 !important;
  border-bottom: 1px solid var(--line-2) !important;
  background: var(--bg);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  vertical-align: bottom;
}

.com-content-article__body table thead > tr > :first-child,
.com-content-article__body table th:first-child {
  font-weight: 600;
}

/* Zebra rows and hover; the header row is excluded */
.com-content-article__body table tbody tr:nth-child(even) > td {
  background: #fafafa;
}

.com-content-article__body table:has(thead) tbody tr:hover > td,
.com-content-article__body table:not(:has(thead)) tbody tr:not(:first-child):hover > td {
  background: #fff1ed;
}

/* Six-column rate tables: a thin divider between the "fixed" and "mobile" pairs */
.com-content-article__body table :is(td, th):nth-child(3):nth-last-child(4),
.com-content-article__body table :is(td, th):nth-child(5):nth-last-child(2) {
  border-left: 1px solid var(--line) !important;
}

/* Rounded corners of the first and last rows (cells cannot be clipped by the table) */
.com-content-article__body table tr:first-child > :first-child { border-top-left-radius: 11px; }
.com-content-article__body table tr:first-child > :last-child { border-top-right-radius: 11px; }
.com-content-article__body table tr:last-child > :first-child { border-bottom-left-radius: 11px; }
.com-content-article__body table tr:last-child > :last-child { border-bottom-right-radius: 11px; }

/* Table titles written as a bare <strong> or <p><strong> right before the table */
.com-content-article__body > strong,
.com-content-article__body > p:has(+ table) {
  display: block;
  margin: 32px 0 12px;
}

.com-content-article__body > strong,
.com-content-article__body > p:has(+ table) > strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Empty <br> spacers at the start of the article */
.com-content-article__body > br:first-child,
.com-content-article__body > br:first-child + br,
.com-content-article__body > br:first-child + br + br,
.com-content-article__body > br:first-child + br + br + br {
  display: none;
}

/* Small print after the table: the editor's inline 10pt / black spans are normalised */
.com-content-article__body table ~ p {
  max-width: none;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.com-content-article__body table ~ p span {
  color: inherit !important;
  font-size: inherit !important;
}

/* The red bold "all prices include VAT" line becomes a notice */
.com-content-article__body table ~ p:has(> b[style*="255, 0, 0"]),
.com-content-article__body table ~ p:has(> b[style*="#ff0000" i]) {
  margin: 16px 0;
  padding: 12px 16px;
  border-left: 4px solid var(--brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--warn-bg);
  color: var(--ink);
  font-size: 15px;
}

.com-content-article__body table ~ p > b[style] {
  color: var(--ink) !important;
  font-weight: 600;
}

@media (max-width: 680px) {
  /* Wide tables scroll sideways; the country column stays in view */
  .com-content-article__body table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .com-content-article__body table td,
  .com-content-article__body table th {
    min-width: 92px;
    padding: 8px 10px !important;
    font-size: 14px;
  }

  .com-content-article__body table td:first-child,
  .com-content-article__body table th:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    min-width: 128px;
    box-shadow: 1px 0 0 var(--line);
  }

  .com-content-article__body table thead > tr > :first-child,
  .com-content-article__body table th:first-child,
  .com-content-article__body table:not(:has(thead, th)) > tbody > tr:first-child > td:first-child {
    z-index: 3;
  }
}

/* 8. Modules ---------------------------------------------------------------- */
.moduletable {
  margin: 0 0 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.moduletable > h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.moduletable > *:last-child {
  margin-bottom: 0;
}

.site-top .moduletable,
.site-bottom .moduletable {
  margin-bottom: 0;
}

/* Menu modules placed in content positions render as link tiles */
.site-content .moduletable ul.mod-menu,
.site-bottom .moduletable ul.mod-menu {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-content .moduletable ul.mod-menu li,
.site-bottom .moduletable ul.mod-menu li {
  margin: 0;
}

.site-content .moduletable ul.mod-menu a,
.site-bottom .moduletable ul.mod-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  height: 100%;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.site-content .moduletable ul.mod-menu a:hover,
.site-bottom .moduletable ul.mod-menu a:hover {
  border-color: var(--brand);
  box-shadow: 0 6px 20px rgba(10, 10, 11, 0.06);
  color: var(--ink);
}

.site-content .moduletable ul.mod-menu .current > a,
.site-bottom .moduletable ul.mod-menu .current > a {
  border-color: var(--ink);
  box-shadow: inset 4px 0 0 var(--brand);
}

.site-content .moduletable ul.mod-menu img,
.site-bottom .moduletable ul.mod-menu img {
  width: 64px;
  height: auto;
  border-radius: 6px;
}

.site-sidebar .moduletable ul {
  padding-left: 0;
  list-style: none;
}

/* 9. Footer ------------------------------------------------------------------ */
.site-footer {
  flex-shrink: 0;
  background: var(--ink);
  color: #b5b5b5;
  font-size: 13px;
  line-height: 1.6;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "logo menu"
    "logo text";
  gap: 6px 24px;
  align-items: center;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 40px var(--gutter) 44px;
}

.site-footer__logo {
  grid-area: logo;
  display: inline-flex;
}

.site-footer__logo img {
  display: block;
  width: 48px;
  height: 48px;
}

.site-footer__menu {
  grid-area: menu;
}

.site-footer__text {
  grid-area: text;
}

.site-footer__text p {
  margin: 0;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li {
  margin: 0;
  font-size: 14px;
}

.site-footer a {
  color: #fff;
  font-weight: 500;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: var(--brand);
}

@media (max-width: 860px) {
  .site-footer__inner {
    grid-template-columns: 1fr;
    grid-template-areas:
      "logo"
      "menu"
      "text";
    gap: 16px;
    padding: 32px var(--gutter) 36px;
  }
}

@media (max-width: 600px) {
  .site-main {
    padding: 22px 18px;
    border-radius: 14px;
  }

  .site-main img[style*="float"],
  .site-main .float-start,
  .site-main .float-end,
  .site-main img.pull-left,
  .site-main img.pull-right {
    float: none !important;
    display: block;
    max-width: 260px;
    margin: 0 0 20px !important;
  }

  .site-main table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* 10. Utilities --------------------------------------------------------------- */
.visually-hidden,
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.d-none { display: none !important; }
.float-start,
.pull-left { float: left; margin: 0 24px 16px 0; }
.float-end,
.pull-right { float: right; margin: 0 0 16px 24px; }
.text-center { text-align: center; }
.text-end { text-align: right; }
.text-muted { color: var(--muted); }
.small,
small { font-size: 0.875em; }
.list-unstyled { margin: 0; padding: 0; list-style: none; }
.clearfix::after { content: ""; display: table; clear: both; }
.w-100 { width: 100%; }

[dir="rtl"] .float-start,
[dir="rtl"] .pull-left { float: right; margin: 0 0 16px 24px; }
[dir="rtl"] .float-end,
[dir="rtl"] .pull-right { float: left; margin: 0 24px 16px 0; }

/* 11. Special pages ------------------------------------------------------------- */
.offline {
  display: flex;
  flex: 1 0 auto;
  align-items: center;
  justify-content: center;
  padding: 24px var(--gutter);
}

.offline__card {
  width: 100%;
  max-width: 440px;
  padding: 40px 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  text-align: center;
}

.offline__logo {
  display: inline-block;
  margin-bottom: 16px;
}

.offline__card h1 {
  font-size: 28px;
}

.offline__form {
  margin-top: 24px;
  text-align: left;
}

.offline__form .btn + .btn,
.offline__form .btn {
  margin-top: 8px;
}

.contentpane {
  padding: var(--gutter);
  background: #fff;
}

.error-site .site-body {
  padding-top: 40px;
}

/* 12. Print ----------------------------------------------------------------------- */
@media print {
  body {
    background: none;
  }

  .site-header,
  .site-sidebar,
  .site-footer,
  .site-bottom,
  .site-top,
  .mod-breadcrumbs__wrapper {
    display: none !important;
  }

  .site-main {
    padding: 0;
    border: 0;
  }

  .com-content-article__body table :is(td, th) {
    position: static !important;
  }
}
