/* Handy- und Tablet-Darstellung – gilt für alle Seiten (ergänzt die Styles der einzelnen Seiten) */

/* Sicherheitsnetz: nichts darf seitlich über den Bildschirm hinausragen */
html, body { overflow-x: clip; }
img, svg, canvas, video { max-width: 100%; }
/* Spalten in Rasterlayouts dürfen schmaler als ihr Inhalt werden (sonst drückt z. B. eine Tabelle den Text breit) */
.article-layout > *, .content-grid > * { min-width: 0; }

/* ── Tablet (bis 960px) ── */
@media (max-width: 960px) {
    /* Startseite */
    .hero-inner { grid-template-columns: 1fr; min-height: 0; }
    .hero-left { padding: 56px 24px 40px !important; }
    .hero-right { min-height: 0; }
    .hero-visual { position: relative; inset: auto; border-radius: 32px 32px 0 0; padding: 40px 24px 72px; }
    .stats-wrapper { grid-template-columns: repeat(2, 1fr); }
    .stats-wrapper .stat-item:nth-child(2) { border-right: none; }
    .stats-wrapper .stat-item:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
    .features-grid { grid-template-columns: 1fr; }
    .leistungen-grid { grid-template-columns: repeat(2, 1fr); }
    .process-steps { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
    .process-steps::before, .process-line { display: none; }
    .digital-inner { grid-template-columns: 1fr; gap: 48px; }
    .zielgruppen-grid { grid-template-columns: repeat(2, 1fr); }

    /* Fußzeile (alle Seiten) */
    .footer-inner { grid-template-columns: 1fr 1fr !important; gap: 32px !important; }

    /* Leistungs-Unterseiten: weitere Leistungen */
    .weitere-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ── Handy (bis 600px) ── */
@media (max-width: 600px) {
    .hero-h1 { font-size: 34px; }
    .hero-sub { font-size: 16px; }
    .hero-actions a { width: 100%; justify-content: center; }
    .hero-trust { flex-wrap: wrap; row-gap: 6px; }
    .hv-card { padding: 24px 22px; }

    .stats-section { padding: 0 16px; }
    .stat-item { padding: 28px 12px !important; }
    .stat-number { font-size: 38px !important; }
    .stat-number .unit { font-size: 22px !important; }
    .stat-label { font-size: 13px; }

    .leistungen-grid { grid-template-columns: 1fr; }
    .process-steps { grid-template-columns: 1fr; }
    .zielgruppen-grid { grid-template-columns: 1fr; }

    /* DATEV-Mockup verkleinern */
    .dv-body { grid-template-columns: 1fr !important; }
    .dv-body > :first-child { display: none; }
    .dv-cards { grid-template-columns: 1fr !important; }

    /* Abschluss-Kasten "Sprechen wir" */
    .cta-block { padding: 48px 22px !important; border-radius: 24px !important; }

    /* Fußzeile */
    .footer-inner { grid-template-columns: 1fr !important; }
    .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
    .footer-links { flex-wrap: wrap; justify-content: center; }

    /* Leistungs-Unterseiten */
    .weitere-grid { grid-template-columns: 1fr !important; }

    /* Blog: Vergleichstabelle seitlich wischbar statt zu breit */
    .compare-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: normal; }
    .compare-table th, .compare-table td { min-width: 140px; padding: 10px 12px; font-size: 14px; }

    /* Einkommensteuerrechner: Diagramm-Legende umbrechen */
    .chart-legend { flex-wrap: wrap; gap: 8px 18px; }
}
