/* =========================================================
   1. FC Hammelburg – modernes, responsives Layout
   ========================================================= */

:root {
	--green:        #16803c;
	--green-dark:   #0f5f2c;
	--green-darker: #0a4620;
	--green-light:  #e8f5ec;
	--accent:       #f5a623;
	--ink:          #1e2a24;
	--muted:        #5b6b62;
	--bg:           #f4f6f4;
	--card:         #ffffff;
	--border:       #e3ebe5;
	--radius:       12px;
	--shadow:       0 2px 8px rgba(15, 40, 25, .06), 0 8px 24px rgba(15, 40, 25, .06);
	--maxw:         1160px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	padding: 0;
	font-family: "Segoe UI", Tahoma, Verdana, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.6;
	color: var(--ink);
	background: var(--bg);
}

img { max-width: 100%; height: auto; border: 0; }

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dark); text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; color: var(--ink); }
h1 { font-size: 1.9rem; margin: 0 0 .6em; }
h2 { font-size: 1.35rem; margin: 1.4em 0 .5em; }
h3 { font-size: 1.1rem; margin: 1.2em 0 .5em; }

/* =========================================================
   Header + Navigation
   ========================================================= */

.site-header {
	position: sticky;
	top: 0;
	z-index: 200;
	background: linear-gradient(180deg, var(--green) 0%, var(--green-dark) 100%);
	box-shadow: 0 2px 12px rgba(0, 0, 0, .18);
}

.header-inner {
	max-width: var(--maxw);
	margin: 0 auto;
	padding: 0 20px;
	display: flex;
	align-items: center;
	gap: 16px;
	min-height: 68px;
}

.brand {
	display: flex;
	align-items: center;
	gap: 12px;
	color: #fff;
	font-weight: 800;
	font-size: 1.15rem;
	letter-spacing: .3px;
	white-space: nowrap;
	text-decoration: none;
}
.brand:hover { color: #fff; text-decoration: none; }

.brand-badge {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #fff;
	color: var(--green-dark);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 900;
	font-size: .95rem;
	flex: 0 0 auto;
	box-shadow: inset 0 0 0 3px var(--green);
}

.brand img { height: 44px; width: auto; display: block; }

/* Toggle-Button (mobil) */
.nav-toggle {
	margin-left: auto;
	display: none;
	background: rgba(255, 255, 255, .12);
	color: #fff;
	border: 1px solid rgba(255, 255, 255, .35);
	border-radius: 8px;
	font-size: 1.4rem;
	line-height: 1;
	padding: 8px 12px;
	cursor: pointer;
}

/* Hauptnavigation */
.main-nav { margin-left: auto; }

.main-nav > ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 4px;
}

.main-nav li { position: relative; }

.main-nav a {
	display: block;
	color: #fff;
	font-weight: 600;
	font-size: .98rem;
	padding: 10px 16px;
	border-radius: 8px;
	text-decoration: none;
	white-space: nowrap;
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li:hover > a {
	background: rgba(255, 255, 255, .15);
	color: #fff;
	text-decoration: none;
}

.has-drop > a::after {
	content: "▾";
	font-size: .7em;
	margin-left: 6px;
	opacity: .85;
	vertical-align: middle;
}

/* Dropdown */
.drop {
	list-style: none;
	margin: 0;
	padding: 6px;
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	min-width: 210px;
	background: #fff;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity .15s ease, transform .15s ease, visibility .15s;
}
.has-drop:hover > .drop,
.has-drop:focus-within > .drop {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.drop a {
	color: var(--ink);
	font-weight: 500;
	padding: 9px 14px;
	border-radius: 8px;
}
.drop a:hover {
	background: var(--green-light);
	color: var(--green-dark);
	text-decoration: none;
}

/* =========================================================
   Seiten-Layout
   ========================================================= */

.page {
	max-width: var(--maxw);
	margin: 26px auto;
	padding: 0 20px;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 26px;
	align-items: start;
}

.content {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 28px 32px;
	min-width: 0;
}

.content img { border-radius: 8px; }
.content p { margin: 0 0 1em; }
.content hr { border: 0; border-top: 1px solid var(--border); margin: 22px 0; }

/* News-Artikel Kopf */
.content .titel h2 { margin-top: 0; }
.content .titel a { color: var(--ink); }
.content .titel a:hover { color: var(--green); }

/* =========================================================
   Sidebar (Termine + Intern-Login)
   ========================================================= */

.sidebar {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.sidebar .card,
.sidebar > h3 { margin: 0; }

.card {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 18px 20px;
}

.card h3 {
	margin: 0 0 12px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--green-light);
	color: var(--green-dark);
	font-size: 1.05rem;
}
.card h3 + h3 { margin-top: 18px; }

/* Termine-Liste */
#termine {
	list-style: none;
	margin: 0 0 6px;
	padding: 0;
	text-align: left;
	color: var(--ink);
	width: auto;
}
#termine ul { list-style: none; padding: 0; margin: 0; }

.termin1 {
	display: block;
	font-weight: 700;
	font-size: .95rem;
	text-align: left;
	color: var(--green-dark);
	margin-top: 8px;
}

/* Formulare / Login */
.card form { margin: 0; }
.card label { font-size: .85rem; color: var(--muted); font-weight: 600; }

input[type="text"],
input[type="password"],
input[type="email"],
textarea,
select {
	width: 100%;
	padding: 9px 11px;
	margin: 4px 0 10px;
	border: 1px solid var(--border);
	border-radius: 8px;
	font-size: .95rem;
	color: var(--ink);
	background: #fff;
	outline: none;
}
input:focus, textarea:focus, select:focus {
	border-color: var(--green);
	box-shadow: 0 0 0 3px rgba(22, 128, 60, .15);
}

button,
input[type="submit"],
input.button,
.validate {
	display: inline-block;
	background: var(--green);
	color: #fff;
	font-size: .95rem;
	font-weight: 600;
	border: 0;
	border-radius: 8px;
	padding: 10px 18px;
	cursor: pointer;
	transition: background .15s ease;
	height: auto;
	line-height: 1.2;
}
button:hover,
input[type="submit"]:hover,
input.button:hover,
.validate:hover { background: var(--green-dark); }

/* Menü-Listen (Intern-Bereich) */
.menu { list-style: none; margin: 0; padding: 0; }
.menu li { margin: 0; }
.menu a {
	display: block;
	padding: 7px 10px;
	border-radius: 8px;
	color: var(--ink);
	font-weight: 500;
}
.menu a:hover { background: var(--green-light); color: var(--green-dark); text-decoration: none; }
.menu ul { list-style: none; padding-left: 14px; margin: 2px 0; }
.menu h2 { font-size: .9rem; color: var(--muted); margin: 12px 0 2px; text-transform: uppercase; letter-spacing: .4px; }

/* =========================================================
   Tabellen (Spielpläne, Ligatabellen)
   ========================================================= */

.content table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 1em;
}
.content table td,
.content table th {
	padding: 7px 9px;
	border-bottom: 1px solid var(--border);
	text-align: left;
	vertical-align: top;
}
.content table th { background: var(--green-light); color: var(--green-dark); font-weight: 700; }

/* Ligatabellen-Zustände */
.tv          { color: var(--green-dark); font-weight: bold; }
.aufstieg td { background: #d7f5c9; }
.abstieg td  { background: #ffd7d7; }
.Rele td     { background: #ffe6c2; }
.tr_gleich td{ background: #f4f6f4; }

.heimspiel   { color: #c0392b; }
.erg         { text-align: center; font-size: 1.05rem; font-weight: bold; }
.erg_heim    { color: var(--green); font-size: 1.05rem; font-weight: bold; }
.erg_gast    { color: #c0392b; font-size: 1.05rem; font-weight: bold; }

.spielplan_tabelle a        { color: var(--muted); }
.spielplan_tabelle a:hover  { color: var(--accent); }

.right {
	background: #d7f5c9; color: var(--ink);
	text-align: center; line-height: 40px; height: 40px; border-radius: 8px;
}
.false {
	background: #ffd7d7; color: var(--ink);
	text-align: center; line-height: 40px; height: 40px; border-radius: 8px;
}

/* Sponsoren */
.sponsoren { text-align: center; }
.sponsoren img { padding: 10px; }

/* Wrapper, damit breite Tabellen mobil scrollen können */
.content { overflow-x: auto; }

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
	background: var(--green-darker);
	color: rgba(255, 255, 255, .85);
	text-align: center;
	padding: 18px 20px;
	font-size: .88rem;
}
.site-footer a { color: #fff; text-decoration: underline; }
.site-footer a:hover { color: var(--green-light); }

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 900px) {
	.page {
		grid-template-columns: 1fr;
	}
	.sidebar { order: 2; }
}

@media (max-width: 780px) {
	.nav-toggle { display: block; }

	.main-nav {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: var(--green-dark);
		padding: 8px;
		display: none;
		box-shadow: 0 12px 24px rgba(0, 0, 0, .25);
	}
	.main-nav.open { display: block; }

	.main-nav > ul { flex-direction: column; gap: 2px; }

	.main-nav a { padding: 12px 14px; }

	.has-drop > a::after { float: right; }

	/* Dropdowns mobil: statisch ausklappen */
	.drop {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		border: 0;
		background: rgba(255, 255, 255, .06);
		margin: 2px 0 6px 10px;
		padding: 4px;
	}
	.drop a { color: #fff; }
	.drop a:hover { background: rgba(255, 255, 255, .12); color: #fff; }
}

@media (max-width: 560px) {
	.content { padding: 20px 18px; }
	.brand span { font-size: 1rem; }
	h1 { font-size: 1.5rem; }
}

/* =========================================================
   News-Bilder: anklickbar + Modal-Lightbox
   ========================================================= */

.content img.newsbox-thumb {
	cursor: zoom-in;
	transition: filter .15s ease, transform .15s ease;
}
.content img.newsbox-thumb:hover {
	filter: brightness(1.06);
	transform: translateY(-1px);
}

.newsbox {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(8, 18, 12, .84);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
}
.newsbox.is-open { display: flex; }

.newsbox__stage {
	margin: 0;
	max-width: 92vw;
	max-height: 88vh;
	display: flex;
}
.newsbox__img {
	max-width: 92vw;
	max-height: 88vh;
	width: auto;
	height: auto;
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 16px 50px rgba(0, 0, 0, .55);
}

.newsbox__btn {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	font-size: 1.6rem;
	line-height: 1;
	color: #fff;
	background: rgba(255, 255, 255, .14);
	border: 1px solid rgba(255, 255, 255, .35);
	border-radius: 50%;
	cursor: pointer;
	transition: background .15s ease;
}
.newsbox__btn:hover { background: rgba(255, 255, 255, .30); }
.newsbox__close { top: 18px; right: 18px; }
.newsbox__prev  { left: 18px; top: 50%; transform: translateY(-50%); }
.newsbox__next  { right: 18px; top: 50%; transform: translateY(-50%); }
.newsbox--single .newsbox__prev,
.newsbox--single .newsbox__next { display: none; }

@media (max-width: 560px) {
	.newsbox__btn { width: 40px; height: 40px; font-size: 1.3rem; }
	.newsbox__close { top: 10px; right: 10px; }
	.newsbox__prev { left: 8px; }
	.newsbox__next { right: 8px; }
}
