/*
Theme Name: CMetzner-IT-Theme
Theme URI: https://www.christmetz-it.de/
Author: Christian Metzner
Author URI: https://www.christmetz-it.de/
Description: Modern, responsive one-page WordPress theme for IT-Dienstleistungen Christian Metzner.
Version: 1.0.0
Text Domain: christmetz-it
*/

:root {
  --cm-blue: #07539a;
  --cm-blue-dark: #001a31;
  --cm-blue-mid: #0d6bc7;
  --cm-ink: #0b2036;
  --cm-text: #1d2b3a;
  --cm-muted: #657487;
  --cm-bg: #f5f8fc;
  --cm-white: #fff;
  --cm-border: #dce5ef;
  --cm-shadow: 0 16px 40px rgba(0, 35, 70, .09);
  --cm-radius: 14px;
  --cm-max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--cm-text);
  background: var(--cm-white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

a {
  color: var(--cm-blue);
  text-decoration: none;
}

a:hover {
  color: var(--cm-blue-mid);
}

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

.container {
  width: min(calc(100% - 40px), var(--cm-max));
  margin-inline: auto;
}

/* Reference layout: header and hero content are deliberately left aligned.
   They must not inherit the centered content container. */
.site-header .header-inner,
.hero .hero-inner {
  width: auto;
  max-width: none;
  margin-left: 70px;
  margin-right: 70px;
}

.site-header .header-inner {
  justify-content: flex-start;
}

.site-header .main-navigation {
  margin-left: auto;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid #dce5ef;
  backdrop-filter: blur(12px);
}

.header-inner {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.site-branding {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 0 0 auto;
}

.custom-logo-link,
.site-logo-fallback {
  display: block;
  line-height: 0;
}

.custom-logo-link img,
.site-logo-fallback img {
  width: 205px;
  max-height: 82px;
  object-fit: contain;
  display: block;
}

.site-title-fallback {
  color: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 18px;
}

.main-navigation {
  margin-left: auto;
}

.main-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.main-navigation a {
  color: #0b2036;
  font-weight: 600;
  padding: 12px 18px;
  border-radius: 9px;
  position: relative;
}

.main-navigation a:after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 4px;
  height: 2px;
  background: var(--cm-blue-mid);
  transform: scaleX(0);
  transition: .2s ease;
}

.main-navigation a:hover:after,
.main-navigation .current-menu-item a:after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 42px;
  padding: 9px;
  color: #fff;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 8px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px auto;
  background: #0b2036;
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #001b32;
  min-height: 33.333vw;
  display: flex;
  align-items: center;
}

.hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  opacity: 1;
  display: block;
}

.hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: fill;
  object-position: center center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(0, 27, 51, .72) 0%, rgba(0, 29, 55, .60) 18%, rgba(0, 31, 58, .38) 34%, rgba(0, 31, 58, .16) 49%, rgba(0, 31, 58, .03) 65%, rgba(0, 31, 58, 0) 78%);
}

.hero:after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .12;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .25) 1px, transparent 1.5px);
  background-size: 34px 34px;
  mask-image: linear-gradient(90deg, transparent 35%, #000 65%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  text-align: left;
  z-index: 2;
  padding: 80px 0;
  max-width: 760px;
}

.hero-kicker {
  margin: 0 0 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  font-weight: 400;
  letter-spacing: -.03em;
}

.hero-title {
  margin: 0;
  color: #1985df;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 400;
  font-size: clamp(2.3rem, 5vw, 4.2rem);
  letter-spacing: -.04em;
}

.hero-rule,
.section-rule {
  width: 80px;
  height: 3px;
  background: var(--cm-blue-mid);
  margin: 28px 0;
  border: 0;
}

.hero-description {
  max-width: 650px;
  font-size: 1.13rem;
  color: rgba(255, 255, 255, .9);
  margin: 0 0 30px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 8px;
  padding: 13px 22px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform .2s, background .2s, border .2s;
  cursor: pointer;
}

.button-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: #0878d7;
  color: #fff;
}

.button-primary:hover {
  background: #0b8aef;
  color: #fff;
}

.button-outline {
  color: #fff;
  border-color: rgba(255, 255, 255, .65);
  background: rgba(0, 0, 0, .08);
}

.button-outline:hover {
  color: #fff;
  border-color: #fff;
}

.section {
  padding: 82px 0;
}

.section-alt {
  background: var(--cm-bg);
}

.portfolio-section {
  position: relative;
  overflow: hidden;
  background: #001b35 url("assets/images/portfolio-bg.jpg") center center / cover no-repeat;
}

.portfolio-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 18, 39, .90), rgba(0, 30, 67, .72) 48%, rgba(0, 19, 42, .82));
  pointer-events: none;
}

.portfolio-section>.container {
  position: relative;
  z-index: 1;
}


.section-heading {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 44px;
}

.section-heading h2 {
  margin: 0;
  color: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
}

.section-heading .section-rule {
  margin: 18px auto;
  background: #5da9e8;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
}

.feature-card {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, .97);
  border: 1px solid rgba(130, 190, 235, .35);
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(0, 20, 45, .18);
  padding: 34px 36px 32px;
  display: block;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #07539a, #2d9bea);
}

.feature-card::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -85px;
  bottom: -105px;
  border: 1px solid rgba(7, 83, 154, .10);
  border-radius: 50%;
  box-shadow: 0 0 0 22px rgba(7, 83, 154, .035), 0 0 0 44px rgba(7, 83, 154, .025);
  pointer-events: none;
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(45, 155, 234, .55);
  box-shadow: 0 24px 55px rgba(0, 20, 45, .24);
}

.feature-card-content {
  position: relative;
  z-index: 1;
}

.feature-card h2,
.feature-card h3 {
  margin: 0;
  color: var(--cm-blue);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 500;
  font-size: 1.9rem;
  letter-spacing: -.025em;
}

.feature-card .section-rule {
  width: 58px;
  height: 3px;
  margin: 16px 0 20px;
  background: linear-gradient(90deg, #07539a, #2d9bea);
}

.feature-card p {
  color: #566576;
  margin-top: 0;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.text-link span {
  font-size: 1.25rem;
  transition: transform .2s;
}

.text-link:hover span {
  transform: translateX(4px);
}

.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.about-copy h2 {
  margin: 0;
  color: var(--cm-blue);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 400;
  font-size: 2.4rem;
}

.about-copy .section-rule {
  margin: 18px 0;
}

.about-photo {
  width: min(100%, 520px);
  max-height: 420px;
  justify-self: end;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--cm-shadow);
  background: #eaf3fc;
}

.about-photo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
  object-position: center;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

.portfolio-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--cm-border);
  border-radius: var(--cm-radius);
  box-shadow: var(--cm-shadow);
}

.portfolio-image {
  aspect-ratio: 16/10;
  background: #e9f0f7;
  overflow: hidden;
}

.portfolio-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}

.portfolio-card:hover .portfolio-image img {
  transform: scale(1.04);
}

.portfolio-content {
  position: relative;
  padding: 24px;
  border-top: 8px solid var(--cm-blue);
}

.portfolio-content h3 {
  margin: 0 0 8px;
  color: #000;
  font-size: 1.3rem;
}

.portfolio-content p {
  margin: 0 0 18px;
  color: #607083;
}

.empty-portfolio {
  padding: 40px;
  text-align: center;
  border: 1px dashed var(--cm-border);
  border-radius: var(--cm-radius);
  color: var(--cm-muted);
}

.page-content {
  padding: 70px 0;
}

.page-content h1 {
  color: var(--cm-blue);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 400;
}

.entry-content>* {
  max-width: 820px;
}

.entry-content img {
  border-radius: 12px;
}

.site-footer {
  width: 100%;
  background: #fff;
  color: #1d2b3a;
  padding: 28px 0;
  border-top: 1px solid var(--cm-border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}

.footer-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
}

.footer-contact a {
  color: #1d2b3a;
}

.footer-contact a:hover {
  color: var(--cm-blue);
}

.footer-copy {
  color: #000;
  font-size: .9rem;
}

@media (max-width: 900px) {

  .site-header .header-inner,
  .hero .hero-inner {
    width: calc(100% - 56px);
    margin-left: 28px;
    margin-right: 28px;
  }

  .header-inner {
    min-height: 76px;
  }

  .menu-toggle {
    display: block;
  }

  .site-header {
    position: sticky;
  }

  .header-inner {
    position: relative;
  }

  .main-navigation {
    margin-left: 0;
    position: absolute;
    left: 0;
    right: 0;
    top: 76px;
    background: #fff;
    padding: 10px 20px 18px;
    display: none;
    border-top: 1px solid rgba(255, 255, 255, .1);
  }

  .main-navigation.is-open {
    display: block;
  }

  .main-navigation ul {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .main-navigation a {
    display: block;
    padding: 14px 16px;
  }

  .main-navigation a:after {
    left: 16px;
    right: auto;
    width: 36px;
    bottom: 6px;
  }

  .cards-grid,
  .about-layout {
    grid-template-columns: 1fr;
  }

  .about-photo {
    width: min(100%, 520px);
    max-height: 360px;
    justify-self: start;
  }

  .about-photo img {
    max-height: 360px;
  }

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

@media (max-width: 600px) {
  .container {
    width: min(calc(100% - 28px), var(--cm-max));
  }

  .custom-logo-link img,
  .site-logo-fallback img {
    width: 165px;
    max-height: 68px;
  }

  .hero {
    min-height: 540px;
  }

  .hero-media img {
    object-fit: cover;
    object-position: 68% center;
  }

  .hero-overlay {
    background: linear-gradient(90deg, rgba(0, 27, 51, .96) 0%, rgba(0, 27, 51, .82) 36%, rgba(0, 27, 51, .38) 68%, rgba(0, 27, 51, .08) 100%);
  }

  .hero-media {
    width: 72vw;
    opacity: .48;
  }

  .hero-media img {
    height: 100%;
    width: auto;
  }

  .hero-overlay {
    background: linear-gradient(90deg, rgba(0, 22, 42, .98) 0%, rgba(0, 27, 50, .88) 55%, rgba(0, 27, 50, .48) 100%);
  }

  .hero-inner {
    padding: 60px 0;
  }

  .hero-kicker {
    font-size: 1.8rem;
  }

  .hero-title {
    font-size: 2.4rem;
  }

  .section {
    padding: 58px 0;
  }

  .feature-card {
    padding: 28px 24px 26px;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}