/*
Theme Name: osoTec Nexus
Description: Theme für osotec.ch im Look von nexus-schweiz.ch. Seiten werden bei der Aktivierung automatisch als editierbare WordPress-Seiten angelegt.
Author: osoTec GmbH
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: osotec-nexus
*/

:root {
  --navy: #24293b;
  --red: #9e303d;
  --slate: #516790;
  --line: #dcdfe5;
  --soft: #f4f5f8;
  --text: #24293b;
  --maxw: 1180px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--text); background: #fff; line-height: 1.65; font-size: 17px; }
img { max-width: 100%; height: auto; }
a { color: var(--red); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
h1, h2, h3, h4 { color: var(--navy); line-height: 1.2; font-weight: 700; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.45rem, 2.5vw, 2rem); margin-top: 1.4em; }
h3 { font-size: 1.25rem; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 8px; top: 8px; background: #fff; padding: 8px 12px; z-index: 999; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; min-height: 84px; gap: 24px; }
.site-logo img { display: block; height: 56px; width: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.main-nav li { position: relative; }
.main-nav a { display: block; padding: 10px 14px; color: var(--navy); text-decoration: none; font-weight: 600; font-size: .95rem; border-bottom: 3px solid transparent; }
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current-menu-ancestor > a { color: var(--red); border-bottom-color: var(--red); }
.main-nav .sub-menu { display: none; position: absolute; left: 0; top: 100%; min-width: 220px; flex-direction: column; gap: 0; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--red); box-shadow: 0 12px 28px rgba(36,41,59,.12); padding: 6px 0; }
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { display: flex; }
.main-nav .sub-menu a { border: 0; font-weight: 400; padding: 9px 18px; }
.main-nav .sub-menu a:hover { background: var(--soft); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 4px; padding: 8px 12px; font: inherit; color: var(--navy); cursor: pointer; }

/* Seitenkopf */
.page-hero { background: var(--navy); color: #fff; padding: 56px 0 48px; border-bottom: 5px solid var(--red); }
.page-hero h1 { color: #fff; margin: 0; }
.breadcrumb { font-size: .85rem; margin-bottom: 14px; color: #aeb6c9; }
.breadcrumb a { color: #aeb6c9; text-decoration: none; }
.breadcrumb a:hover { color: #fff; }

/* Inhalt */
.site-main { padding: 48px 0 72px; min-height: 50vh; }
.entry-content > * { max-width: 860px; margin-left: auto; margin-right: auto; }
.entry-content > .alignwide { max-width: var(--maxw); }
.entry-content > .alignfull { max-width: none; }
.entry-content > .wp-block-columns, .entry-content > .wp-block-group { max-width: var(--maxw); }
.entry-content .wp-block-separator { border: 0; border-top: 1px solid var(--line); margin: 28px auto; opacity: 1; }
.entry-content h2:first-child { margin-top: 0; }
body.home .site-main { padding-top: 0; }
body.home .site-main > .container { max-width: none; padding: 0; }
body.home .page-hero { display: none; }
body.home .entry-content > * { padding-left: 24px; padding-right: 24px; }
body.home .entry-content > .wp-block-cover { padding: 0; max-width: none; }
.wp-block-cover.hero-cover { min-height: 520px; margin-bottom: 56px; }
.wp-block-cover.hero-cover h1, .wp-block-cover.hero-cover p { color: #fff; }
.wp-block-cover.hero-cover .wp-block-cover__inner-container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; width: 100%; }
.wp-block-button__link { background: var(--red); border-radius: 3px; font-weight: 600; }
.wp-block-button__link:hover { background: var(--navy); color: #fff; }
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: #fff; border: 2px solid #fff; }
.card { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--red); padding: 28px; height: 100%; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: 0 14px 30px rgba(36,41,59,.12); transform: translateY(-2px); }
.card.blue { border-top-color: var(--slate); }
.wp-block-columns { gap: 32px; }

/* Footer */
.site-footer { background: var(--navy); color: #cfd4e2; padding: 56px 0 24px; font-size: .95rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer h3 { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 6px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 40px; padding-top: 20px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: .85rem; }
.footer-bottom ul { display: flex; gap: 20px; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); max-height: 80vh; overflow: auto; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; padding: 8px 24px 16px; }
  .main-nav a { border: 0; }
  .main-nav .sub-menu { display: flex; position: static; box-shadow: none; border: 0; padding: 0 0 0 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .wp-block-columns { gap: 20px; }
}
