/*
Theme Name: AS-Service Team
Theme URI: https://as-service-team.de
Author: AS-Service Team e.K.
Description: Klassisches WordPress-Theme im Briefpapier-Look mit sticky Header, blauem Holzstreifen und Seiten-Template "Briefpapier-Startseite".
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: as-service-team
*/

:root {
  --ast-primary: #3a4f80;
  --ast-primary-soft: rgba(58, 79, 128, 0.8);
  --ast-primary-fg: #fdfdff;
  --ast-accent: #e8811f;
  --ast-accent-fg: #fffdfa;
  --ast-bg: #ffffff;
  --ast-fg: #333f5c;
  --ast-muted: #6b7590;
  --ast-secondary: #f2f4f9;
  --ast-border: #dfe3ec;
  --ast-radius: 0.375rem;
  --ast-max: 72rem;
  --ast-font-display: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --ast-font-sans: "Source Sans 3", ui-sans-serif, system-ui, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ast-bg);
  color: var(--ast-fg);
  font-family: var(--ast-font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

h1, h2, h3, .ast-display {
  font-family: var(--ast-font-display);
  letter-spacing: -0.02em;
  color: var(--ast-primary);
  margin: 0;
}

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

.ast-skip-link {
  position: absolute;
  left: -9999px;
}
.ast-skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
  background: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--ast-radius);
}

/* Header */
.ast-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ast-bg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
body.admin-bar .ast-header { top: 32px; }
@media (max-width: 782px) {
  body.admin-bar .ast-header { top: 46px; }
}

.ast-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: var(--ast-max);
  margin: 0 auto;
  padding: 1rem 1.25rem;
}

.ast-brand { text-decoration: none; line-height: 1.05; display: block; }
.ast-brand__name {
  display: block;
  font-family: var(--ast-font-display);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--ast-primary);
}
.ast-brand__claim {
  display: block;
  font-family: var(--ast-font-display);
  font-weight: 500;
  font-size: 1rem;
  color: var(--ast-primary-soft);
}
@media (min-width: 640px) {
  .ast-brand__name { font-size: 1.875rem; }
  .ast-brand__claim { font-size: 1.125rem; }
}

.ast-nav { display: none; align-items: center; gap: 1.75rem; }
@media (min-width: 900px) { .ast-nav { display: flex; } }
.ast-nav ul { list-style: none; display: flex; gap: 1.75rem; margin: 0; padding: 0; }
.ast-nav a {
  font-family: var(--ast-font-display);
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(51, 63, 92, 0.85);
  text-decoration: none;
  transition: color 0.2s;
}
.ast-nav a:hover,
.ast-nav .current-menu-item > a { color: var(--ast-accent); }

.ast-phone {
  border-radius: var(--ast-radius);
  background: var(--ast-primary);
  color: var(--ast-primary-fg);
  padding: 0.55rem 1rem;
  font-family: var(--ast-font-display);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.ast-phone:hover { opacity: 0.9; }

.ast-burger {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--ast-border);
  border-radius: var(--ast-radius);
  background: transparent;
  cursor: pointer;
}
@media (min-width: 900px) { .ast-burger { display: none; } }
.ast-burger span { display: block; width: 1.25rem; height: 2px; background: var(--ast-primary); }

.ast-wood {
  height: 0.875rem;
  width: 100%;
  background-color: var(--ast-primary);
  background-size: cover;
  background-position: center;
}
@media (min-width: 640px) { .ast-wood { height: 1rem; } }

.ast-mobile-nav { display: none; border-bottom: 1px solid var(--ast-border); background: var(--ast-bg); padding: 0.5rem 1.25rem 0.75rem; }
.ast-mobile-nav.is-open { display: block; }
@media (min-width: 900px) { .ast-mobile-nav.is-open { display: none; } }
.ast-mobile-nav ul { list-style: none; margin: 0; padding: 0; }
.ast-mobile-nav a {
  display: block;
  padding: 0.5rem 0;
  font-family: var(--ast-font-display);
  color: rgba(51, 63, 92, 0.85);
  text-decoration: none;
}

/* Sections */
.ast-section { padding: 3.5rem 0; }
@media (min-width: 640px) { .ast-section { padding: 5rem 0; } }
.ast-section--alt { background: rgba(242, 244, 249, 0.6); }

.ast-hero { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 860px) { .ast-hero { grid-template-columns: 1fr 1fr; } }
.ast-hero h1 { font-size: 2.25rem; font-weight: 800; line-height: 1.1; }
@media (min-width: 640px) { .ast-hero h1 { font-size: 3rem; } }
.ast-hero p { margin: 1.25rem 0 0; max-width: 34rem; font-size: 1.125rem; color: var(--ast-muted); }
.ast-hero img { border-radius: 0.5rem; border: 1px solid var(--ast-border); object-fit: cover; width: 100%; }

.ast-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.ast-btn {
  border-radius: var(--ast-radius);
  padding: 0.8rem 1.5rem;
  font-family: var(--ast-font-display);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: opacity 0.2s, background-color 0.2s;
}
.ast-btn--accent { background: var(--ast-accent); color: var(--ast-accent-fg); }
.ast-btn--accent:hover { opacity: 0.9; }
.ast-btn--outline { border: 1px solid var(--ast-primary); color: var(--ast-primary); }
.ast-btn--outline:hover { background: var(--ast-secondary); }

.ast-h2 { font-size: 1.875rem; font-weight: 700; }
.ast-lead { margin: 1rem 0 0; max-width: 52rem; font-size: 1.125rem; color: var(--ast-muted); }

.ast-cards { display: grid; gap: 1.5rem; margin-top: 2rem; }
@media (min-width: 640px) { .ast-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .ast-cards { grid-template-columns: repeat(3, 1fr); } }
.ast-card {
  border: 1px solid var(--ast-border);
  border-radius: 0.5rem;
  background: #fff;
  padding: 1.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.ast-card__bar { display: block; height: 0.375rem; width: 3rem; border-radius: 999px; background: var(--ast-accent); }
.ast-card h3 { margin-top: 1rem; font-size: 1.25rem; font-weight: 600; }
.ast-card p { margin: 0.5rem 0 0; color: var(--ast-muted); }
.ast-card--link { display: block; text-decoration: none; color: inherit; transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease; }
.ast-card--link:hover { border-color: var(--ast-accent); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); transform: translateY(-2px); }
.ast-card--link h3 { text-decoration: none; }

.ast-contact { display: grid; gap: 2rem; }
@media (min-width: 640px) { .ast-contact { grid-template-columns: 1fr 1fr; } }
.ast-contact p { color: var(--ast-muted); }
.ast-contact dl { margin: 0; color: var(--ast-muted); }
.ast-contact dl > div { display: flex; gap: 0.75rem; margin-bottom: 0.5rem; }
.ast-contact dt { width: 5rem; font-weight: 600; color: var(--ast-fg); }
.ast-contact dd { margin: 0; }
.ast-contact a { text-decoration: none; }
.ast-contact a:hover { color: var(--ast-accent); }

/* Content */
.ast-entry { max-width: 48rem; }
.ast-entry h1 { font-size: 2.25rem; font-weight: 800; }
.ast-entry h2, .ast-entry h3 { margin-top: 2rem; }
.ast-entry p, .ast-entry ul, .ast-entry ol { color: var(--ast-fg); }
.ast-entry a { color: var(--ast-primary); }
.ast-entry img { border-radius: 0.5rem; }
.ast-entry-list { display: grid; gap: 1.5rem; }
.ast-entry-list article { border-bottom: 1px solid var(--ast-border); padding-bottom: 1.5rem; }
.ast-entry-list h2 { font-size: 1.5rem; }
.ast-meta { font-size: 0.9rem; color: var(--ast-muted); }

/* Footer */
.ast-footer__inner {
  max-width: var(--ast-max);
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--ast-muted);
}
.ast-footer__inner ul { list-style: none; display: flex; gap: 0.75rem; margin: 0; padding: 0; }
.ast-footer__inner a { text-decoration: none; }
.ast-footer__inner a:hover { color: var(--ast-accent); }

/* Block editor support */
.ast-blocks { padding: 0; }
.ast-blocks > * { margin-left: auto; margin-right: auto; }

.entry-content > *,
.ast-blocks > * {
  max-width: var(--ast-max);
}
.entry-content > .alignwide,
.ast-blocks > .alignwide { max-width: 84rem; }
.entry-content > .alignfull,
.ast-blocks > .alignfull { max-width: none; width: 100%; }

.ast-blocks > *:not(.alignfull):not(.alignwide) { padding-left: 1.25rem; padding-right: 1.25rem; }

.ast-wood-strip {
  height: 1rem;
  width: 100%;
  background-color: var(--ast-primary);
  background-size: cover;
  background-position: center;
}

.wp-block-separator.ast-accent-bar {
  height: 0.375rem;
  width: 3rem;
  border: 0;
  border-radius: 999px;
  margin: 0 0 1rem;
  opacity: 1;
}

.wp-block-button__link { text-decoration: none; }
.wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent;
  border: 1px solid var(--ast-primary);
  color: var(--ast-primary);
}
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--ast-secondary); }
