/**
 * Responsive & Cross-Browser CSS Optimierungen
 * Fleet Data Theme - Optimiert f�r alle Ger�te und Browser
 * Breakpoints: Mobile (<768px), Tablet (768px-1024px), Desktop (>1024px)
 */

/* ============================================
   GLOBALE RESPONSIVE ANPASSUNGEN
   ============================================ */

/* Basis f�r alle Ger�te */
* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

body {
    overflow-x: hidden;
    width: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* ============================================
   HEADER - RESPONSIVE
   ============================================ */

@media (min-width: 1024px) {
    .header-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem 2rem;
        min-height: 175px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .header {
        min-height: 100px !important;
    }

    .header-content {
        min-height: 100px;
        padding: 0.5rem 1rem;
    }

    .logo {
        position: static !important;
        transform: none !important;
        left: auto !important;
        padding: 0.5rem;
        max-width: 400px;
    }

    .mobile-menu {
        top: 100px;
    }
}

@media (max-width: 767px) {
    .header {
        min-height: 80px !important;
    }

    .header-content {
        min-height: 80px !important;
        padding: 0.25rem !important;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .logo {
        position: static !important;
        transform: none !important;
        left: auto !important;
        padding: 0 !important;
        max-width: 250px;
        flex: 1;
    }

    .mobile-menu {
        top: 80px;
        height: calc(100vh - 80px);
    }
}

/* ============================================
   CONTENT SECTIONS
   ============================================ */

@media (max-width: 1023px) {
    .light-cta-section {
        padding: 6rem 1rem 4rem !important;
    }

    .light-cta-section h1 {
        font-size: 2rem !important;
    }

    .light-cta-section p {
        font-size: 1.1rem !important;
    }

    .light-cta-box {
        padding: 2rem !important;
    }
}

@media (max-width: 767px) {
    .light-cta-section {
        padding: 5rem 1rem 3rem !important;
    }

    .light-cta-section h1 {
        font-size: 1.6rem !important;
        margin-bottom: 20px !important;
    }

    .light-cta-section p {
        font-size: 1rem !important;
        line-height: 1.6;
    }

    .light-cta-box {
        padding: 1.5rem !important;
        margin: 0 0.5rem;
    }

    .light-cta-title {
        font-size: 1.5rem !important;
    }

    .light-cta-features {
        font-size: 0.9rem !important;
    }

    .light-cta-button {
        font-size: 1rem !important;
        padding: 0.8rem 1.5rem !important;
    }
}

/* Trust Grid */
@media (min-width: 768px) {
    .trust-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 767px) {
    .trust-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .trust-card {
        padding: 1.5rem !important;
    }

    .trust-card h3 {
        font-size: 1.2rem !important;
    }
}

/* Path Cards */
@media (min-width: 1024px) {
    .cards-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .cards-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .path-card:last-child {
        grid-column: 1 / -1;
        max-width: 50%;
        margin: 0 auto;
    }
}

@media (max-width: 767px) {
    .cards-grid {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    .path-card {
        width: 100%;
    }
}

/* ============================================
   TYPOGRAPHY RESPONSIVE
   ============================================ */

@media (max-width: 1023px) {
    body {
        font-size: 18px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.35rem;
    }
}

@media (max-width: 767px) {
    body {
        font-size: 18px;
    }

    h1 {
        font-size: 1.6rem;
        line-height: 1.2;
    }

    h2 {
        font-size: 1.4rem;
        line-height: 1.3;
    }

    h3 {
        font-size: 1.2rem;
        line-height: 1.3;
    }

    p {
        line-height: 1.6;
    }
}

/* ============================================
   SEARCH OVERLAY - RESPONSIVE
   ============================================ */

.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 62, 80, 0.95);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.search-overlay.active {
    justify-content: flex-end !important;
    padding-right: 5% !important;
    display: flex;
}

.search-overlay-content {
    width: 480px !important; margin-left: auto !important;
    max-width: 600px;
    background: rgba(44, 62, 80, 0.98) !important;
    border-radius: 12px;
    padding: 2rem;
    position: relative;
}

.search-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-dark, #1A252F);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.search-close:hover {
    transform: scale(1.1);
}

.search-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.search-input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 2px solid var(--border-color, rgba(44, 62, 80, 0.15));
    border-radius: 8px;
    font-size: 1rem;
}

.search-submit {
    padding: 0.8rem 1.5rem;
    background: var(--accent-teal, #178687);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-suggestions {
    margin-top: 1rem;
}

.suggestions-title {
    color: var(--text-dark, #1A252F);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.suggestion-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.suggestion-tag {
    padding: 0.5rem 1rem;
    background: var(--primary-blue, #2C3E50);
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.suggestion-tag:hover {
    background: var(--accent-teal, #178687);
}

@media (max-width: 767px) {
    .search-overlay {
        padding: 1rem;
    }

    .search-overlay-content {
        padding: 1.5rem;
        max-width: 100%;
    }

    .search-form {
        flex-direction: column;
    }

    .search-input {
        width: 100%;
        font-size: 16px;
    }

    .search-submit {
        width: 100%;
        padding: 0.8rem;
    }

    .suggestion-tag {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
}

/* ============================================
   FOOTER RESPONSIVE
   ============================================ */

@media (min-width: 768px) {
    .footer-content {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 767px) {
    .footer-content {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    .footer-section {
        width: 100%;
        text-align: center;
    }
}

/* ============================================
   FORMS & BUTTONS RESPONSIVE
   ============================================ */

@media (max-width: 767px) {
    .btn {
        width: 100%;
        text-align: center;
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    .form-row {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .form-group {
        width: 100%;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea,
    select {
        width: 100%;
        font-size: 16px;
        padding: 0.8rem;
    }
}

/* ============================================
   CROSS-BROWSER COMPATIBILITY
   ============================================ */

.flex-container {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
}

@supports not (display: grid) {
    .trust-grid,
    .cards-grid,
    .footer-content {
        display: block;
    }

    .trust-grid > *,
    .cards-grid > *,
    .footer-content > * {
        margin-bottom: 2rem;
    }
}

/* ============================================
   TOUCH OPTIMIERUNGEN
   ============================================ */

@media (max-width: 767px) {
    a,
    button {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        min-height: 44px;
        min-width: 44px;
    }

    .mobile-menu,
    .search-overlay {
        -webkit-overflow-scrolling: touch;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--accent-teal, #178687);
    outline-offset: 2px;
}

@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;
    }
}

/* ============================================
   LESBARKEIT: HELLE HINTERGRÜNDE
   ============================================ */

/* WordPress-Blöcke mit weißem Hintergrund - dunkler Text für Lesbarkeit */
.has-white-background-color,
.has-white-background-color p,
.has-white-background-color h1,
.has-white-background-color h2,
.has-white-background-color h3,
.has-white-background-color h4,
.has-white-background-color h5,
.has-white-background-color h6,
.has-white-background-color li,
.has-white-background-color span,
.has-white-background-color strong,
.has-white-background-color em {
    color: #2C3E50 !important;
}

/* Sicherstellen dass Links in weißen Boxen sichtbar sind */
.has-white-background-color a {
    color: #178687 !important;
}

.has-white-background-color a:hover {
    color: #147273 !important;
}

/* WordPress-Blöcke mit light-gray Hintergrund - dunkler Text für Lesbarkeit */
.has-light-gray-background-color,
.has-light-gray-background-color p,
.has-light-gray-background-color h1,
.has-light-gray-background-color h2,
.has-light-gray-background-color h3,
.has-light-gray-background-color h4,
.has-light-gray-background-color h5,
.has-light-gray-background-color h6,
.has-light-gray-background-color li,
.has-light-gray-background-color span,
.has-light-gray-background-color strong,
.has-light-gray-background-color em {
    color: #2C3E50 !important;
}

.has-light-gray-background-color a {
    color: #178687 !important;
}

.has-light-gray-background-color a:hover {
    color: #147273 !important;
}

/* ============================================
   TEAM CARDS - EINHEITLICHE BILDGRÖSSEN
   ============================================ */

/* ============================================
   TEAM CARDS - 100% SYMMETRISCH & PROFESSIONELL
   ============================================ */

/* Alle Team-Cards haben gleiche Größe */
.team-card {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

/* Alle Team-Bilder - EXAKT GLEICHE GRÖSSE */
.team-card-image,
figure.team-card-image,
.wp-block-image.team-card-image {
    width: 100% !important;
    max-width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    overflow: hidden !important;
    background: rgba(26, 37, 47, 0.4);
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* WordPress Standard-Bildgrößen überschreiben */
.team-card-image.size-large,
.team-card-image.size-medium,
.team-card-image.size-full,
figure.team-card-image.size-large,
figure.team-card-image.size-medium,
figure.team-card-image.size-full {
    width: 100% !important;
    max-width: 100% !important;
    aspect-ratio: 1 / 1 !important;
}

/* ALLE Bilder - 100% symmetrisch, gleiche Größe */
.team-card-image img,
figure.team-card-image img,
.wp-block-image.team-card-image img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center center !important;
    transition: transform 0.4s ease;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Team-Card Content - einheitliche Abstände */
.team-card-content {
    padding: 1.5rem !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

/* ALLE Namen - gleiche Schrift */
.team-card-name {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    margin-bottom: 0.5rem !important;
    line-height: 1.2 !important;
}

/* ALLE Rollen - gleiche Schrift */
.team-card-role {
    font-size: 1rem !important;
    font-weight: 500 !important;
    color: #178687 !important;
    margin-bottom: 1rem !important;
    line-height: 1.4 !important;
}

/* ALLE Beschreibungen - gleiche Schrift */
.team-card-description {
    font-size: 0.95rem !important;
    font-weight: 400 !important;
    color: #B0BEC5 !important;
    line-height: 1.6 !important;
    margin: 0 !important;
}

/* Ayşe Demir - gesamte Card kleiner (32%) */
.team-card:has(img[alt="Ayşe Demir"]) {
    max-width: 32% !important;
    margin: 0 auto !important;
}

/* Ayşe Demir - Schriftgrößen EXAKT wie andere */
.team-card:has(img[alt="Ayşe Demir"]) .team-card-name {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    margin-bottom: 0.5rem !important;
    line-height: 1.2 !important;
}

.team-card:has(img[alt="Ayşe Demir"]) .team-card-role {
    font-size: 1rem !important;
    font-weight: 500 !important;
    color: #178687 !important;
    margin-bottom: 1rem !important;
    line-height: 1.4 !important;
}

.team-card:has(img[alt="Ayşe Demir"]) .team-card-description {
    font-size: 0.95rem !important;
    font-weight: 400 !important;
    color: #B0BEC5 !important;
    line-height: 1.6 !important;
    margin: 0 !important;
}
