/*
Theme Name:   TOX Corporate
Theme URI:    https://www.tox.de
Author:       TOX-Dübel-Technik GmbH – IT
Description:  Corporate-Theme im TOX-CI (Rot HKS 13 / Anthrazit / Weiß). Startseite mit Hero-Slider, Teaser-Kacheln, Katalog- und Händler-Bereich, Footer mit Kontakt- und Technik-Block. Alle Inhalte über den Customizer pflegbar.
Version:      1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License:      Proprietary – intern
Text Domain:  tox
*/

/* ==========================================================================
   1. Design-Tokens (CI)
   ========================================================================== */
:root {
	--tox-red:        #E2001A;  /* HKS 13 – Primärfarbe */
	--tox-red-dark:   #B80015;
	--tox-anthracite: #3C3C3B;
	--tox-dark:       #232322;
	--tox-grey:       #6F6F6E;
	--tox-grey-light: #F2F2F2;
	--tox-border:     #DADADA;
	--tox-white:      #FFFFFF;

	--tox-font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
	--tox-radius: 3px;
	--tox-max: 1280px;
	--tox-gutter: clamp(16px, 4vw, 40px);
	--tox-shadow: 0 2px 12px rgba(0,0,0,.08);
}

/* ==========================================================================
   2. Basis
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--tox-font);
	font-size: 16px;
	line-height: 1.6;
	color: var(--tox-anthracite);
	background: var(--tox-white);
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--tox-red); text-decoration: none; transition: color .2s; }
a:hover, a:focus { color: var(--tox-red-dark); text-decoration: underline; }
h1, h2, h3, h4, h5, h6 {
	color: var(--tox-dark);
	font-weight: 700;
	line-height: 1.2;
	margin: 0 0 .6em;
}
h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.3rem; }
p  { margin: 0 0 1.2em; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px,1px,1px,1px); white-space: nowrap;
}
.skip-link:focus {
	position: fixed; top: 8px; left: 8px; z-index: 1000; width: auto; height: auto; clip: auto;
	background: var(--tox-red); color: #fff; padding: 10px 16px;
}
.container { max-width: var(--tox-max); margin: 0 auto; padding: 0 var(--tox-gutter); }

/* Section-Headline mit rotem Unterstrich (TOX-typisch) */
.section-title {
	position: relative;
	padding-bottom: .5em;
	margin-bottom: 1.4em;
	text-transform: uppercase;
	letter-spacing: .02em;
}
.section-title::after {
	content: ""; position: absolute; left: 0; bottom: 0;
	width: 60px; height: 4px; background: var(--tox-red);
}
.text-center .section-title::after { left: 50%; transform: translateX(-50%); }
.text-center { text-align: center; }

/* ==========================================================================
   3. Buttons
   ========================================================================== */
.btn, .wp-block-button__link, button, input[type="submit"] {
	display: inline-block;
	font: inherit; font-weight: 700;
	text-transform: uppercase; letter-spacing: .04em; font-size: .9rem;
	padding: .8em 1.6em;
	border: 2px solid var(--tox-red);
	border-radius: var(--tox-radius);
	background: var(--tox-red);
	color: var(--tox-white);
	cursor: pointer;
	transition: background .2s, color .2s, border-color .2s;
}
.btn:hover, .wp-block-button__link:hover, button:hover, input[type="submit"]:hover {
	background: var(--tox-red-dark); border-color: var(--tox-red-dark);
	color: var(--tox-white); text-decoration: none;
}
.btn--outline { background: transparent; color: var(--tox-red); }
.btn--outline:hover { background: var(--tox-red); color: #fff; }
.btn--white { background: #fff; color: var(--tox-red); border-color: #fff; }
.btn--white:hover { background: var(--tox-grey-light); border-color: var(--tox-grey-light); color: var(--tox-red-dark); }

/* ==========================================================================
   4. Header
   ========================================================================== */
.topbar {
	background: var(--tox-anthracite);
	color: #fff; font-size: .82rem;
}
.topbar .container { display: flex; justify-content: flex-end; gap: 1.5rem; padding-top: 6px; padding-bottom: 6px; }
.topbar a { color: #fff; }
.topbar a:hover { color: #fff; opacity: .8; }

.site-header {
	position: sticky; top: 0; z-index: 100;
	background: var(--tox-white);
	border-bottom: 4px solid var(--tox-red);
	box-shadow: var(--tox-shadow);
}
.site-header .container {
	display: flex; align-items: center; justify-content: space-between;
	min-height: 84px; gap: 2rem;
}
.site-branding img, .custom-logo { max-height: 56px; width: auto; }
.site-title { font-size: 1.8rem; font-weight: 800; margin: 0; letter-spacing: .02em; }
.site-title a { color: var(--tox-red); }
.site-title a:hover { text-decoration: none; }

.main-navigation { flex: 1; display: flex; justify-content: flex-end; }
.main-navigation ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; }
.main-navigation li { position: relative; }
.main-navigation a {
	display: block; padding: .9rem 1rem;
	color: var(--tox-dark); font-weight: 600; font-size: .95rem;
	border-bottom: 3px solid transparent;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current-menu-ancestor > a {
	color: var(--tox-red); text-decoration: none; border-bottom-color: var(--tox-red);
}
/* Dropdown */
.main-navigation .sub-menu {
	position: absolute; top: 100%; left: 0; min-width: 260px;
	flex-direction: column; gap: 0;
	background: #fff; border-top: 3px solid var(--tox-red); box-shadow: var(--tox-shadow);
	opacity: 0; visibility: hidden; transform: translateY(6px);
	transition: opacity .2s, transform .2s, visibility .2s;
}
.main-navigation li:hover > .sub-menu,
.main-navigation li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.main-navigation .sub-menu a { border: 0; padding: .65rem 1.1rem; font-weight: 500; }
.main-navigation .sub-menu a:hover { background: var(--tox-grey-light); }

.header-actions { display: flex; align-items: center; gap: .5rem; }
.icon-btn {
	background: none; border: 0; padding: .5rem; color: var(--tox-dark);
	display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { background: none; color: var(--tox-red); }
.icon-btn svg { width: 24px; height: 24px; }
.menu-toggle { display: none; }

.header-search {
	display: none; background: var(--tox-grey-light); padding: 1rem 0;
}
.header-search.is-open { display: block; }

/* Suche */
.search-form { display: flex; max-width: 640px; margin: 0 auto; }
.search-form .search-field {
	flex: 1; font: inherit; padding: .75em 1em;
	border: 1px solid var(--tox-border); border-right: 0;
	border-radius: var(--tox-radius) 0 0 var(--tox-radius);
}
.search-form .search-field:focus { outline: 2px solid var(--tox-red); outline-offset: -2px; }
.search-form .search-submit { border-radius: 0 var(--tox-radius) var(--tox-radius) 0; }

/* ==========================================================================
   5. Hero-Slider
   ========================================================================== */
.hero { position: relative; overflow: hidden; background: var(--tox-dark); }
.hero__slide {
	position: relative; display: none;
	min-height: clamp(360px, 45vw, 560px);
	background-size: cover; background-position: center;
}
.hero__slide.is-active { display: flex; animation: toxFade .6s ease; }
@keyframes toxFade { from { opacity: 0; } to { opacity: 1; } }
.hero__slide::before {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(90deg, rgba(35,35,34,.75) 0%, rgba(35,35,34,.15) 65%, transparent 100%);
}
.hero__content {
	position: relative; z-index: 1; align-self: center;
	max-width: var(--tox-max); width: 100%; margin: 0 auto; padding: 3rem var(--tox-gutter);
	color: #fff;
}
.hero__kicker {
	display: inline-block; background: var(--tox-red); color: #fff;
	padding: .3em .8em; font-weight: 700; text-transform: uppercase; font-size: .85rem; letter-spacing: .05em;
	margin-bottom: 1rem;
}
.hero__title { color: #fff; font-size: clamp(2rem, 5vw, 3.6rem); max-width: 14ch; margin-bottom: 1.5rem; }
.hero__nav {
	position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
	display: flex; gap: .6rem; z-index: 2;
}
.hero__dot {
	width: 14px; height: 14px; padding: 0; border-radius: 50%;
	background: rgba(255,255,255,.5); border: 2px solid #fff;
}
.hero__dot.is-active, .hero__dot:hover { background: var(--tox-red); border-color: var(--tox-red); }
.hero__arrow {
	position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
	width: 48px; height: 48px; padding: 0; border-radius: 0;
	background: rgba(226,0,26,.85); border: 0; color: #fff; font-size: 1.5rem; line-height: 1;
}
.hero__arrow--prev { left: 0; }
.hero__arrow--next { right: 0; }

/* ==========================================================================
   6. Sektionen Startseite
   ========================================================================== */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section--grey { background: var(--tox-grey-light); }
.section--red  { background: var(--tox-red); color: #fff; }
.section--red h2, .section--red h3 { color: #fff; }
.section--red .section-title::after { background: #fff; }

/* Kachel-Grid (Neuheiten / Beiträge) */
.card-grid { display: grid; gap: 1.75rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card {
	background: #fff; border: 1px solid var(--tox-border); border-radius: var(--tox-radius);
	display: flex; flex-direction: column; overflow: hidden;
	transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.12); transform: translateY(-3px); }
.card__media { aspect-ratio: 4/3; background: var(--tox-grey-light); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 1.4rem; flex: 1; display: flex; flex-direction: column; }
.card__kicker { color: var(--tox-grey); font-size: .85rem; margin-bottom: .3rem; }
.card__title { font-size: 1.2rem; margin-bottom: .6rem; }
.card__title a { color: var(--tox-dark); }
.card__title a:hover { color: var(--tox-red); text-decoration: none; }
.card__more { margin-top: auto; font-weight: 700; text-transform: uppercase; font-size: .85rem; }
.card__more::after { content: " ›"; }

/* Zweispaltige Teaser (Katalog / Händlersuche) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem; }
.teaser {
	position: relative; display: flex; flex-direction: column; justify-content: flex-end;
	min-height: 320px; padding: 2rem; color: #fff; border-radius: var(--tox-radius); overflow: hidden;
	background: var(--tox-anthracite) center/cover no-repeat;
}
.teaser::before {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(0deg, rgba(35,35,34,.85) 0%, rgba(35,35,34,.2) 70%);
}
.teaser > * { position: relative; }
.teaser h3 { color: #fff; font-size: 1.6rem; }
.teaser--red { background-color: var(--tox-red); }
.teaser--red::before { background: none; }

/* Banner (Innovationen) */
.banner {
	display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap;
}
.banner p { font-size: 1.3rem; margin: 0; max-width: 40ch; font-weight: 600; }

/* Über uns / Zitat */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.about__image img { border-radius: var(--tox-radius); width: 100%; }
.about blockquote {
	margin: 0 0 1.5rem; padding-left: 1.5rem; border-left: 4px solid var(--tox-red);
	font-size: 1.15rem; font-style: italic; color: var(--tox-anthracite);
}

/* Social */
.social { display: flex; gap: .75rem; justify-content: center; }
.social a {
	width: 44px; height: 44px; border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--tox-anthracite); color: #fff;
}
.social a:hover { background: var(--tox-red); color: #fff; }
.social svg { width: 20px; height: 20px; fill: currentColor; }

/* ==========================================================================
   7. Inhalt (Seiten, Beiträge)
   ========================================================================== */
.page-header {
	background: var(--tox-grey-light); padding: 2.5rem 0; margin-bottom: 3rem;
	border-bottom: 1px solid var(--tox-border);
}
.page-header h1 { margin: 0; }
.breadcrumbs { font-size: .85rem; color: var(--tox-grey); margin-bottom: .5rem; }
.breadcrumbs a { color: var(--tox-grey); }

.content-area { padding-bottom: 4rem; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 3rem; }
.layout--full { grid-template-columns: minmax(0, 1fr); }
.entry-content > * { max-width: 100%; }
.entry-content ul li::marker { color: var(--tox-red); }
.entry-content table { width: 100%; border-collapse: collapse; margin-bottom: 1.5em; }
.entry-content th, .entry-content td { border: 1px solid var(--tox-border); padding: .6em .8em; text-align: left; }
.entry-content th { background: var(--tox-anthracite); color: #fff; }
.entry-content tr:nth-child(even) td { background: var(--tox-grey-light); }
.entry-meta { color: var(--tox-grey); font-size: .9rem; margin-bottom: 1.5rem; }
.post-thumbnail { margin-bottom: 2rem; }
.alignwide { max-width: calc(var(--tox-max) - 2 * var(--tox-gutter)); }
.alignfull { width: 100vw; position: relative; left: 50%; transform: translateX(-50%); max-width: none; }

/* Sidebar / Widgets */
.widget { margin-bottom: 2.5rem; }
.widget-title {
	font-size: 1.05rem; text-transform: uppercase; padding-bottom: .5rem; margin-bottom: 1rem;
	border-bottom: 3px solid var(--tox-red);
}
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { padding: .45rem 0; border-bottom: 1px solid var(--tox-border); }
.widget li a { color: var(--tox-anthracite); }
.widget li a:hover { color: var(--tox-red); }

/* Pagination */
.pagination, .nav-links { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: 2.5rem; }
.page-numbers {
	display: inline-block; min-width: 42px; padding: .5em .8em; text-align: center;
	border: 1px solid var(--tox-border); color: var(--tox-anthracite);
}
.page-numbers.current, .page-numbers:hover { background: var(--tox-red); border-color: var(--tox-red); color: #fff; text-decoration: none; }

/* Formulare */
input[type="text"], input[type="email"], input[type="url"], input[type="tel"],
input[type="search"], input[type="password"], textarea, select {
	font: inherit; width: 100%; padding: .7em .9em;
	border: 1px solid var(--tox-border); border-radius: var(--tox-radius); background: #fff;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--tox-red); outline-offset: -1px; border-color: var(--tox-red); }

/* Kommentare */
.comment-list { list-style: none; padding: 0; }
.comment-body { border-bottom: 1px solid var(--tox-border); padding: 1.2rem 0; }

/* ==========================================================================
   8. Footer
   ========================================================================== */
.site-footer { background: var(--tox-anthracite); color: #d9d9d9; font-size: .93rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: #fff; opacity: .8; }
.footer-newsletter { background: var(--tox-red); color: #fff; padding: 2.2rem 0; }
.footer-newsletter .container { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.footer-newsletter h3 { color: #fff; margin: 0 0 .2rem; }
.footer-newsletter p { margin: 0; }
.footer-widgets { padding: 3.5rem 0 2.5rem; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.5rem; }
.footer-col h4 {
	color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .04em;
	padding-bottom: .6rem; margin-bottom: 1rem; border-bottom: 2px solid var(--tox-red); display: inline-block;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { padding: .25rem 0; }
.footer-col address { font-style: normal; }
.footer-bottom { background: var(--tox-dark); padding: 1.1rem 0; font-size: .82rem; color: #aaa; }
.footer-bottom .container { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.footer-bottom .social { justify-content: flex-end; }
.footer-bottom .social a { width: 36px; height: 36px; background: rgba(255,255,255,.1); }
.footer-bottom .social a:hover { background: var(--tox-red); }

/* Back to top */
.to-top {
	position: fixed; right: 20px; bottom: 20px; z-index: 90;
	width: 46px; height: 46px; padding: 0; border-radius: var(--tox-radius);
	opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; }

/* ==========================================================================
   9. Responsive
   ========================================================================== */
@media (max-width: 1024px) {
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.layout { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
	.menu-toggle { display: inline-flex; }
	.main-navigation {
		position: fixed; inset: 0 0 0 auto; width: min(340px, 85vw);
		background: #fff; box-shadow: -4px 0 20px rgba(0,0,0,.15);
		transform: translateX(100%); transition: transform .3s;
		display: block; padding: 5rem 0 2rem; overflow-y: auto; z-index: 200;
	}
	.main-navigation.is-open { transform: none; }
	.main-navigation ul { flex-direction: column; }
	.main-navigation a { border-bottom: 1px solid var(--tox-border); padding: 1rem 1.5rem; }
	.main-navigation .sub-menu {
		position: static; opacity: 1; visibility: visible; transform: none;
		box-shadow: none; border-top: 0; display: none; background: var(--tox-grey-light);
	}
	.main-navigation li.is-open > .sub-menu { display: flex; }
	.main-navigation .sub-menu a { padding-left: 2.5rem; }
	.nav-close { position: absolute; top: 1rem; right: 1rem; }
	.split, .about { grid-template-columns: 1fr; }
	.hero__arrow { display: none; }
}
@media (min-width: 901px) { .nav-close { display: none; } }
@media (max-width: 600px) {
	.footer-grid { grid-template-columns: 1fr; }
	.topbar { display: none; }
	.site-header .container { min-height: 68px; }
	.site-branding img, .custom-logo { max-height: 42px; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ==========================================================================
   10. Block-Editor-Farbklassen
   ========================================================================== */
.has-tox-red-color { color: var(--tox-red); } .has-tox-red-background-color { background-color: var(--tox-red); }
.has-tox-red-dark-color { color: var(--tox-red-dark); } .has-tox-red-dark-background-color { background-color: var(--tox-red-dark); }
.has-tox-anthracite-color { color: var(--tox-anthracite); } .has-tox-anthracite-background-color { background-color: var(--tox-anthracite); }
.has-tox-grey-color { color: var(--tox-grey); } .has-tox-grey-background-color { background-color: var(--tox-grey); }
.has-tox-grey-light-color { color: var(--tox-grey-light); } .has-tox-grey-light-background-color { background-color: var(--tox-grey-light); }
.has-tox-white-color { color: #fff; } .has-tox-white-background-color { background-color: #fff; }
