/* ============================================================
   OntoNav — color palette
   Sampled from the reference design (header, "Welcome" box,
   Recent Posts link). Adjust these variables to fine-tune the look —
   everything else in this file references them.
   ============================================================ */
:root {
  --color-bg-page: #eaeaea;       /* light gray page background */
  --color-bg-header: #eceeef;     /* header bar background */
  --color-bg-card: #ffffff;       /* white content/sidebar cards */
  --color-text: #2b2b2b;          /* main body text */
  --color-muted: #5a5a5a;         /* secondary text */
  --color-accent: #cc8a2e;        /* amber/orange — logo, links, highlights */
  --color-accent-dark: #3a2712;   /* dark brown — CTA box, buttons, sidebar headings */
  --color-accent-tint: #f4e9d8;   /* light amber tint — subpage bars/backgrounds */
  --color-blue: #96cbd9;          /* sky blue, sampled from OntoNavLogo.jpg */
  --color-blue-dark: #338ba2;     /* darker shade of the logo's blue, for contrast on icons/buttons */
  --color-border: #e0e0e0;

  --max-width: 1120px;
  --radius: 4px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-bg-page);
  line-height: 1.65;
}

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

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

/* ============ Header ============ */
.site-header {
  background: var(--color-bg-header);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.1rem 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.logo-text {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: 0.02em;
}

.logo-img {
  height: 36px;
  width: auto;
  display: block;
}

/* Belt-and-braces: make sure anything marked [hidden] (like the search
   panel before it's opened) truly never renders, at any zoom level. */
[hidden] {
  display: none !important;
}

.main-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
}

.main-nav a {
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.95rem;
}

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

/* Currently-selected menu item — dark brown badge, like the reference design's
   "Welcome to http://ontonav.com" box. Toggled by js/main.js on click. */
.main-nav a.active {
  background: var(--color-accent-dark);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
}

.main-nav a.active:hover {
  color: #fff;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

/* ============ Language switcher (DE / EN flags) ============ */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-flag {
  display: flex;
  padding: 2px;
  line-height: 0;
  border-radius: 3px;
  opacity: 0.5;
  outline: 2px solid transparent;
  outline-offset: 1px;
  transition: opacity 0.15s ease, outline-color 0.15s ease;
}

.lang-flag:hover,
.lang-flag:focus-visible {
  opacity: 0.85;
}

.lang-flag.is-current {
  opacity: 1;
  outline-color: var(--color-accent);
}

.lang-flag svg {
  display: block;
  width: 26px;
  height: auto;
  border-radius: 2px;
}

.search-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text);
  padding: 0.25rem;
  display: flex;
}

.search-panel {
  background: var(--color-accent-dark);
}

.search-panel form {
  display: flex;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
}

.search-panel input[type="search"] {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: none;
  border-radius: var(--radius);
}

.search-panel button {
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 0.5rem 1.25rem;
  cursor: pointer;
}

/* ============ Under construction banner ============ */
.construction-banner {
  width: 100%;
  background: var(--color-accent-dark);
  border-bottom: 4px solid var(--color-accent);
}

.construction-banner p {
  margin: 0 auto;
  padding: 1.15rem 1.5rem;
  max-width: var(--max-width);
  text-align: center;
  color: var(--color-accent-tint);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

/* ============ Hero banner ============ */
.hero-banner {
  width: 100%;
  line-height: 0; /* remove inline-image gap */
  overflow: hidden; /* guarantee nothing from the image can bleed outside this box */
}

.hero-banner img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 420px;
}

/* ============ Main content ============ */
.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  padding: 2.5rem 1.5rem 3.5rem;
  align-items: start;
}

.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
}

.welcome-column h1 {
  margin-top: 0;
  font-size: 1.9rem;
  color: var(--color-text);
}

.architecture-figure {
  margin: 2rem 0 0;
}

.architecture-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

/* ============ Zoomable images / lightbox ============ */
.zoomable-image {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  cursor: zoom-in;
}

.zoomable-image img {
  transition: opacity 0.15s ease;
}

.zoomable-image:hover img,
.zoomable-image:focus-visible img {
  opacity: 0.9;
}

.zoomable-image:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  background: rgba(20, 15, 8, 0.88);
  cursor: zoom-out;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  display: block;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  cursor: default;
}

.lightbox-close {
  position: fixed;
  top: 1rem;
  right: 1.25rem;
  border: none;
  background: none;
  color: #fff;
  font-size: 2.4rem;
  line-height: 1;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  opacity: 0.8;
}

.content-block {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.content-block h2 {
  margin-top: 0;
  font-size: 1.3rem;
}

.button-mailto {
  display: inline-block;
  margin-top: 1rem;
  background: var(--color-accent-dark);
  color: #fff;
  text-decoration: none;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600;
}

.button-mailto:hover {
  background: var(--color-accent);
}

/* ============ About page ============ */
.about-hero {
  text-align: center;
  padding: 3rem 1.5rem 1rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-accent);
  margin: 0 0 0.75rem;
}

.about-hero h1 {
  font-size: 2.3rem;
  margin: 0 0 1rem;
  color: var(--color-text);
}

.about-hero .subtitle {
  color: var(--color-muted);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  padding: 2.5rem 1.5rem 4rem;
}

.team-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.team-photo {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--color-accent-tint);
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-photo svg {
  width: 25%;
  height: 25%;
  color: var(--color-accent);
  opacity: 0.55;
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.team-photo .name-badge {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  background: #fff;
  border-radius: 999px;
  padding: 0.35rem 0.9rem 0.35rem 0.6rem;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.team-photo .name-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
  display: inline-block;
}

.team-number-bar {
  background: var(--color-accent-tint);
  color: var(--color-accent-dark);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.4rem 1.5rem;
}

.team-info {
  padding: 1.25rem 1.5rem 1.75rem;
}

.team-info h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.team-info p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.95rem;
}

/* ============ Products page ============ */
/* Full-width alternating sections — dark, bright, dark, bright — each with
   a two-column media + text layout that flips side each time. */
.product-section {
  padding: 4.5rem 0;
}

.product-section.bright {
  background: #ffffff;
  color: var(--color-text);
}

.product-section.dark {
  background: var(--color-accent-dark);
  color: #ffffff;
}

.product-section.dark h1,
.product-section.dark h2 {
  color: #ffffff;
}

.product-section.dark p {
  color: rgba(255, 255, 255, 0.82);
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.product-grid.media-right .product-media { order: 2; }
.product-grid.media-right .product-text { order: 1; }

.product-media {
  aspect-ratio: 4 / 3;
  border: 2px dashed var(--color-border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-section.dark .product-media {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

.product-media svg {
  width: 35%;
  height: 35%;
  color: var(--color-accent);
  opacity: 0.8;
}

.product-text h1,
.product-text h2 {
  margin-top: 0;
  font-size: 1.9rem;
}

.product-text .eyebrow {
  margin-bottom: 0.5rem;
}

.checklist {
  list-style: none;
  margin: 1.25rem 0;
  padding: 0;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.checklist li svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 0.15rem;
  color: var(--color-accent);
}

.button-outline {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.6rem 1.4rem;
  border: 2px solid var(--color-accent-dark);
  border-radius: var(--radius);
  color: var(--color-accent-dark);
  text-decoration: none;
  font-weight: 600;
}

.button-outline:hover {
  background: var(--color-accent-dark);
  color: #fff;
}

.product-section.dark .button-outline {
  border-color: #fff;
  color: #fff;
}

.product-section.dark .button-outline:hover {
  background: #fff;
  color: var(--color-accent-dark);
}

.text-link {
  display: inline-block;
  margin-left: 1.25rem;
  color: inherit;
  font-weight: 600;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

/* ============ Events page ============ */
.events-header {
  padding: 2.5rem 1.5rem 0;
}

.events-header h1 {
  margin: 0 0 0.5rem;
  font-size: 2rem;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1.5rem 1.5rem 0;
}

.filter-btn {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0.55rem 1.3rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
}

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

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

.events-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  padding: 2rem 1.5rem 4rem;
}

.event-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

a.event-card {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

a.event-card:hover,
a.event-card:focus-visible {
  border-color: var(--color-accent);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.event-card.is-hidden {
  display: none;
}

.event-card.is-past {
  opacity: 0.6;
}

.event-image {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--color-accent-tint);
  display: flex;
  align-items: center;
  justify-content: center;
}

.event-image svg {
  width: 30%;
  height: 30%;
  color: var(--color-accent);
  opacity: 0.7;
}

.event-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 30% center;
  display: block;
}

.event-date-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.15;
}

.event-date-badge .month {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-accent);
}

.event-date-badge .day {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-accent-dark);
}

.past-label {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
}

.event-category-tag {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  background: rgba(58, 39, 18, 0.85);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
}

.event-body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.event-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.event-tag {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.event-tag--type {
  background: var(--color-accent-tint);
  color: var(--color-accent-dark);
}

.event-tag--age {
  background: var(--color-accent-dark);
  color: #fff;
}

.event-body h3 {
  margin: 0 0 0.4rem;
  font-size: 1.2rem;
}

.event-desc {
  margin: 0 0 0.75rem;
  color: var(--color-muted);
  font-size: 0.92rem;
}

.event-location {
  font-weight: 700;
  font-size: 0.9rem;
}

/* ============ Contact page ============ */
.contact-header {
  padding: 2.5rem 1.5rem 0;
}

.contact-header h1 {
  margin: 0 0 0.5rem;
  font-size: 2rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
  padding: 3.5rem 1.5rem 4rem;
  max-width: 760px;
  margin: 0 auto;
}

.contact-card {
  position: relative;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 3rem 1.5rem 2rem;
  text-align: center;
}

.contact-icon-circle {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-blue-dark);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.contact-icon-circle svg {
  width: 28px;
  height: 28px;
}

.contact-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.3rem;
}

.contact-card p {
  margin: 0 0 1rem;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.phone-link {
  display: inline-block;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-accent-dark);
  text-decoration: none;
}

.phone-link:hover {
  color: var(--color-blue-dark);
}

.button-blue {
  display: inline-block;
  background: var(--color-blue-dark);
  color: #fff;
  text-decoration: none;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600;
}

.button-blue:hover {
  background: var(--color-accent-dark);
}

/* ============ Footer ============ */
.site-footer {
  text-align: center;
  color: var(--color-muted);
  font-size: 0.9rem;
  padding: 2rem 0;
}

.footer-links {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
}

/* ============ Impressum page ============ */
.impressum-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.impressum-card h2 {
  font-size: 1.1rem;
  color: var(--color-accent-dark);
  margin: 1.75rem 0 0.5rem;
}

.impressum-card h2:first-child {
  margin-top: 0;
}

.impressum-card p {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}

/* ============ Responsive ============ */
@media (max-width: 760px) {
  .main-nav ul {
    gap: 1rem;
    font-size: 0.9rem;
  }
  .header-actions {
    gap: 0.75rem;
  }
  .lang-flag svg {
    width: 22px;
  }
  .team-grid {
    grid-template-columns: 1fr;
  }
  .product-grid {
    grid-template-columns: 1fr;
  }
  .product-grid.media-right .product-media,
  .product-grid.media-right .product-text {
    order: initial;
  }
  .product-media {
    aspect-ratio: 16 / 9;
  }
  .events-grid {
    grid-template-columns: 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3.5rem;
  }
}
