/* ================================================
   CDR Telekommunikation – style.css
   ================================================ */

/* --- Lokale Fonts (DSGVO-konform, kein Google-Server) --- */
@font-face {
  font-family: 'Alata';
  src: url('../fonts/alata-regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Josefin Sans';
  src: url('../fonts/josefinsans-regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Josefin Sans';
  src: url('../fonts/josefinsans-600.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-dark: #313232;
  --color-red: #bb0f20;
  --color-red-hover: #9a0c1a;
  --color-cyan: #65c5d6;
  --color-cyan-hover: #4fb3c5;
  --color-white: #ffffff;
  --color-light: #f5f5f5;
  --color-gray: #6b7280;
  --color-border: #e5e7eb;

  --font-heading: 'Alata', sans-serif;
  --font-body: 'Josefin Sans', sans-serif;

  --max-width: 1200px;
  --header-height: 80px;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
  --transition: 0.3s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1.6;
  color: var(--color-dark);
  background: var(--color-white);
}

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

a {
  color: var(--color-red);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--color-red-hover); }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.3;
  color: var(--color-dark);
}
h1 { font-size: 2.2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.3rem; }

ul { list-style: none; }

/* --- Container --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Header --- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  box-shadow: var(--shadow);
  height: var(--header-height);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-dark);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo span { color: var(--color-red); }

/* --- Navigation --- */
.nav-list {
  display: flex;
  gap: 24px;
}

.nav-list a {
  color: var(--color-dark);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  padding: 8px 0;
  position: relative;
}

.nav-list a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-red);
  transition: width var(--transition);
}

.nav-list a:hover::after,
.nav-list a.active::after {
  width: 100%;
}

.nav-list a:hover,
.nav-list a.active {
  color: var(--color-red);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--color-dark);
  border-radius: 2px;
  transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 450px;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center 47%;
  background-color: var(--color-dark);
  color: var(--color-white);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(49, 50, 50, 0.6);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 650px;
  padding: 60px 0;
}

.hero h1 {
  color: var(--color-white);
  margin-bottom: 16px;
}

.hero p {
  font-size: 1.15rem;
  margin-bottom: 24px;
  opacity: 0.95;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: 1rem;
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--color-red);
  color: var(--color-white);
}
.btn-primary:hover {
  background: var(--color-red-hover);
  color: var(--color-white);
}

.btn-secondary {
  background: var(--color-cyan);
  color: var(--color-white);
}
.btn-secondary:hover {
  background: var(--color-cyan-hover);
  color: var(--color-white);
}

.btn-outline {
  background: transparent;
  color: var(--color-red);
  border: 2px solid var(--color-red);
}
.btn-outline:hover {
  background: var(--color-red);
  color: var(--color-white);
}

/* --- Sections --- */
.section { padding: 60px 0; }
.section-alt { background: var(--color-light); }

.section-title {
  text-align: center;
  margin-bottom: 40px;
}
.section-title h2 { margin-bottom: 12px; }
.section-title p {
  color: var(--color-gray);
  max-width: 600px;
  margin: 0 auto;
}

/* --- Service Cards --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.service-card {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.service-card .icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
  color: var(--color-red);
}
.service-card .icon svg { width: 100%; height: 100%; }

.service-card h3 { margin-bottom: 12px; }
.service-card p {
  color: var(--color-gray);
  font-size: 1rem;
  margin-bottom: 16px;
}

/* --- Partner Logos --- */
.partners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 32px;
}

/* --- Contact Section --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.contact-info h3 { margin-bottom: 16px; }

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.contact-item svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 4px;
  color: var(--color-red);
}

.contact-item a { color: var(--color-dark); }
.contact-item a:hover { color: var(--color-red); }

.hours-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}
.hours-table td {
  padding: 6px 0;
  border-bottom: 1px solid var(--color-border);
}
.hours-table td:last-child { text-align: right; }

.map-container {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.map-container iframe {
  width: 100%;
  height: 350px;
  border: none;
}

/* --- Page Header (Unterseiten) --- */
.page-header {
  background: var(--color-dark);
  color: var(--color-white);
  padding: 50px 0;
  text-align: center;
}
.page-header h1 {
  color: var(--color-white);
  margin-bottom: 12px;
}
.page-header p {
  opacity: 0.85;
  max-width: 600px;
  margin: 0 auto;
}

/* --- Content Blocks --- */
.content-block { padding: 40px 0; }
.content-block + .content-block { border-top: 1px solid var(--color-border); }
.content-block h2 { margin-bottom: 16px; }
.content-block h3 { margin-bottom: 12px; }
.content-block p { margin-bottom: 12px; }
.content-block ul {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 16px;
}
.content-block ul li { margin-bottom: 6px; }

/* --- Feature List --- */
.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin: 24px 0;
}

.feature-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.feature-item svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--color-cyan);
  margin-top: 2px;
}

.feature-item h4 { margin-bottom: 4px; }
.feature-item p {
  font-size: 1rem;
  color: var(--color-gray);
  margin-bottom: 0;
}

/* --- Partner Cards --- */
.partner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.partner-card {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--color-red);
}
.partner-card h3 { margin-bottom: 8px; }
.partner-card p {
  color: var(--color-gray);
  font-size: 1rem;
  margin-bottom: 12px;
}

/* --- CTA Box --- */
.cta-box {
  background: var(--color-light);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  margin: 40px 0;
}
.cta-box h2 { margin-bottom: 12px; }
.cta-box p {
  color: var(--color-gray);
  margin-bottom: 20px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}
.cta-box .btn + .btn { margin-left: 12px; }

/* --- Footer --- */
.footer {
  background: var(--color-dark);
  color: var(--color-white);
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

.footer h4 {
  color: var(--color-white);
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.footer p,
.footer a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 1rem;
}
.footer a:hover { color: var(--color-white); }

.footer-links li { margin-bottom: 8px; }

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transition: background var(--transition);
}
.footer-social a:hover { background: var(--color-red); }

.footer-social svg {
  width: 18px;
  height: 18px;
  fill: var(--color-white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 20px;
  text-align: center;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.5);
}


/* --- Legal pages --- */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
}
.legal-content h2 {
  margin-top: 32px;
  margin-bottom: 12px;
}
.legal-content h3 {
  margin-top: 24px;
  margin-bottom: 8px;
}
.legal-content p { margin-bottom: 12px; }
.legal-content ul {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 16px;
}
.legal-content ul li { margin-bottom: 6px; }

/* --- Responsive --- */
@media (max-width: 1024px) {
  h1 { font-size: 1.9rem; }
  h2 { font-size: 1.5rem; }
}

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

  .nav-list {
    position: fixed;
    top: var(--header-height);
    right: -100%;
    width: 280px;
    height: calc(100vh - var(--header-height));
    background: var(--color-white);
    flex-direction: column;
    padding: 24px;
    gap: 0;
    box-shadow: var(--shadow-lg);
    transition: right var(--transition);
  }
  .nav-list.open { right: 0; }

  .nav-list a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
  }

  .hero { min-height: 350px; }
  .hero h1 { font-size: 1.6rem; }

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

  .cta-box .btn + .btn {
    margin-left: 0;
    margin-top: 10px;
  }
  .cta-box .btn {
    display: block;
    width: 100%;
  }

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

@media (max-width: 480px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.3rem; }
  .section { padding: 40px 0; }
  .hero { min-height: 280px; }
}
