/* Gotic SA. Colours come from the original site: logo blue, link blue
   (#0066ff), hover amber (#ffb000) and the #666 / #ddd greys. */
:root {
  --blue: #0a4db2;
  --blue-dark: #073a87;
  --blue-link: #0066ff;
  --amber: #ffb000;
  --ink: #1f2329;
  --muted: #555b64;
  --grey: #666;
  --line: #dddddd;
  --paper: #ffffff;
  --paper-alt: #f3f4f6;
  --radius: 10px;
  --shadow: 0 1px 2px rgb(0 0 0 / .06), 0 8px 24px rgb(10 77 178 / .08);
  --wrap: 1140px;
  --header-h: 72px;
  --sans: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Verdana, Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  color-scheme: light;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font: 400 1.0625rem/1.6 var(--sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}

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

a { color: var(--blue-link); text-underline-offset: .2em; }
a:hover { color: var(--blue-dark); }

:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; color: var(--blue); }
h3 { font-size: 1.15rem; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--blue); color: #fff; padding: 8px 14px; border-radius: 6px; }
.skip-link:focus { top: 12px; color: #fff; }

/* Insolvency notice. The old site showed it in red under the logo. */
.notice { background: #b3001b; color: #fff; }
.notice p {
  margin-block: 0; padding: 12px 0; text-align: center;
  font-size: 1.05rem; font-weight: 600; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px;
}
.notice strong { font-weight: 800; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(255 255 255 / .94);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; min-height: var(--header-h); gap: 16px; }
.site-nav { margin-left: auto; }
.brand img { height: 44px; width: auto; }

.site-nav ul { list-style: none; display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; }
.site-nav a {
  display: block; padding: 8px 14px; border-radius: 6px;
  font-weight: 600; font-size: .95rem; color: var(--ink); text-decoration: none;
  position: relative;
}
.site-nav a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 3px;
  background: var(--amber); border-radius: 2px; transform: scaleX(0); transition: transform .2s;
}
.site-nav a:hover { color: var(--blue); }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }
.site-nav a[aria-current="page"] { color: var(--blue); }

/* RO | EN switch: links to the same page in the other language */
.lang-switch { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper-alt); }
.lang-switch a {
  min-width: 44px; padding: 6px 12px; border-radius: 999px; text-align: center;
  font-weight: 700; font-size: .85rem; letter-spacing: .06em; color: var(--muted); text-decoration: none;
}
.lang-switch a:hover { color: var(--blue); }
.lang-switch a[aria-current="true"] { background: var(--blue); color: #fff; }

.nav-toggle { display: none; }

@media (max-width: 760px) {
  :root { --header-h: 64px; }
  .brand img { height: 36px; }
  .lang-switch { margin-left: auto; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 8px;
    background: var(--paper); cursor: pointer;
  }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block; width: 20px; height: 2px; background: var(--blue); border-radius: 2px; position: relative; transition: transform .2s, background .2s;
  }
  .nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bars::before { top: -6px; }
  .nav-toggle-bars::after { top: 6px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  /* Hidden only once JS has run, so the menu stays usable without it */
  .js .site-nav:not(.is-open) { display: none; }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: 8px 16px 16px; }
  .site-nav a { padding: 12px 8px; font-size: 1.05rem; }
  .site-nav a::after { left: 8px; right: auto; width: 32px; }
}

/* Page heading */
.page-head { padding: clamp(36px, 6vw, 72px) 0 clamp(8px, 2vw, 16px); }
.eyebrow {
  display: inline-block; margin: 0 0 16px; padding-bottom: 6px;
  font: 700 .8rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--grey);
  border-bottom: 3px solid var(--amber);
}
.page-head h1 { font: 700 clamp(1.9rem, 4.5vw, 3rem)/1.12 var(--serif); letter-spacing: -.01em; max-width: 30ch; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 64ch; margin: 0; }

.section { padding: clamp(24px, 4vw, 40px) 0 clamp(56px, 8vw, 96px); }
.sub-head {
  font: 700 clamp(1.3rem, 2.6vw, 1.6rem)/1.2 var(--serif);
  display: inline-block; padding-bottom: 8px; margin-bottom: 16px;
  /* Echoes the rule under "OTIC" in the logo */
  background: linear-gradient(var(--amber), var(--amber)) left bottom / 48px 4px no-repeat;
}

/* Sarmal announcements */
.docs { margin-bottom: clamp(32px, 5vw, 48px); }
.doc-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.doc-card {
  display: flex; gap: 16px; align-items: flex-start; height: 100%;
  padding: 20px 22px; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: var(--radius);
  background: var(--paper); box-shadow: var(--shadow); color: var(--ink); text-decoration: none;
  transition: border-color .15s, transform .15s;
}
.doc-card:hover { border-left-color: var(--amber); color: var(--ink); transform: translateY(-2px); }
.doc-card strong { display: block; color: var(--blue); font-size: 1.05rem; margin-bottom: 4px; }
.doc-desc { display: block; color: var(--muted); font-size: .95rem; }
.doc-meta { display: inline-block; margin-top: 8px; font-size: .8rem; font-weight: 700; letter-spacing: .06em; color: var(--grey); }
.doc-icon { flex: none; width: 32px; height: 32px; fill: none; stroke: var(--blue); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Slide deck: native scroll-snap carousel, swipeable without JS */
.deck { max-width: 1000px; margin-inline: auto; }
.deck-track {
  list-style: none; margin: 0; padding: 0; display: flex; gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; overscroll-behavior-x: contain;
  border-radius: var(--radius);
}
.deck-track:focus-visible { outline-offset: 4px; }
.deck-slide { flex: 0 0 100%; scroll-snap-align: center; }
.deck-slide a { display: block; border-radius: var(--radius); overflow: hidden; background: var(--paper-alt); box-shadow: var(--shadow); border: 1px solid var(--line); }
.deck-slide img { width: 100%; cursor: zoom-in; }
.deck-controls { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 16px; }
.deck-count { margin: 0; min-width: 5ch; text-align: center; font-weight: 700; color: var(--grey); font-variant-numeric: tabular-nums; }
.deck-btn {
  width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--blue); background: var(--paper);
  color: var(--blue); font-size: 1.8rem; line-height: 1; cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.deck-btn:hover:not(:disabled) { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.deck-btn:disabled { opacity: .35; cursor: default; }
.deck-controls { visibility: hidden; }
.js .deck-controls { visibility: visible; }

/* Gallery */
.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.gallery a { display: block; border-radius: var(--radius); overflow: hidden; background: var(--line); box-shadow: var(--shadow); }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #fff; transition: transform .35s ease, opacity .2s; }
.gallery a:hover img { transform: scale(1.04); }

.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgb(15 18 24 / .94); color: #fff;
}
.lightbox::backdrop { background: rgb(0 0 0 / .6); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox figure { margin: 0; padding: 56px 72px; display: grid; justify-items: center; gap: 12px; }
.lightbox img { max-width: min(100%, 1600px); max-height: calc(100vh - 140px); width: auto; border-radius: 4px; }
.lightbox figcaption { font-size: .95rem; color: #d5d9df; text-align: center; }
.lb-btn {
  position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgb(255 255 255 / .12); color: #fff; font-size: 2rem; line-height: 1;
}
.lb-btn:hover { background: var(--amber); color: var(--ink); }
.lb-close { top: 16px; right: 16px; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
.lightbox[data-single] .lb-prev, .lightbox[data-single] .lb-next { display: none; }
@media (max-width: 600px) {
  .lightbox figure { padding: 64px 12px; }
  .lb-prev, .lb-next { top: auto; bottom: 16px; transform: none; }
}

/* Footer */
.site-footer { background: var(--line); color: #333; font-size: .9rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 20px 0; }
.footer-inner p { margin: 0; }
