/**
 * Mobile-First Global CSS
 * Smart Web Solutions
 * ZWINGEND für alle Views einzubinden
 */

/* ============================================
   CRITICAL MOBILE-FIRST RULES
   ============================================ */

/* Viewport Meta (sollte im HTML sein) */
/* <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, user-scalable=yes"> */

/* Text Umbruch für alle Text-Elemente */
p, h1, h2, h3, h4, h5, h6, li, td, th, div, span, a {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Images responsive */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Overflow-Schutz */
html, body {
    overflow-x: hidden;
    width: 100%;
}

.container, .section, main {
    overflow-x: hidden;
}

/* Scrollbare Bereiche */
.scrollable {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ============================================
   MOBILE TABLES - Card Transform
   ============================================ */
table {
    width: 100%;
    border-collapse: collapse;
}

@media (max-width: 767px) {
    table, thead, tbody, th, td, tr {
        display: block;
    }
    
    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    tr {
        margin-bottom: var(--space-lg);
        border: 1px solid var(--color-gray-200);
        border-radius: var(--radius-md);
        padding: var(--space-md);
    }
    
    td {
        border: none;
        position: relative;
        padding-left: 50%;
        padding-top: var(--space-sm);
        padding-bottom: var(--space-sm);
    }
    
    td::before {
        content: attr(data-label);
        position: absolute;
        left: var(--space-md);
        width: 45%;
        padding-right: var(--space-sm);
        font-weight: var(--font-weight-semibold);
        white-space: nowrap;
    }
}

/* ============================================
   MOBILE FORMS
   ============================================ */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="url"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: var(--space-md);
    font-size: 16px; /* Verhindert iOS Zoom */
    border: 1px solid var(--color-gray-300);
    border-radius: var(--radius-md);
    background-color: var(--color-white);
    transition: all var(--transition-fast);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-primary-base);
    box-shadow: 0 0 0 3px rgba(30, 93, 184, 0.1);
}

/* Mobile: Full-width buttons */
@media (max-width: 767px) {
    .btn {
        width: 100%;
        padding: var(--space-md) var(--space-lg);
        font-size: var(--font-size-base);
    }
    
    .btn-lg {
        padding: var(--space-md) var(--space-xl);
    }
    
    /* Exceptions: inline buttons should not be full width */
    .nav-mobile-menu .btn,
    .hero-cta .btn,
    .cookie-actions .btn {
        width: 100%;
    }
}

/* Desktop: Auto-width buttons */
@media (min-width: 768px) {
    .btn {
        width: auto;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"],
    input[type="url"],
    input[type="number"],
    input[type="date"],
    select,
    textarea {
        width: auto;
    }
}

/* Form Groups */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-primary);
}

.form-error {
    color: #DC2626;
    font-size: var(--font-size-sm);
    margin-top: var(--space-xs);
}

.form-help {
    color: var(--color-text-light);
    font-size: var(--font-size-sm);
    margin-top: var(--space-xs);
}

/* ============================================
   MOBILE NAVIGATION ENHANCEMENTS
   ============================================ */
@media (max-width: 767px) {
    .nav-menu {
        flex-direction: column;
        width: 100%;
    }
    
    .nav-menu li {
        width: 100%;
    }
    
    .nav-menu a {
        display: block;
        width: 100%;
        padding: var(--space-md);
    }
    
    /* Hide desktop nav elements on mobile */
    .nav-actions {
        display: none !important;
    }
    
    /* Mobile Actions Container (Theme Toggle + Hamburger) */
    .nav-mobile-actions {
        display: flex !important;
        align-items: center;
        gap: 8px;
    }
    
    /* Show mobile toggle */
    .nav-mobile-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        background: var(--glass-bg);
        border: 1px solid var(--color-card-border);
        border-radius: var(--radius-lg);
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .nav-mobile-toggle:hover {
        background: var(--glass-bg-hover);
        border-color: var(--color-primary-glow);
    }
    
    /* Theme Toggle in Mobile Header */
    .theme-toggle-mobile {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
    }
    
    /* Nav container mobile spacing */
    .nav-container {
        padding: 10px 16px;
    }
    
    /* Logo gut sichtbar auf Mobile */
    .nav-logo-img {
        height: 44px !important;
        width: 44px !important;
        filter: drop-shadow(0 2px 10px rgba(30, 93, 184, 0.4)) !important;
    }
    
    .nav-logo span {
        font-size: 17px;
        font-weight: 700;
    }
    
    /* Mobile Menu verbessertes Styling */
    .nav-mobile-menu {
        padding: 20px !important;
    }
    
    .nav-mobile-menu ul li {
        padding: 12px 0;
    }
    
    .nav-mobile-menu ul li a {
        font-size: 18px;
        font-weight: 500;
    }
}

/* Desktop: Hide mobile actions */
@media (min-width: 768px) {
    .nav-mobile-actions {
        display: none !important;
    }
}

/* Desktop: Show nav elements, hide toggle */
@media (min-width: 768px) {
    .nav-menu {
        display: flex !important;
    }
    
    .nav-mobile-toggle {
        display: none !important;
    }
    
    .nav-actions {
        display: flex !important;
    }
}

/* ============================================
   TOUCH-FRIENDLY INTERACTIONS
   ============================================ */
a, button, .btn, input[type="submit"], input[type="button"] {
    min-height: 44px; /* Apple's minimum touch target */
    min-width: 44px;
}

/* Increase tap area for small icons */
.icon-button {
    padding: var(--space-md);
}

/* ============================================
   MOBILE TYPOGRAPHY ADJUSTMENTS
   ============================================ */
@media (max-width: 767px) {
    h1 {
        font-size: 28px;
        line-height: 1.2;
    }
    
    h2 {
        font-size: 24px;
        line-height: 1.25;
    }
    
    h3 {
        font-size: 20px;
    }
    
    .hero-title {
        font-size: 30px !important;
        line-height: 1.2 !important;
        margin-bottom: var(--space-lg);
    }
    
    .hero-title-line,
    .hero-title-highlight {
        font-size: inherit;
        display: block;
    }
    
    .section-title {
        font-size: 24px !important;
        line-height: 1.25;
        margin-bottom: var(--space-md);
    }
    
    .section-subtitle {
        font-size: 16px;
        line-height: 1.6;
        margin-bottom: var(--space-xl);
    }
    
    .section-eyebrow,
    .hero-eyebrow {
        font-size: 11px;
        letter-spacing: 1.5px;
        padding: 8px 16px;
        margin-bottom: var(--space-md);
    }
}

@media (max-width: 380px) {
    .hero-title {
        font-size: 24px;
    }
    
    .section-title {
        font-size: var(--font-size-lg);
    }
}

/* ============================================
   MOBILE SPACING ADJUSTMENTS - Mehr Breathing Room
   ============================================ */
@media (max-width: 767px) {
    .section {
        padding-top: var(--space-3xl);
        padding-bottom: var(--space-3xl);
    }
    
    .container {
        padding-left: 24px;
        padding-right: 24px;
    }
    
    /* Section padding für spezifische Sections */
    .services-section,
    .differentiators-section,
    .process-section,
    .reviews-section {
        padding: var(--space-3xl) 24px;
    }
    
    /* Mehr Abstand zwischen Elementen */
    p {
        margin-bottom: var(--space-md);
        line-height: 1.7;
    }
    
    /* Text-Container auf Subpages */
    [style*="max-width: 800px"],
    [style*="max-width: 900px"],
    [style*="max-width: 700px"] {
        padding: 0 !important;
    }
}

/* ============================================
   GRID ADJUSTMENTS FOR MOBILE
   ============================================ */
.grid {
    display: grid;
    gap: var(--space-lg);
}

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

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .grid,
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    
    /* Alle Cards in Grids */
    .grid .card,
    .grid-cols-2 .card,
    .grid-cols-3 .card,
    .grid-cols-4 .card {
        padding: 20px !important;
        margin-bottom: 0 !important;
    }
    
    /* Card Titles & Descriptions in Grids */
    .grid .card-title,
    .grid-cols-3 .card h3,
    .grid-cols-3 .card-title {
        font-size: 18px !important;
        margin-bottom: 8px !important;
    }
    
    .grid .card-description,
    .grid-cols-3 .card p,
    .grid-cols-3 .card-description {
        font-size: 15px !important;
        line-height: 1.6 !important;
    }
    
    /* Card Icons in Grids */
    .grid .card-icon,
    .grid-cols-3 .card-icon {
        width: 48px !important;
        height: 48px !important;
        margin-bottom: 12px !important;
    }
    
    .grid .card-icon svg,
    .grid-cols-3 .card-icon svg {
        width: 24px !important;
        height: 24px !important;
    }
    
    /* Technologie Stack Cards */
    .grid-cols-4 .card,
    .grid-cols-4 .card[style] {
        padding: 16px !important;
        text-align: center;
    }
    
    .grid-cols-4 .card h4,
    .tech-card-name,
    .card h4[style*="font-size: var(--font-size-lg)"] {
        font-size: 16px !important;
        margin-bottom: 4px !important;
    }
    
    .grid-cols-4 .card p,
    .tech-card-category,
    .card p[style*="font-size: var(--font-size-sm)"] {
        font-size: 13px !important;
    }
    
    /* Vorteile Section Cards */
    .section-alt-bg .card {
        padding: 20px !important;
    }
    
    .section-alt-bg .card-title,
    .section-alt-bg .card h3 {
        font-size: 18px !important;
        margin-bottom: 8px !important;
    }
    
    .section-alt-bg .card-description,
    .section-alt-bg .card p {
        font-size: 15px !important;
        line-height: 1.6 !important;
    }
    
    /* Section Titles auf Leistungsseite */
    .section .section-title,
    .section h2.section-title {
        font-size: 24px !important;
        line-height: 1.25 !important;
        margin-bottom: 16px !important;
        word-wrap: break-word !important;
    }
    
    /* Section background mit padding */
    .section[style*="background: var(--color-gray-50)"] {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    
    /* Container padding konsistent */
    .container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
}

/* ============================================
   MOBILE CARD ADJUSTMENTS - Mehr Platz & Breathing Room
   ============================================ */
@media (max-width: 767px) {
    .card {
        padding: var(--space-xl) var(--space-lg) !important;
        margin-bottom: var(--space-lg);
        border-radius: 16px !important;
    }
    
    .service-card,
    .process-step {
        padding: var(--space-xl) var(--space-lg) !important;
        margin-bottom: var(--space-md);
    }
    
    .card-icon {
        width: 56px;
        height: 56px;
        margin-bottom: var(--space-md);
    }
    
    .card-icon svg {
        width: 28px;
        height: 28px;
    }
    
    .card-title {
        font-size: 18px;
        margin-bottom: var(--space-sm);
    }
    
    .card-description {
        font-size: 15px;
        line-height: 1.65;
    }
    
    /* Card glass background fix */
    .card-glass {
        padding: var(--space-xl) var(--space-lg) !important;
        margin-bottom: var(--space-xl) !important;
    }
    
    /* Service detail cards */
    .service-detail {
        padding: var(--space-xl) var(--space-lg) !important;
        gap: var(--space-lg) !important;
    }
    
    .service-detail .service-icon {
        width: 56px !important;
        height: 56px !important;
    }
    
    .service-detail h3 {
        font-size: 20px !important;
    }
    
    .service-detail p {
        font-size: 15px !important;
        line-height: 1.65 !important;
    }
}

/* ============================================
   HORIZONTAL SCROLL PREVENTION
   ============================================ */
* {
    max-width: 100%;
}

pre, code {
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* ============================================
   MOBILE-OPTIMIZED HERO - Großzügiger & klarer
   ============================================ */
@media (max-width: 767px) {
    .hero {
        min-height: auto;
        padding: 100px 24px var(--space-3xl);
    }
    
    .hero-content {
        padding: 0;
        text-align: center;
    }
    
    .hero-subtitle {
        font-size: 16px;
        line-height: 1.7;
        margin-bottom: var(--space-xl);
        padding: 0;
    }
    
    .hero-benefits {
        flex-direction: column;
        gap: var(--space-sm);
        align-items: center;
        margin-bottom: var(--space-xl);
    }
    
    .hero-benefit {
        font-size: 14px;
        display: flex;
        align-items: center;
        gap: var(--space-sm);
        padding: 10px 18px;
        background: rgba(30, 93, 184, 0.1);
        border-radius: 100px;
        width: auto;
    }
    
    .hero-benefit svg {
        width: 18px;
        height: 18px;
        flex-shrink: 0;
    }
    
    .hero-cta {
        flex-direction: column;
        width: 100%;
        gap: var(--space-md);
        padding: 0;
    }
    
    .hero-cta .btn {
        width: 100%;
        padding: 18px 32px;
        font-size: 16px;
    }
    
    /* Hide tech lines on mobile for performance */
    .hero-tech-lines,
    .hero-particles {
        opacity: 0.15;
    }
}

/* ============================================
   MOBILE SERVICES GRID - Besseres Spacing
   ============================================ */
@media (max-width: 767px) {
    .services-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    
    .service-card {
        padding: 20px !important;
        text-align: center;
        margin-bottom: 0 !important;
    }
    
    .service-icon {
        width: 52px !important;
        height: 52px !important;
        margin: 0 auto 12px !important;
        border-radius: 14px !important;
    }
    
    .service-icon svg {
        width: 26px !important;
        height: 26px !important;
    }
    
    .service-title {
        font-size: 17px !important;
        margin-bottom: 8px !important;
        line-height: 1.3 !important;
    }
    
    .service-description {
        font-size: 14px !important;
        line-height: 1.6 !important;
    }
}

/* ============================================
   MOBILE DIFFERENTIATORS - Klarer & großzügiger
   ============================================ */
@media (max-width: 767px) {
    .differentiators-section {
        padding: 48px 16px !important;
    }
    
    .differentiators-content {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    .differentiators-list {
        order: 1;
    }
    
    .differentiators-image {
        order: 2;
    }
    
    .differentiator-item {
        padding: 14px 16px !important;
        gap: 12px !important;
        margin-bottom: 8px !important;
        background: rgba(30, 93, 184, 0.05);
        border-radius: 12px;
    }
    
    .differentiator-icon {
        width: 24px;
        height: 24px;
        flex-shrink: 0;
    }
    
    .differentiator-icon svg {
        width: 16px;
        height: 16px;
    }
    
    .differentiator-text {
        font-size: 15px;
        line-height: 1.5;
    }
    
    .differentiators-badge {
        padding: var(--space-xl);
        font-size: 18px;
        text-align: center;
    }
}

/* ============================================
   MOBILE PROCESS STEPS - Großzügiger
   ============================================ */
@media (max-width: 767px) {
    .process-steps {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .process-step {
        padding: 16px !important;
        text-align: left;
        display: flex;
        align-items: flex-start;
        gap: 12px;
    }
    
    .process-number {
        font-size: 28px;
        margin-bottom: 0;
        min-width: 28px;
        line-height: 1;
    }
    
    .process-number::after {
        display: none;
    }
    
    .process-title {
        font-size: 16px;
        margin-bottom: 6px;
        line-height: 1.3;
    }
    
    .process-description {
        font-size: 14px;
        line-height: 1.55;
    }

    .process-content {
        flex: 1;
        min-width: 0;
    }
}

/* ============================================
   MOBILE CTA SECTION - Großzügig & klar
   ============================================ */
@media (max-width: 767px) {
    .cta-section {
        padding: var(--space-3xl) 24px;
    }
    
    .cta-eyebrow {
        font-size: 11px;
        margin-bottom: var(--space-sm);
    }
    
    .cta-headline {
        font-size: 24px !important;
        line-height: 1.25;
        margin-bottom: var(--space-md);
    }
    
    .cta-description {
        font-size: 16px;
        line-height: 1.65;
        margin-bottom: var(--space-xl);
    }
    
    .cta-description br {
        display: none;
    }
}

/* ============================================
   MOBILE FORMS - Großzügigeres Spacing
   ============================================ */
@media (max-width: 767px) {
    .form-group {
        margin-bottom: var(--space-md);
    }
    
    .form-label {
        font-size: 15px;
        margin-bottom: var(--space-xs);
    }
    
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"],
    input[type="url"],
    input[type="number"],
    input[type="date"],
    select,
    textarea {
        width: 100% !important;
        padding: 14px 16px;
        font-size: 16px;
        border-radius: 12px;
    }
    
    textarea {
        min-height: 120px;
    }
    
    /* Submit Button */
    input[type="submit"],
    button[type="submit"] {
        width: 100%;
        padding: 16px 24px;
        font-size: 16px;
    }
}

/* ============================================
   MOBILE BLOG CARDS
   ============================================ */
@media (max-width: 767px) {
    .card[style*="overflow: hidden"] > div[style*="height: 240px"] {
        height: 180px !important;
    }
    
    .card[style*="overflow: hidden"] > div[style*="padding"] {
        padding: var(--space-lg) !important;
    }
}

/* ============================================
   MOBILE CONTACT PAGE
   ============================================ */
@media (max-width: 767px) {
    /* Contact cards */
    .card > div[style*="display: flex"][style*="align-items: start"] {
        flex-direction: column;
        gap: var(--space-md) !important;
    }
    
    .card > div[style*="display: flex"] .card-icon {
        margin: 0 !important;
    }
}

/* ============================================
   MOBILE LEISTUNGEN PAGE
   ============================================ */
@media (max-width: 767px) {
    /* Override inline grid styles */
    [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    
    /* Service detail section */
    [style*="display: grid"][style*="gap: var(--space-2xl)"] {
        gap: var(--space-lg) !important;
    }
}

/* ============================================
   MOBILE FOOTER - Klarer
   ============================================ */
@media (max-width: 767px) {
    .footer {
        padding: var(--space-lg) 0;
    }
    
    .footer-minimal {
        padding: var(--space-md) 0;
    }
    
    .footer-content {
        flex-direction: column;
        gap: var(--space-lg);
    }
    
    .footer-links {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-simple {
        flex-wrap: wrap;
        gap: var(--space-xs);
        justify-content: center;
        padding: 0 var(--space-md);
    }
    
    .footer-simple a,
    .footer-cookie-btn {
        font-size: 14px;
        padding: var(--space-xs) var(--space-sm);
    }
    
    .footer-divider {
        display: none;
    }
}

/* ============================================
   MOBILE REVIEWS SECTION - Klarer & größer
   ============================================ */
@media (max-width: 767px) {
    .reviews-section {
        padding: var(--space-3xl) 24px;
    }
    
    .google-rating-badge {
        flex-direction: column;
        gap: var(--space-sm);
        padding: var(--space-lg);
        text-align: center;
    }
    
    .rating-content {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--space-xs);
    }
    
    .reviews-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .review-card {
        padding: var(--space-lg);
    }
    
    .review-text {
        font-size: 15px;
        line-height: 1.65;
    }
    
    .review-author-avatar {
        width: 44px;
        height: 44px;
    }
    
    .review-author-name {
        font-size: 15px;
    }
    
    .reviews-empty {
        padding: var(--space-xl);
    }
    
    .reviews-empty-title {
        font-size: 18px;
    }
    
    .reviews-empty-text {
        font-size: 15px;
        line-height: 1.6;
    }
}

/* ============================================
   SAFE AREAS (iPhone X+)
   ============================================ */
@supports (padding: max(0px)) {
    body {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    .navigation {
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
    }
    
    .footer {
        padding-bottom: max(var(--space-lg), env(safe-area-inset-bottom));
    }
    
    /* Cookie consent safe area */
    .cookie-container {
        padding-bottom: max(var(--space-lg), env(safe-area-inset-bottom));
    }
}

/* ============================================
   LANDSCAPE MOBILE ADJUSTMENTS
   ============================================ */
@media (max-width: 767px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
    }
    
    .section {
        padding-top: var(--space-2xl);
        padding-bottom: var(--space-2xl);
    }
}

/* ============================================
   ACCESSIBILITY - FOCUS INDICATORS & IMPROVEMENTS
   ============================================ */
*:focus-visible {
    outline: 2px solid var(--color-primary-base);
    outline-offset: 3px;
}

/* Remove default focus for mouse users */
*:focus:not(:focus-visible) {
    outline: none;
}

/* Better touch targets */
@media (max-width: 767px) {
    /* Ensure all interactive elements are at least 44px */
    a, button, .btn, 
    input[type="submit"], 
    input[type="button"],
    input[type="checkbox"],
    input[type="radio"],
    select {
        min-height: 44px;
    }
    
    /* Better form element sizing */
    input[type="checkbox"],
    input[type="radio"] {
        width: 22px;
        height: 22px;
    }
    
    /* Skip link for keyboard navigation */
    .skip-link {
        position: absolute;
        top: -40px;
        left: 0;
        background: var(--color-primary-base);
        color: white;
        padding: 8px 16px;
        z-index: 10001;
        transition: top 0.3s;
    }
    
    .skip-link:focus {
        top: 0;
    }
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .hero-tech-lines,
    .hero-particles,
    .tech-line,
    .particle {
        display: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --color-primary-base: #0052CC;
        --color-text-primary: #000000;
        --color-text-secondary: #333333;
    }
    
    [data-theme="dark"] {
        --color-text-primary: #ffffff;
        --color-text-secondary: #eeeeee;
    }
    
    .btn {
        border-width: 2px;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .navigation,
    .hero-tech-lines,
    .hero-particles,
    .footer,
    .btn {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    h1 {
        font-size: 24pt;
    }
    
    h2 {
        font-size: 20pt;
    }
    
    a {
        text-decoration: underline;
        color: #000;
    }
}

/* ============================================
   IPHONE 14 / MODERN SMARTPHONES (430px)
   Optimiert für 9:16 Hochformat
   ============================================ */
@media (max-width: 430px) {
    /* Container padding */
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    /* Typography - gut lesbar im Hochformat */
    .hero-title {
        font-size: 26px !important;
        line-height: 1.2 !important;
    }
    
    .hero-subtitle {
        font-size: 15px !important;
        line-height: 1.6 !important;
    }
    
    .section-title {
        font-size: 22px !important;
        line-height: 1.25 !important;
    }
    
    .section-subtitle {
        font-size: 15px !important;
        line-height: 1.6 !important;
    }
    
    /* Buttons - gut tappbar */
    .btn {
        padding: 14px 24px !important;
        font-size: 15px !important;
        border-radius: 12px !important;
    }
    
    .btn-lg {
        padding: 16px 28px !important;
        font-size: 16px !important;
    }
    
    /* Cards - kompakt aber lesbar */
    .card {
        padding: 18px !important;
        border-radius: 14px !important;
    }
    
    .service-card {
        padding: 18px !important;
    }
    
    .service-title {
        font-size: 16px !important;
    }
    
    .service-description {
        font-size: 14px !important;
        line-height: 1.55 !important;
    }
    
    .process-step {
        padding: 18px !important;
    }
    
    /* Icons - proportional */
    .service-icon {
        width: 52px !important;
        height: 52px !important;
    }
    
    .service-icon svg {
        width: 26px !important;
        height: 26px !important;
    }
    
    .card-icon {
        width: 48px !important;
        height: 48px !important;
    }
    
    .card-icon svg {
        width: 24px !important;
        height: 24px !important;
    }
    
    /* Process numbers */
    .process-number {
        font-size: 32px !important;
    }
    
    /* Spacing */
    .section {
        padding: var(--space-2xl) 0 !important;
    }
    
    .services-section,
    .differentiators-section,
    .process-section,
    .reviews-section {
        padding: var(--space-2xl) 20px !important;
    }
    
    /* Hero section */
    .hero {
        padding: 90px 20px var(--space-2xl) !important;
        min-height: auto !important;
    }
    
    .hero-content {
        padding: 0 !important;
    }
    
    .hero-benefits {
        gap: 8px !important;
    }
    
    .hero-benefit {
        font-size: 13px !important;
        padding: 8px 14px !important;
    }
    
    /* Eyebrows */
    .hero-eyebrow,
    .section-eyebrow {
        font-size: 10px !important;
        letter-spacing: 1.2px !important;
        padding: 6px 12px !important;
    }
    
    /* Differentiators */
    .differentiator-item {
        padding: 12px 14px !important;
    }
    
    .differentiator-text {
        font-size: 14px !important;
    }
    
    .differentiators-badge {
        padding: var(--space-lg) !important;
        font-size: 17px !important;
    }
    
    /* Reviews */
    .review-card {
        padding: var(--space-md) !important;
    }
    
    .review-text {
        font-size: 14px !important;
        line-height: 1.6 !important;
    }
    
    .reviews-empty {
        padding: var(--space-lg) !important;
    }
    
    /* CTA */
    .cta-headline {
        font-size: 21px !important;
    }
    
    .cta-description {
        font-size: 15px !important;
    }
    
    /* Footer */
    .footer-simple {
        gap: 6px !important;
    }
    
    .footer-simple a,
    .footer-cookie-btn {
        font-size: 13px !important;
        padding: 6px 10px !important;
    }
    
    /* Logo */
    .nav-logo-img {
        height: 42px !important;
        width: 42px !important;
    }
    
    .nav-logo span {
        font-size: 16px !important;
    }
}

/* ============================================
   EXTRA SMALL DEVICES (iPhone SE, etc) - 375px
   Optimiert für 9:16 Hochformat
   ============================================ */
@media (max-width: 375px) {
    .container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    
    .hero-title {
        font-size: 24px !important;
    }
    
    .section-title {
        font-size: 20px !important;
    }
    
    .btn {
        padding: 12px 20px !important;
        font-size: 14px !important;
    }
    
    .btn-lg {
        padding: 14px 24px !important;
        font-size: 15px !important;
    }
    
    .hero-benefits {
        gap: 6px !important;
    }
    
    .hero-benefit {
        font-size: 12px !important;
        padding: 6px 12px !important;
    }
    
    .differentiators-badge {
        font-size: 15px !important;
    }
    
    .nav-logo-img {
        height: 38px !important;
        width: 38px !important;
    }
    
    .nav-logo span {
        font-size: 14px !important;
    }
    
    .service-icon {
        width: 48px !important;
        height: 48px !important;
    }
    
    .service-icon svg {
        width: 24px !important;
        height: 24px !important;
    }
    
    .card-title,
    .service-title,
    .process-title {
        font-size: 16px !important;
    }
    
    .card-description,
    .service-description,
    .process-description {
        font-size: 14px !important;
    }
    
    .process-number {
        font-size: 28px !important;
    }
    
    .cta-headline {
        font-size: 19px !important;
    }
    
    /* Service Detail auf kleinen Geräten */
    .service-detail {
        padding: 16px !important;
    }
    
    .service-detail h3 {
        font-size: 18px !important;
    }
    
    .service-detail p {
        font-size: 14px !important;
    }
    
    /* Grid Cards */
    .grid .card,
    .grid-cols-3 .card,
    .grid-cols-4 .card {
        padding: 16px !important;
    }
}

/* ============================================
   EXTRA SMALL DEVICES - 360px
   Optimiert für sehr schmale Smartphones
   ============================================ */
@media (max-width: 360px) {
    .container {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }
    
    .hero-title {
        font-size: 22px !important;
        line-height: 1.2 !important;
    }
    
    .section-title {
        font-size: 19px !important;
    }
    
    .btn {
        padding: 11px 18px !important;
        font-size: 13px !important;
    }
    
    .btn-lg {
        padding: 12px 20px !important;
        font-size: 14px !important;
    }
    
    .services-grid,
    .grid,
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        gap: 14px !important;
    }
    
    .service-card,
    .card,
    .process-step {
        padding: 16px !important;
    }

    .process-step {
        gap: 10px !important;
    }

    .process-number {
        font-size: 24px !important;
        min-width: 24px !important;
    }
    
    .service-title,
    .card-title,
    .process-title {
        font-size: 15px !important;
    }
    
    .service-description,
    .card-description,
    .process-description {
        font-size: 13px !important;
        line-height: 1.55 !important;
    }
    
    .service-icon {
        width: 44px !important;
        height: 44px !important;
    }
    
    .service-icon svg {
        width: 22px !important;
        height: 22px !important;
    }
    
    .nav-logo-img {
        height: 36px !important;
        width: 36px !important;
    }
    
    .nav-logo span {
        font-size: 13px !important;
    }
    
    .service-detail {
        padding: 14px !important;
    }
    
    .service-detail h3 {
        font-size: 17px !important;
    }
    
    .service-detail p {
        font-size: 13px !important;
    }
}

/* ============================================
   ULTRA SMALL DEVICES - 320px
   Minimale, aber lesbare Größen
   ============================================ */
@media (max-width: 320px) {
    .container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    
    .hero-title {
        font-size: 20px !important;
    }
    
    .section-title {
        font-size: 18px !important;
    }
    
    .btn {
        padding: 10px 16px !important;
        font-size: 12px !important;
    }
    
    .btn-lg {
        padding: 12px 18px !important;
        font-size: 13px !important;
    }
    
    .service-card,
    .card,
    .process-step {
        padding: 14px !important;
    }

    .process-step {
        gap: 8px !important;
    }

    .process-number {
        font-size: 22px !important;
        min-width: 22px !important;
    }
    
    .service-title,
    .card-title,
    .process-title {
        font-size: 14px !important;
    }
    
    .service-description,
    .card-description,
    .process-description {
        font-size: 13px !important;
        line-height: 1.5 !important;
    }
    
    .service-icon {
        width: 40px !important;
        height: 40px !important;
    }
    
    .service-icon svg {
        width: 20px !important;
        height: 20px !important;
    }
    
    .nav-logo-img {
        height: 34px !important;
        width: 34px !important;
    }
    
    .nav-logo span {
        font-size: 12px !important;
    }
    
    .service-detail {
        padding: 12px !important;
    }
    
    .service-detail h3 {
        font-size: 16px !important;
    }
    
    .service-detail p {
        font-size: 13px !important;
    }
}

/* ============================================
   LEGAL PAGES (Impressum, Datenschutz, AGB)
   ============================================ */
@media (max-width: 767px) {
    /* Legal page sections with padding-top override */
    .section[style*="padding-top: var(--space-5xl)"] {
        padding-top: calc(80px + var(--space-lg)) !important;
    }
    
    /* Legal page headings */
    h1[style*="font-size: var(--font-size-4xl)"] {
        font-size: 22px !important;
        line-height: 1.25 !important;
        margin-bottom: var(--space-md) !important;
    }
    
    h2[style*="font-size: var(--font-size-2xl)"] {
        font-size: 18px !important;
        line-height: 1.3 !important;
        margin-bottom: var(--space-sm) !important;
    }
    
    h3[style*="font-size: var(--font-size-lg)"] {
        font-size: 16px !important;
    }
    
    /* Legal page cards */
    .card[style*="margin-bottom: var(--space-xl)"] {
        padding: var(--space-lg) !important;
    }
    
    /* Legal page max-width container */
    [style*="max-width: 800px"],
    [style*="max-width: 900px"] {
        max-width: 100% !important;
        padding: 0 !important;
    }
    
    /* Legal page paragraphs */
    .section p {
        font-size: 15px;
        line-height: 1.7;
    }
}

/* ============================================
   SUBPAGE HERO SECTIONS
   ============================================ */
@media (max-width: 767px) {
    /* Hero with min-height override */
    .hero[style*="min-height: 50vh"],
    .hero[style*="min-height: 60vh"] {
        min-height: auto !important;
        padding: 100px 24px var(--space-xl) !important;
    }
    
    /* Subpage hero title */
    .hero[style*="min-height"] .hero-title {
        font-size: 24px !important;
        line-height: 1.25 !important;
    }
    
    /* Subpage hero title line breaks */
    .hero[style*="min-height"] .hero-title br {
        display: none;
    }
    
    /* Subpage hero subtitle */
    .hero[style*="min-height"] .hero-subtitle {
        font-size: 15px !important;
        line-height: 1.6 !important;
    }
}

/* ============================================
   INLINE GRID OVERRIDES FOR MOBILE
   ============================================ */
@media (max-width: 767px) {
    /* Override all inline grid-template-columns */
    [style*="grid-template-columns: repeat(2"],
    [style*="grid-template-columns: repeat(3"],
    [style*="grid-template-columns: repeat(4"],
    [style*="grid-template-columns: 1fr 1fr"] {
        display: block !important;
    }
    
    [style*="grid-template-columns: repeat(2"] > *,
    [style*="grid-template-columns: repeat(3"] > *,
    [style*="grid-template-columns: repeat(4"] > *,
    [style*="grid-template-columns: 1fr 1fr"] > * {
        margin-bottom: var(--space-md);
    }
    
    /* Gap overrides */
    [style*="gap: var(--space-3xl)"],
    [style*="gap: var(--space-2xl)"] {
        gap: var(--space-lg) !important;
    }
    
    /* Flex direction override for mobile */
    [style*="display: flex"][style*="gap"] {
        flex-wrap: wrap;
    }
    
    /* Flex row with gap should stack on mobile */
    .hero-cta[style*="display: flex"],
    [style*="display: flex"][style*="justify-content: center"][style*="flex-wrap"] {
        flex-direction: column;
        width: 100%;
    }
}

/* ============================================
   TECH STACK LISTS (Über uns page)
   ============================================ */
@media (max-width: 767px) {
    /* Tech stack grid */
    .grid-cols-2[style*="gap: var(--space-lg)"] {
        display: block !important;
    }
    
    .grid-cols-2[style*="gap: var(--space-lg)"] > div {
        margin-bottom: var(--space-lg);
    }
    
    /* List items */
    ul[style*="list-style: none"] li {
        font-size: var(--font-size-sm);
        margin-bottom: var(--space-xs) !important;
    }
}

/* ============================================
   LEISTUNGEN PAGE - SERVICE DETAILS - AGGRESSIVE MOBILE FIX
   ============================================ */
@media (max-width: 767px) {
    /* Service detail main container - überschreibe alle inline styles */
    .service-detail {
        display: block !important;
        grid-template-columns: 1fr !important;
        padding: 20px !important;
        margin-bottom: 24px !important;
        gap: 16px !important;
    }
    
    .service-detail.card-glass {
        padding: 20px !important;
        margin-bottom: 24px !important;
    }
    
    /* Service detail icon */
    .service-detail .service-icon {
        width: 56px !important;
        height: 56px !important;
        margin: 0 0 16px 0 !important;
    }
    
    .service-detail .service-icon svg {
        width: 28px !important;
        height: 28px !important;
    }
    
    /* Service detail headings - alle Varianten abfangen */
    .service-detail h3 {
        font-size: 20px !important;
        line-height: 1.3 !important;
        margin-bottom: 12px !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
    }
    
    .service-detail h3[style] {
        font-size: 20px !important;
        line-height: 1.3 !important;
        margin-bottom: 12px !important;
    }
    
    /* Service detail text - alle Varianten abfangen */
    .service-detail p {
        font-size: 15px !important;
        line-height: 1.6 !important;
        margin-bottom: 12px !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
    
    .service-detail p[style] {
        font-size: 15px !important;
        line-height: 1.6 !important;
        margin-bottom: 12px !important;
    }
    
    /* Hide icon box visual placeholder on mobile - Platz sparen */
    .service-detail > div:last-child .card-glass,
    .service-detail .card-glass[style*="min-height"] {
        display: none !important;
    }
    
    /* Service detail icon box - falls sichtbar */
    .service-detail .badge-icon-box {
        width: 64px !important;
        height: 64px !important;
        border-radius: 12px !important;
    }
    
    .service-detail .badge-icon-box svg {
        width: 32px !important;
        height: 32px !important;
    }
    
    /* Force single column */
    .service-detail[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
    
    .service-detail > div {
        order: 0 !important;
    }
}

@media (max-width: 767px) {
    /* Kontakt Cards - bessere Zentrierung */
    .section-alt-bg .card {
        padding: 20px !important;
        text-align: center;
    }
    
    .section-alt-bg .card > div[style*="display: flex"] {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center;
    }
    
    .section-alt-bg .card-icon {
        margin: 0 auto 12px !important;
    }
    
    .section-alt-bg .card h3 {
        text-align: center;
        font-size: 17px !important;
        margin-bottom: 8px !important;
    }
    
    .section-alt-bg .text-body {
        text-align: center;
        font-size: 15px !important;
    }
    
    .section-alt-bg .text-primary {
        display: block;
        text-align: center;
        font-size: 15px !important;
        margin-top: 6px;
    }
    
    .section-alt-bg .grid-cols-2 {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}

/* ============================================
   KONTAKT PAGE - MOBILE OPTIMIERUNG
   ============================================ */
@media (max-width: 767px) {
    /* Contact cards layout */
    .card > div[style*="display: flex"][style*="align-items: start"][style*="gap"] {
        flex-direction: column !important;
        text-align: center;
    }
    
    .card > div[style*="display: flex"][style*="align-items: start"] .card-icon {
        margin: 0 auto var(--space-md) !important;
    }
    
    /* Contact info */
    .card h3 {
        text-align: center;
    }
    
    .card p[style*="font-size: var(--font-size-lg)"] {
        font-size: 16px !important;
        text-align: center;
    }
}

/* ============================================
   BLOG PAGE
   ============================================ */
@media (max-width: 767px) {
    /* Blog card images */
    .card[style*="overflow: hidden"] > div[style*="height: 240px"] {
        height: 200px !important;
    }
    
    /* Blog card content */
    .card[style*="overflow: hidden"] > div[style*="padding: var(--space-2xl)"] {
        padding: var(--space-xl) !important;
    }
    
    /* Blog card title */
    .card h3[style*="font-size: var(--font-size-2xl)"] {
        font-size: 20px !important;
        line-height: 1.3 !important;
    }
    
    /* Blog card description */
    .card p[style*="line-height: var(--line-height-relaxed)"] {
        font-size: 15px !important;
        line-height: 1.6 !important;
    }
}

/* ============================================
   PROJEKT-ANFRAGEN PAGE
   ============================================ */
@media (max-width: 767px) {
    /* Form container */
    .card[style*="padding: var(--space-3xl)"] {
        padding: var(--space-xl) !important;
    }
    
    /* Form sections grid */
    [style*="display: grid"][style*="grid-template-columns: 1fr 1fr"] {
        display: block !important;
    }
    
    [style*="display: grid"][style*="grid-template-columns: 1fr 1fr"] > div {
        margin-bottom: var(--space-lg);
    }
    
    /* Radio/Checkbox groups */
    .form-group label[style*="display: flex"][style*="align-items: center"] {
        padding: var(--space-md) !important;
        margin-bottom: var(--space-sm);
    }
}

/* ============================================
   ULTIMATE MOBILE OVERRIDE - LEISTUNGSSEITE
   Überschreibt ALLE inline styles aggressiv
   ============================================ */
@media (max-width: 767px) {
    /* Service Detail komplett überschreiben */
    .service-detail[style],
    div.service-detail[style*="display: grid"],
    div.service-detail[style*="grid-template-columns"],
    div.service-detail.card-glass[style] {
        display: block !important;
        grid-template-columns: unset !important;
        padding: 20px !important;
        gap: 0 !important;
    }
    
    /* Alle inline h3 in service-detail */
    .service-detail h3[style*="font-size"],
    .service-detail h3[style*="margin"],
    .service-detail h3[style] {
        font-size: 20px !important;
        line-height: 1.3 !important;
        margin-bottom: 12px !important;
    }
    
    /* Alle inline p in service-detail */
    .service-detail p[style*="font-size"],
    .service-detail p[style*="margin"],
    .service-detail p[style*="line-height"],
    .service-detail p[style] {
        font-size: 15px !important;
        line-height: 1.6 !important;
        margin-bottom: 12px !important;
    }
    
    /* Service icon in detail */
    .service-detail .service-icon[style],
    .service-detail div.service-icon[style] {
        width: 56px !important;
        height: 56px !important;
        margin: 0 0 16px 0 !important;
    }
    
    /* Verstecke die Icon-Box Card auf mobil */
    .service-detail > div:nth-child(2) > .card-glass,
    .service-detail > div > .card-glass[style*="min-height"],
    .service-detail .card-glass[style*="text-align: center"][style*="min-height"] {
        display: none !important;
    }
    
    /* Order reset */
    .service-detail > div[style*="order"] {
        order: unset !important;
    }
    
    /* Card inline styles override */
    .card[style*="padding: var(--space-xl)"],
    .card[style*="padding: var(--space-2xl)"],
    .card[style*="padding: var(--space-3xl)"] {
        padding: 20px !important;
    }
    
    /* Tech cards */
    .card[style*="text-align: center"][style*="padding: var(--space-xl)"] {
        padding: 16px !important;
    }
    
    .card h4[style*="font-size: var(--font-size-lg)"] {
        font-size: 16px !important;
    }
    
    .card p[style*="font-size: var(--font-size-sm)"] {
        font-size: 13px !important;
    }
    
    /* Word break für lange Texte */
    .service-detail h3,
    .service-detail p,
    .card-title,
    .card-description,
    .service-title,
    .service-description {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
    }
}
