/* CLARIN-SK custom Pelican theme */

:root {
  --color-bg: white;
  --color-text: black;
  --color-accent: #149;
  --color-border: #cde;
  --color-menu-bg: #e9ecef;
  --color-menu-hover-bg: #d6dadf;
  --color-menu-text: #222;
  --color-submenu-bg: white;
  --color-submenu-text: #222;
  --max-width: 60rem;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: sans-serif, "Segoe UI", Helvetica, Arial;
  color: var(--color-text);
  background: var(--color-bg);
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

header {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

/* Visually hidden unless focused (e.g. via keyboard Tab) */

.skiplink {
  position: absolute;
  top: -3rem;
  left: 0.5rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--color-accent);
  color: #fff;
  border-radius: 0 0 0.25rem 0.25rem;
  transition: top 0.15s ease-in-out;
}

.skiplink:focus {
  top: 0;
  text-decoration: none;
}

/* --- Dropdown navigation --- */

.main-nav {
  background: var(--color-menu-bg);
}

.nav-row {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.site-logo {
  display: flex;
  align-items: center;
  padding: 0.5rem 1.25rem 0.5rem 0;
}

.site-logo img {
  display: block;
  height: 2.2rem;
  width: auto;
}

.main-nav > .extra-links {
  max-width: var(--max-width);
  margin: 0 auto;
  list-style: none;
  padding: 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
}

.dropdown-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.dropdown-menu > li {
  position: relative;
}

/* Language switcher, pushed to the right end of the nav row */

.lang-switcher {
  list-style: none;
  margin: 0 0 0 auto;
  padding: 0;
  display: flex;
  gap: 0.25rem;
}

.lang-switcher a {
  display: block;
  padding: 0.3rem 0.5rem;
  font-size: 1.3rem;
  line-height: 1;
  border-radius: 0.25rem;
  opacity: 0.6;
}

.lang-switcher a:hover {
  opacity: 1;
  background: var(--color-menu-hover-bg);
  text-decoration: none;
}

.lang-switcher a[aria-current="true"] {
  opacity: 1;
  background: var(--color-menu-hover-bg);
}

/* The four top-level entries, built from <details>/<summary> */

.dropdown-menu summary {
  display: block;
  padding: 0.85rem 1.1rem;
  color: var(--color-menu-text);
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  list-style: none;
}

.dropdown-menu summary::-webkit-details-marker {
  display: none;
}

.dropdown-menu summary::after {
  content: " \25BE"; /* small down-pointing triangle */
  font-size: 0.7em;
  opacity: 0.8;
}

.dropdown-menu summary:hover,
.dropdown-menu details[open] summary {
  background: var(--color-menu-hover-bg);
}

/* A top-level entry that links straight to a page, no dropdown */

.dropdown-menu .top-level-link {
  display: block;
  padding: 0.85rem 1.1rem;
  color: var(--color-menu-text);
  font-weight: 600;
}

.dropdown-menu .top-level-link:hover {
  background: var(--color-menu-hover-bg);
  text-decoration: none;
}

.dropdown-menu details {
  position: relative;
}

.submenu {
  list-style: none;
  margin: 0;
  padding: 0.1rem 0;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 11rem;
  background: var(--color-submenu-bg);
  border: 1px solid var(--color-border);
  border-top: 2px solid var(--color-accent);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
  z-index: 20;
}

.submenu li a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--color-submenu-text);
  white-space: nowrap;
}

.submenu li a:hover {
  background: #eef2fb;
  text-decoration: none;
}

.extra-links {
  margin-left: auto;
  font-size: 0.9rem;
}

.extra-links a {
  display: block;
  padding: 0.85rem 0.9rem;
  color: var(--color-menu-text);
  opacity: 0.85;
}

.extra-links a:hover {
  opacity: 1;
  text-decoration: none;
}

@media (max-width: 40rem) {
  .main-nav > .dropdown-menu,
  .main-nav > .extra-links {
    flex-direction: column;
    padding: 0;
  }

  .submenu {
    position: static;
    border: none;
    box-shadow: none;
    padding-left: 1rem;
  }

  .extra-links {
    margin-left: 0;
  }
}

@media (pointer:coarse) {
  .submenu > li {
    padding-top: 1ex;
    padding-bottom: 1ex;
  }
    ul li {
    padding-top: 1ex;
  }
}

/* --- Main content --- */

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

article header h2 {
  margin-bottom: 0.2rem;
}

footer {
  border-top: 1px solid var(--color-border);
  margin-top: 2rem;
}

footer address {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  color: #666;
  font-size: 0.85rem;
}


