/*
Theme Name: NetExec Theme
Theme URI: https://netexec.de/
Author: NetExec Editorial
Description: Custom theme for netexec.de — Windows IT tools and network administration editorial
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: netexec
Tags: custom-menu, featured-images, translation-ready
*/

/* Design tokens */
:root {
  --clr-primary: #6b5b8e;
  --clr-accent:  #4a9e8f;
  --clr-bg:      #f7f6fb;
  --clr-surface: #ffffff;
  --clr-text:    #1e1a2e;
  --clr-muted:   #6b6880;
  --clr-border:  #e2dff0;
  --ff-head: 'Syne', sans-serif;
  --ff-body: 'Instrument Sans', sans-serif;
  --max-w: 1140px;
}

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

body {
  font-family: var(--ff-body);
  background: var(--clr-bg);
  color: var(--clr-text);
  font-size: 1rem;
  line-height: 1.65;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--clr-primary); }
a:hover { color: var(--clr-accent); }

/* === HEADER === */
.site-header {
  background: var(--clr-primary);
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}
.site-logo {
  font-family: var(--ff-head);
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.site-logo:hover { color: var(--clr-accent); }
.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--clr-accent);
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
  font-family: var(--ff-head);
  flex-shrink: 0;
}
.site-nav { display: flex; gap: 0; list-style: none; }
.site-nav a {
  display: block;
  padding: .4rem 1rem;
  color: rgba(255,255,255,.85);
  text-decoration: none;
  font-size: .875rem;
  font-family: var(--ff-head);
  font-weight: 600;
  letter-spacing: .01em;
  transition: color .15s;
}
.site-nav a:hover,
.site-nav .current-menu-item a { color: var(--clr-accent); }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  padding: .25rem;
}

/* === HUB HERO (homepage strip) === */
.hub-hero {
  background: var(--clr-primary);
  border-bottom: 3px solid var(--clr-accent);
  padding: 2.5rem 1.5rem 2rem;
}
.hub-hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.hub-hero h1 {
  font-family: var(--ff-head);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: #fff;
  font-weight: 700;
  line-height: 1.2;
  max-width: 620px;
}
.hub-hero p {
  color: rgba(255,255,255,.78);
  margin-top: .65rem;
  font-size: 1rem;
  max-width: 540px;
}

/* === PAGE HERO (inner pages) === */
.page-hero {
  background: var(--clr-primary);
  border-bottom: 3px solid var(--clr-accent);
  padding: 1.75rem 1.5rem;
}
.page-hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.page-hero .cat-tag {
  display: inline-block;
  background: var(--clr-accent);
  color: #fff;
  padding: .2rem .6rem;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-family: var(--ff-head);
  margin-bottom: .6rem;
}
.page-hero h1 {
  font-family: var(--ff-head);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  color: #fff;
  font-weight: 700;
  line-height: 1.2;
  max-width: 640px;
}
.page-hero .post-meta-bar {
  margin-top: .5rem;
  font-size: .8rem;
  color: rgba(255,255,255,.65);
  display: flex;
  gap: 1rem;
}

/* === MAIN LAYOUT === */
.site-main {
  max-width: var(--max-w);
  margin: 2rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
  align-items: start;
}
.site-main.no-sidebar {
  grid-template-columns: 1fr;
  max-width: 840px;
}

/* === ARTICLE LIST === */
.article-list { display: flex; flex-direction: column; gap: 0; }

.article-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--clr-border);
  text-decoration: none;
  color: inherit;
}
.article-item:last-child { border-bottom: none; }

.article-thumb {
  aspect-ratio: 4/3;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--clr-border);
}
.article-thumb img { width: 100%; height: 100%; object-fit: cover; }

.article-meta { display: flex; flex-direction: column; gap: .3rem; }
.article-cat {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--clr-accent);
  font-family: var(--ff-head);
}
.article-title {
  font-family: var(--ff-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--clr-text);
  line-height: 1.3;
}
.article-item:hover .article-title { color: var(--clr-primary); }
.article-excerpt {
  font-size: .875rem;
  color: var(--clr-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-date { font-size: .75rem; color: var(--clr-muted); }

/* === SIDEBAR === */
.sidebar { display: flex; flex-direction: column; gap: 1.5rem; }

.widget {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-top: 3px solid var(--clr-primary);
  padding: 1.25rem;
}
.widget-title {
  font-family: var(--ff-head);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--clr-muted);
  margin-bottom: .75rem;
}
.widget-links { list-style: none; }
.widget-links li { border-bottom: 1px solid var(--clr-border); }
.widget-links li:last-child { border-bottom: none; }
.widget-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .5rem 0;
  font-size: .875rem;
  color: var(--clr-text);
  text-decoration: none;
}
.widget-links a:hover { color: var(--clr-primary); }
.widget-links .badge {
  background: var(--clr-bg);
  border: 1px solid var(--clr-border);
  color: var(--clr-muted);
  font-size: .7rem;
  padding: .1rem .4rem;
  font-family: var(--ff-head);
}

/* === ARTICLE BODY === */
.article-body {
  max-width: 740px;
}
.feat-img {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  margin-bottom: 1.75rem;
  background: var(--clr-border);
}
.feat-img img { width: 100%; height: 100%; object-fit: cover; }

.article-body h2 {
  font-family: var(--ff-head);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 1.75rem 0 .65rem;
  padding-left: .75rem;
  border-left: 3px solid var(--clr-accent);
  line-height: 1.3;
}
.article-body h3 {
  font-family: var(--ff-head);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.35rem 0 .45rem;
}
.article-body h4 {
  font-family: var(--ff-head);
  font-size: .95rem;
  font-weight: 600;
  margin: 1rem 0 .35rem;
}
.article-body p { margin-bottom: 1rem; }
.article-body ul, .article-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.article-body li { margin-bottom: .35rem; }
.article-body code {
  font-family: 'Courier New', monospace;
  background: #ede9f7;
  padding: .1rem .35rem;
  font-size: .85em;
  color: var(--clr-primary);
}
.article-body pre {
  background: var(--clr-text);
  color: #c5bfe8;
  padding: 1.25rem;
  overflow-x: auto;
  font-size: .85rem;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}
.article-body pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: inherit;
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.25rem;
  font-size: .9rem;
}
.article-body th {
  background: var(--clr-primary);
  color: #fff;
  font-family: var(--ff-head);
  font-weight: 600;
  padding: .6rem 1rem;
  text-align: left;
}
.article-body td {
  padding: .55rem 1rem;
  border-bottom: 1px solid var(--clr-border);
}
.article-body tr:last-child td { border-bottom: none; }
.article-body tr:nth-child(even) td { background: #f0ecfb; }

/* FAQ accordion */
.faq-section { margin: 2rem 0; }
.faq-section h2 {
  font-family: var(--ff-head);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-left: .75rem;
  border-left: 3px solid var(--clr-accent);
}
.faq-item { margin-bottom: .4rem; }
.faq-item summary {
  font-family: var(--ff-head);
  font-weight: 600;
  font-size: .95rem;
  padding: .75rem 1rem;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-left: 3px solid var(--clr-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.1rem; flex-shrink: 0; }
.faq-item[open] summary::after { content: '−'; }
.faq-item[open] summary { background: #f0ecfb; }
.faq-item .faq-body {
  padding: .75rem 1rem;
  border: 1px solid var(--clr-border);
  border-top: none;
  background: var(--clr-surface);
  font-size: .9rem;
}
.faq-item .faq-body p:last-child { margin-bottom: 0; }

/* Breadcrumbs */
.breadcrumbs {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: .6rem 1.5rem;
  font-size: .8rem;
  color: var(--clr-muted);
}
.breadcrumbs a { color: var(--clr-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--clr-primary); }
.breadcrumbs span { margin: 0 .35rem; }

/* === FOOTER === */
.site-footer {
  background: var(--clr-text);
  color: rgba(255,255,255,.65);
  margin-top: 3rem;
  padding: 2.5rem 1.5rem 1.5rem;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}
.footer-brand-name {
  font-family: var(--ff-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: .5rem;
}
.footer-tagline { font-size: .875rem; line-height: 1.55; }
.footer-col h4 {
  font-family: var(--ff-head);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--clr-accent);
  margin-bottom: .75rem;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .4rem; }
.footer-col a {
  color: rgba(255,255,255,.65);
  text-decoration: none;
  font-size: .875rem;
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  max-width: var(--max-w);
  margin: 1.5rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: .8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
}

/* === PRIVACY PAGE === */
.privacy-content {
  max-width: 740px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}
.privacy-content h1 {
  font-family: var(--ff-head);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}
.privacy-content h2 {
  font-family: var(--ff-head);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 1.75rem 0 .6rem;
}
.privacy-content p, .privacy-content ul {
  margin-bottom: 1rem;
  font-size: .95rem;
}
.privacy-content ul { padding-left: 1.5rem; }

/* === CONTACT FORM === */
.contact-form { margin-top: 1.5rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: .875rem;
  font-weight: 600;
  margin-bottom: .35rem;
  color: var(--clr-text, #1a1a2e);
}
.form-group .required { color: #c0392b; }
.form-group input,
.form-group textarea {
  width: 100%;
  padding: .6rem .85rem;
  border: 1px solid #d0d0d8;
  border-radius: 4px;
  font-size: .95rem;
  font-family: inherit;
  background: #fafafa;
  transition: border-color .15s;
  box-sizing: border-box;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--clr-accent, #2563eb);
  background: #fff;
}
.form-group textarea { resize: vertical; }
.form-note { font-size: .8rem; color: #666; margin-bottom: 1rem; }
.btn-submit {
  display: inline-block;
  padding: .65rem 1.75rem;
  background: var(--clr-accent, #2563eb);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: .95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity .15s;
}
.btn-submit:hover { opacity: .88; }
.form-success {
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  border-radius: 4px;
  padding: 1rem 1.25rem;
  color: #065f46;
  font-size: .95rem;
  margin-bottom: 1.5rem;
}
.form-errors {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 4px;
  padding: .75rem 1.25rem .75rem 2rem;
  color: #991b1b;
  font-size: .875rem;
  margin-bottom: 1.25rem;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .site-main { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}
@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .site-nav { display: none; flex-direction: column; position: absolute; top: 62px; left: 0; right: 0; background: var(--clr-primary); padding: .5rem 0; }
  .site-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .article-item { grid-template-columns: 80px 1fr; }
}
