/**
 * tpl_schule – template.css
 * Basis-Styles, CSS Custom Properties, Typografie, Layout
 * (c) 2025 fiwa-media.de
 */

/* =====================================================
   CSS CUSTOM PROPERTIES
===================================================== */
:root {
  --blue-primary:   #007ab8;
  --blue-secondary: #0f546e;
  --text-color:     #000000;
  --white:          #ffffff;
  --gray-light:     #f4f7fa;
  --gray-mid:       #e2e8ed;
  --gray-dark:      #555555;
  --max-width:      1380px;
  --font-body:      'Lato', sans-serif;
  --font-heading:   'Yanone Kaffeesatz', sans-serif;
  --header-height:  80px;
  --topbar-height:  34px;
  --radius:         6px;
  --transition:     0.22s ease;
  --shadow-sm:      0 2px 8px rgba(0,0,0,0.07);
  --shadow-md:      0 6px 20px rgba(0,0,0,0.11);
  --shadow-lg:      0 12px 36px rgba(0,0,0,0.14);
}

/* =====================================================
   RESET
===================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--white);
  color: var(--text-color);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.2;
  color: var(--text-color);
}

h1 { font-size: clamp(32px, 5vw, 52px); }
h2 { font-size: clamp(26px, 4vw, 42px); }
h3 { font-size: clamp(20px, 3vw, 28px); }
h4 { font-size: 22px; }
h5 { font-size: 18px; }
h6 { font-size: 16px; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--blue-primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--blue-secondary); }

img, video, iframe { max-width: 100%; display: block; }

ul, ol { padding-left: 1.4rem; }

/* =====================================================
   UTILITY CLASSES
===================================================== */
.tpl-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.tpl-btn {
  display: inline-block;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 10px 24px;
  text-align: center;
  text-transform: uppercase;
  transition: background var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
  border: 2px solid transparent;
}

.tpl-btn--primary {
  background: var(--blue-primary);
  color: var(--white);
}
.tpl-btn--primary:hover {
  background: var(--blue-secondary);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.tpl-btn--outline {
  background: transparent;
  border-color: var(--white);
  color: var(--white);
}
.tpl-btn--outline:hover {
  background: var(--white);
  color: var(--blue-primary);
}

.tpl-btn--sm {
  font-size: 13px;
  padding: 5px 14px;
}

/* Section header */
.tpl-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 36px;
}

.tpl-section-title {
  font-family: var(--font-heading);
  font-size: 38px;
  font-weight: 700;
  color: var(--blue-secondary);
  letter-spacing: 0.04em;
}

.tpl-section-title__line {
  display: block;
  width: 50px;
  height: 4px;
  background: var(--blue-primary);
  border-radius: 2px;
  margin-top: 8px;
}

/* =====================================================
   TOPBAR
===================================================== */
.tpl-topbar {
  background: var(--blue-secondary);
  color: var(--white);
  font-size: 13px;
  height: var(--topbar-height);
}

.tpl-topbar__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 12px;
}

.tpl-topbar__left {
  display: flex;
  align-items: center;
  gap: 18px;
  color: rgba(255,255,255,0.85);
}

.tpl-topbar__left a {
  color: rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  gap: 5px;
}
.tpl-topbar__left a:hover { color: var(--white); }

.tpl-topbar__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tpl-topbar__username {
  color: rgba(255,255,255,0.85);
  font-size: 13px;
}

/* mod_login in Topbar */
.tpl-topbar .login-fields {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tpl-topbar input[type="text"],
.tpl-topbar input[type="password"],
.tpl-topbar input[type="email"] {
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 3px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 12px;
  height: 26px;
  padding: 0 8px;
  transition: background var(--transition), border-color var(--transition);
  width: 130px;
}

.tpl-topbar input::placeholder { color: rgba(255,255,255,0.55); }
.tpl-topbar input:focus {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.5);
  outline: none;
}

.tpl-topbar button[type="submit"],
.tpl-topbar input[type="submit"] {
  background: var(--blue-primary);
  border: none;
  border-radius: 3px;
  color: var(--white);
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  height: 26px;
  letter-spacing: 0.05em;
  padding: 0 14px;
  transition: background var(--transition);
}
.tpl-topbar button[type="submit"]:hover,
.tpl-topbar input[type="submit"]:hover {
  background: #0066a0;
}

/* =====================================================
   HEADER
===================================================== */
.tpl-header {
  background: var(--white);
  border-bottom: 3px solid var(--blue-primary);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 500;
}

.tpl-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: 16px;
}

/* LOGO */
.tpl-logo {
  flex-shrink: 0;
  max-height: var(--header-height);
  overflow: hidden;
  display: flex;
  align-items: center;
}

.tpl-logo__link {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  flex-shrink: 0;
  max-height: calc(var(--header-height) - 10px);
}

/* Alle Bilder im Logo-Bereich begrenzen */
.tpl-logo img,
.tpl-logo__img {
  max-height: calc(var(--header-height) - 16px); /* 64px bei 80px Header */
  max-width: 220px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.tpl-logo__placeholder {
  width: 60px;
  height: 60px;
  background: var(--gray-mid);
  border: 2px dashed var(--blue-primary);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-primary);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.tpl-logo__title {
  display: block;
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  color: var(--blue-primary);
  letter-spacing: 0.05em;
  line-height: 1;
}

.tpl-logo__subtitle {
  display: block;
  font-size: 11px;
  color: var(--blue-secondary);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 3px;
}

/* Mobile Toggle */
.tpl-nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--blue-primary);
  border-radius: var(--radius);
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
  padding: 7px 9px;
  flex-shrink: 0;
}

.tpl-nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--blue-primary);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.tpl-nav-toggle.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.tpl-nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.tpl-nav-toggle.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* =====================================================
   MAIN CONTENT (Unterseite)
===================================================== */
.tpl-main {
  padding: 48px 0;
  min-height: 50vh;
}

.tpl-breadcrumb {
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--gray-dark);
}

.tpl-breadcrumb a { color: var(--blue-primary); }
.tpl-breadcrumb a:hover { color: var(--blue-secondary); }

.tpl-content-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
}

.tpl-content-wrap.has-sidebar-left {
  grid-template-columns: 280px 1fr;
}

.tpl-content-wrap.has-sidebar-right {
  grid-template-columns: 1fr 280px;
}

.tpl-content-wrap.has-sidebar-left.has-sidebar-right {
  grid-template-columns: 260px 1fr 260px;
}

/* =====================================================
   RESPONSIVE – Basis
===================================================== */
@media (max-width: 1300px) {
  .tpl-content-wrap.has-sidebar-left,
  .tpl-content-wrap.has-sidebar-right,
  .tpl-content-wrap.has-sidebar-left.has-sidebar-right {
    grid-template-columns: 1fr;
  }
  .tpl-nav-toggle { display: flex !important; }
  .tpl-topbar__left { display: none; }
  .tpl-section-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 600px) {
  .tpl-header__inner { padding: 0 16px; }
  .tpl-container { padding: 0 16px; }
}
