/*
 * Style sheet für die neu gestaltete Website „Einfach Digital – IT‑Hilfe für Senioren“.
 *
 * Modernes, responsives Design mit Hero‑Bild, klarer Navigation und akzentuierten Sektionen.
 */

/* Farbvariablen */
:root {
  --dark-blue: #1C3F78;
  --medium-blue: #3366CC;
  --green: #00B36B;
  --light-gray: #f7f9fb;
  --text-dark: #0f172a;
  --card-bg: #ffffff;
  --overlay: rgba(28, 63, 120, 0.65);
}

/* Smooth scroll */
html { scroll-behavior: smooth; }

/* Reset & Base */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text-dark);
  background: var(--light-gray);
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
.container { width: min(1100px, 90%); margin-inline: auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 1000; background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}
.nav-wrapper { display: flex; justify-content: space-between; align-items: center; padding: .8rem 0; }
.brand img { height: 100px; width: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 1rem; }
.main-nav a {
  color: var(--dark-blue); text-decoration: none; font-weight: 600;
  padding: .5rem .75rem; border-radius: .75rem; transition: color .3s, background .3s;
}
.main-nav a:hover { color: var(--green); background: rgba(51,102,204,.08); }
.btn-nav { background: var(--green); color: #fff; border-radius: 1rem; padding: .5rem 1rem; }
.btn-nav:hover { background: var(--medium-blue); color: #fff; }

/* Hero */
.hero {
  position: relative; height: 70vh; min-height: 420px;
  background-image: url('../images/hero_real.jpg');
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  text-align: center; color: #fff; overflow: hidden;
}
.hero-overlay { position: absolute; inset: 0; background: var(--overlay); z-index: 1; }
.hero-content { position: relative; z-index: 2; max-width: 750px; padding: 0 20px; }
.hero h1 { margin: 0; font-size: clamp(2rem, 6vw, 3rem); font-weight: 700; }
.hero p { font-size: clamp(1rem, 3vw, 1.4rem); margin: 1rem 0 2rem; }
.btn-primary {
  background: var(--green); color: #fff; padding: .8rem 1.6rem; border-radius: 1rem; text-decoration: none;
  font-weight: 600; transition: background .3s; display: inline-block;
}
.btn-primary:hover { background: var(--medium-blue); }

/* Sections */
.section { padding: 80px 0; }
.section h2 { font-size: 2.2rem; margin: 0 0 1.5rem; color: var(--dark-blue); text-align: center; }

/* Leistungen */
.cards-wrapper { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.6rem; }
.card {
  background: var(--card-bg); border-radius: 1rem; padding: 2rem 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,.08); text-align: left;
}
.card h3 { margin-top: 0; color: var(--medium-blue); font-size: 1.4rem; }
.card p { margin-bottom: 0; font-size: 1rem; line-height: 1.5; }

/* ===== Preise: professionelles Layout ===== */
.price-grid {
  display: grid; gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-bottom: 1.2rem;
}
.price-card {
  background: var(--card-bg); border-radius: 1rem; padding: 1.4rem 1.6rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
  border: 1px solid rgba(28,63,120,.08);
  position: relative;
}
.price-card::after{
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px;
  background: linear-gradient(180deg, var(--green), var(--medium-blue));
  border-top-left-radius: 1rem; border-bottom-left-radius: 1rem;
}
.price-card h3 { margin: 0 0 .6rem; color: var(--dark-blue); font-size: 1.1rem; letter-spacing: .2px; }
.price-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.price-amount { display: flex; align-items: baseline; gap: .4rem; }
.price-number { font-size: 2rem; font-weight: 800; color: var(--dark-blue); line-height: 1; }
.price-unit { font-size: .95rem; font-weight: 600; color: #3b4b6d; opacity: .9; }
.price-note { font-size: .95rem; color: #6b7280; white-space: nowrap; }

.pricing-meta { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; max-width: 700px; margin-inline: auto; }
.pricing-meta li {
  display: grid; grid-template-columns: 1fr auto; align-items: center;
  background: var(--card-bg); border-radius: .9rem; padding: 1rem 1.2rem;
  box-shadow: 0 6px 18px rgba(0,0,0,.05);
}
.pricing-meta .label { font-weight: 600; }
.pricing-meta .value { justify-self: end; color: var(--dark-blue); font-weight: 700; }

/* Über Uns */
.about p { max-width: 800px; margin: 0 auto; font-size: 1.1rem; line-height: 1.7; }

/* Kontakt */
.contact { background: var(--dark-blue); color: #fff; text-align: center; }
.contact-content { max-width: 700px; margin-inline: auto; }
.contact-info { list-style: none; padding: 0; margin: 1.5rem 0; font-size: 1.1rem; }
.contact-info li { margin: .3rem 0; }
.contact-info a { color: #fff; text-decoration: underline; }
.contact-info a:hover { color: var(--green); }
.contact .btn-primary { margin-top: 1rem; }

/* Footer */
.site-footer { background: var(--medium-blue); color: #fff; text-align: center; padding: 2rem 0; font-size: .9rem; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .6s, transform .6s; }
.reveal.in-view { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 600px) {
  .nav-wrapper { flex-direction: column; align-items: flex-start; }
  .main-nav ul { flex-wrap: wrap; gap: .5rem; }
  .hero { height: 60vh; }
  .card { padding: 1.5rem 1.2rem; }
}

/*
 * Hervorhebung des aktuell sichtbaren Navigationslinks
 *
 * Um den Nutzenden zu zeigen, in welchem Abschnitt sie sich gerade befinden,
 * erhält der entsprechende Menü‑Eintrag eine optische Hervorhebung. Für
 * Standardlinks ändern wir die Farbe und hinterlegen eine dezente
 * Hintergrundfarbe, beim Kontakt‑Button wird lediglich die Hintergrundfarbe
 * angepasst, um weiterhin gut erkennbar zu sein.
 */
.main-nav a.active:not(.btn-nav) {
  color: var(--green);
  background: rgba(0, 179, 107, 0.1);
}

.main-nav a.active.btn-nav {
  background: var(--medium-blue);
}


/* --- Mobile-friendly button row --- */
.btn-row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: stretch; justify-content: center; }
.btn-row .btn-primary { flex: 1 1 200px; text-align: center; }

@media (max-width: 640px) {
  .btn-row { flex-direction: column; gap: .75rem; }
  .btn-row .btn-primary { width: 100%; }
}


/* === Mobile button optimizations (Sept 9, 2025) === */
@media (max-width: 640px) {
  .btn-row {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: center;
    align-items: stretch;
    gap: 0.5rem;
    margin-top: 0.5rem;
  }
  .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 0.65rem 1rem;         /* smaller, thumb-friendly */
    font-size: 1rem;                /* ~16px for readability */
    line-height: 1.2;
    border-radius: 12px;
    flex: 1 1 44%;                  /* two per row when possible */
    min-width: 44%;
    max-width: 280px;               /* cap to avoid ultra-wide buttons */
    width: auto;                    /* don't force full-width on mobile */
    text-wrap: balance;
  }
  /* Ensure icons inside buttons (if any) scale nicely */
  .btn-primary svg, .btn-primary img.icon {
    height: 1.1em;
    width: 1.1em;
    margin-right: 0.4rem;
    flex-shrink: 0;
  }
}


/* === Mobile nav improvements (Sept 10, 2025) === */
@media (max-width: 768px) {
  .nav-wrapper { 
    flex-direction: column; 
    align-items: center; 
    gap: .5rem;
    padding: .6rem 0 .75rem;
  }

  .brand img { height: 60px; }

  .main-nav ul {
    display: flex;
    flex-wrap: wrap;             /* allow wrapping */
    justify-content: center;     /* center rows */
    gap: .5rem .6rem;            /* tidy spacing between pills */
    padding: .25rem .25rem;
    margin: 0;
  }

  .main-nav a {
    font-size: .95rem;
    padding: .45rem .7rem;       /* slightly smaller touch targets */
    border-radius: 999px;        /* pill look */
    line-height: 1.1;
  }

  .main-nav a.btn-nav {
    padding: .5rem .9rem;        /* keep contact button prominent */
  }
}
