/*
Theme Name: TuS 08 Senne I Hauptverein
Theme URI: https://tus-senne.de
Author: Jonas Bönsch
Description: Offizielles Theme für den TuS 08 Senne I Hauptverein
Version: 1.0
*/

:root {
  --blue-dark: #0a2a66;
  --blue: #1450b8;
  --blue-light: #3b76e0;
  --white: #ffffff;
  --gray: #f4f6fa;
  --gray-text: #4a5568;
  --max-width: 1140px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Segoe UI", Arial, sans-serif;
  color: #1a1a1a;
  background: var(--white);
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

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

/* Header */
header.site-header {
  background: var(--white);
  color: var(--blue-dark);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
  border-bottom: 3px solid var(--blue);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--blue-dark);
  border-radius: 2px;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.5px;
}

.logo .crest-img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--blue-light);
  object-fit: contain;
  padding: 2px;
}

/* WordPress nav menu */
.main-nav ul {
  display: flex;
  gap: 1.8rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  font-weight: 500;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
  color: var(--blue-dark);
}

.main-nav a:hover,
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a {
  border-bottom-color: var(--blue);
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue) 60%, var(--blue-light));
  color: var(--white);
  padding: 5rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 480px;
}

.hero-bg-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 480px;
  height: 480px;
  opacity: 0.08;
  z-index: 0;
  pointer-events: none;
  animation: heroLogoSpin 60s linear infinite;
}

@keyframes heroLogoSpin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.hero > *:not(.hero-bg-logo) {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 2.6rem;
  margin-bottom: 0.8rem;
  letter-spacing: 0.5px;
}

.hero p {
  font-size: 1.15rem;
  max-width: 640px;
  margin: 0 auto 1.8rem;
  color: #dbe6ff;
}

.btn {
  display: inline-block;
  background: var(--white);
  color: var(--blue-dark);
  padding: 0.75rem 1.8rem;
  border-radius: 6px;
  font-weight: 700;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--white);
  color: var(--white);
  margin-left: 0.8rem;
}

/* Sections */
section {
  padding: 4rem 1.5rem;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  color: var(--blue-dark);
  margin-bottom: 0.5rem;
}

.section-sub {
  text-align: center;
  color: var(--gray-text);
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

.bg-gray { background: var(--gray); }

/* Cards */
.grid {
  display: grid;
  gap: 1.8rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--white);
  border-radius: 10px;
  padding: 1.8rem;
  box-shadow: 0 4px 16px rgba(10,42,102,0.08);
  border: 1px solid #e8edf7;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(10,42,102,0.14);
}

.card h3 {
  color: var(--blue-dark);
  margin-bottom: 0.6rem;
  font-size: 1.2rem;
}

.card .tag {
  display: inline-block;
  background: var(--blue-light);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.8rem;
}

/* News list */
.news-item {
  border-left: 4px solid var(--blue);
  padding: 1rem 1.2rem;
  margin-bottom: 1.2rem;
  background: var(--white);
  border-radius: 0 8px 8px 0;
  box-shadow: 0 2px 10px rgba(10,42,102,0.06);
}

.news-date {
  color: var(--blue);
  font-weight: 700;
  font-size: 0.85rem;
  display: block;
  margin-bottom: 0.3rem;
}

.news-item-link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.news-item-link:hover {
  border-left-color: var(--blue-light);
  box-shadow: 0 4px 16px rgba(10,42,102,0.12);
}

.news-read-more {
  display: inline-block;
  margin-top: 0.6rem;
  color: var(--blue);
  font-weight: 700;
  font-size: 0.88rem;
}

.back-link {
  display: inline-block;
  color: var(--blue);
  font-weight: 600;
  margin-bottom: 1.2rem;
  font-size: 0.95rem;
}

.post-content {
  line-height: 1.8;
  font-size: 1.05rem;
  color: #2a2a2a;
}

.post-content p { margin-bottom: 1.2rem; }
.post-content h2 { color: var(--blue-dark); margin: 1.8rem 0 0.6rem; }
.post-content h3 { color: var(--blue-dark); margin: 1.4rem 0 0.4rem; }
.post-content ul, .post-content ol { margin: 0.8rem 0 1.2rem 1.5rem; }
.post-content li { margin-bottom: 0.4rem; }
.post-content img { max-width: 100%; border-radius: 8px; margin: 1rem 0; }

/* Contact form */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

form { display: flex; flex-direction: column; gap: 1rem; }

label { font-weight: 600; font-size: 0.9rem; color: var(--blue-dark); }

input, textarea, select {
  padding: 0.7rem 0.9rem;
  border: 1px solid #d4dbe8;
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
}

input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--blue-light);
  border-color: var(--blue-light);
}

button[type="submit"] {
  background: var(--blue);
  color: var(--white);
  border: none;
  padding: 0.8rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

button[type="submit"]:hover { background: var(--blue-dark); }

.info-block {
  background: var(--gray);
  padding: 1.8rem;
  border-radius: 10px;
}

.info-block h3 {
  color: var(--blue-dark);
  margin-bottom: 0.6rem;
}

.info-block p { margin-bottom: 0.4rem; }

/* Form feedback */
.form-success {
  background: #d4edda;
  color: #155724;
  padding: 1rem 1.2rem;
  border-radius: 6px;
  border: 1px solid #c3e6cb;
  margin-bottom: 1rem;
}

.form-error {
  background: #f8d7da;
  color: #721c24;
  padding: 1rem 1.2rem;
  border-radius: 6px;
  border: 1px solid #f5c6cb;
  margin-bottom: 1rem;
}

/* Footer */
footer {
  background: var(--blue-dark);
  color: #cdd9f5;
  padding: 2.5rem 1.5rem 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: var(--max-width);
  margin: 0 auto 1.5rem;
}

.footer-grid h4 {
  color: var(--white);
  margin-bottom: 0.8rem;
}

.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 0.4rem; }
.footer-grid a { color: #cdd9f5; }
.footer-grid a:hover { color: var(--white); }

.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 1.2rem;
  font-size: 0.85rem;
}

/* Abteilungs-Grid */
.abt-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.abt-tile {
  background: var(--white);
  border: 1px solid #e8edf7;
  border-radius: 14px;
  padding: 1.6rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: 0 2px 12px rgba(10,42,102,0.07);
  transition: transform 0.2s, box-shadow 0.2s;
}

.abt-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(10,42,102,0.13);
}

.abt-tile h3 {
  color: var(--blue-dark);
  font-size: 1.1rem;
  margin: 0;
}

.abt-tile p {
  color: var(--gray-text);
  font-size: 0.87rem;
  flex: 1;
}

.abt-icon {
  font-size: 2rem;
  line-height: 1;
}

.abt-tag-pill {
  display: inline-block;
  background: #eef2ff;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  width: fit-content;
}

.abt-featured {
  border: 2px solid var(--blue-light);
  background: linear-gradient(135deg, #f0f4ff, #ffffff);
}

.abt-featured .abt-tag-pill {
  background: var(--blue-light);
  color: white;
}

.abt-btn {
  display: inline-block;
  margin-top: 0.8rem;
  padding: 0.55rem 1.1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
  width: fit-content;
}

.abt-btn-active {
  background: var(--blue);
  color: var(--white);
  transition: background 0.2s;
}

.abt-btn-active:hover {
  background: var(--blue-dark);
}

.abt-btn-soon {
  background: #f1f3f7;
  color: #9aa3b5;
  cursor: default;
}

/* Abteilung card on homepage */
.abteilung-card { display: flex; flex-direction: column; }
.abteilung-highlight { border: 2px solid var(--blue-light); background: linear-gradient(135deg, #f0f4ff, #fff); }
.abt-link { margin-top: auto; padding-top: 0.8rem; color: var(--blue); font-weight: 700; font-size: 0.9rem; }

/* Responsive */
@media (max-width: 1000px) {
  .abt-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .hero-bg-logo {
    width: 300px;
    height: 300px;
  }
}

@media (max-width: 800px) {
  .grid-3, .grid-2, .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 2rem; }

  /* Mobile Nav */
  .nav-toggle { display: flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--blue-dark);
    border-top: 2px solid var(--blue-light);
    z-index: 200;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 0.5rem 0; }
  .main-nav ul li a { display: block; padding: 0.7rem 1.5rem; border-bottom: 1px solid rgba(255,255,255,0.08); color: var(--white); }
}

@media (max-width: 700px) {
  .abt-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .abt-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

.social-buttons { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.social-btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; border-radius: 6px; font-size: 0.88rem; font-weight: 600; text-decoration: none; color: white; transition: opacity 0.15s; }
.social-btn:hover { opacity: 0.85; }
.social-btn-instagram { background: #C13584; }
.social-btn-facebook { background: #1877F2; }
