/* ===================================================================
   FLYATIVE - STREAMLINED & REUSABLE STYLESHEET (LIGHT THEME)
   =================================================================== */

/* --- 1. CSS VARIABLES --- */
:root {
    --bg-body: #f4f8fb;       /* Soft airy sky tint for the main body */
    --bg-services: #ffffff;   /* Clean white card / section contrast */
    --bg-projects: #ebf3f9;   /* Pale, sunny light blue-grey */
    --bg-about: #f7f9fc;      /* Bright, neutral clean off-white */
    --bg-footer: #e1ebf3;     /* Soft matching footer tone */
    
    --card-bg: #ffffff;
    --border-color: #d2e3f3;  /* Subtle, warm light-blue border tone */
    
    --text-main: #0f172a;
    --text-muted: #475569;
    
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    
    --font-sans: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* --- 2. GLOBAL DEFAULTS --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

/* Prevent horizontal screen blowing */
html, body {
    width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Ensure all images scale down inside containers */
img, svg {
    max-width: 100%;
    height: auto;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
}

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

/* --- 3. SHARED LAYOUT & FLEXBOX HELPERS --- */
.nav-container,
.main-nav,
.about-visual {
    display: flex;
    align-items: center;
}

.nav-container {
    justify-content: space-between;
}

.main-nav {
    gap: 2rem;
}

/* --- 4. HEADER & NAVIGATION --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(248, 250, 252, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
}

.logo {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: 0.1em;
}

.main-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: var(--accent);
}

.project-tag-clean {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    letter-spacing: normal;
    text-transform: none;
}

.home-about-bio { margin: 1.5rem 0; }
.home-about-link { text-align: left; margin-top: 1.5rem; }
.home-contact-container { max-width: 650px; }
.home-contact-intro { margin: 0.75rem 0 1.5rem; }
.home-contact-link { margin-top: 0; }

/* --- 5. SECTIONS --- */
section {
    padding-top: 6rem;
    padding-bottom: 6rem;
    border-top: 1px solid var(--border-color);
}

.hero-section {
    padding-top: 4rem;
    padding-bottom: 2rem;
    text-align: center;
    background-color: var(--bg-body);
    border-top: none;
}

.services-section { background-color: var(--bg-services); }
.projects-section { background-color: var(--bg-projects); }
.about-section { background-color: var(--bg-about); }
.contact-section { background-color: var(--bg-contact); text-align: center; }

.site-footer {
    background-color: var(--bg-footer);
    border-top: 1px solid var(--border-color);
    padding: 5rem 0 3rem;
    text-align: center;
}

/* --- 6. HEADINGS & TYPOGRAPHY --- */
.hero-content,
.section-header {
    margin-left: auto;
    margin-right: auto;
}

.hero-content { max-width: 860px; }
.section-header { text-align: center; max-width: 650px; margin-bottom: 4rem; }

.hero-section h1 {
    font-size: clamp(2.25rem, 4.5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

/* Uniform Section Headings */
.section-header h2,
.about-statement h2,
.contact-section h2 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.subtitle,
.section-header p,
.about-bio,
.contact-section p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

.subtitle {
    font-size: clamp(1rem, 1.2vw, 1.2rem);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

/* --- 7. GRIDS & CARDS --- */

.projects-grid {
    display: grid;
    gap: 1.5rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}
.projects-grid { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }

.service-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.0rem 0.2rem;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.project-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem 1.4rem;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.service-card:hover,
.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
}

.service-card:hover,
.project-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.service-card h3,
.project-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.service-card h3 {
    line-height: 1.35;
    color: var(--text-main);
}

.service-pill-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.service-pill-list li {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.45;
    position: relative;
    padding-left: 1.1rem;
}

.service-pill-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 1.1rem;
    line-height: 1.1;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.925rem;
    line-height: 1.55;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.service-card-link {
    display: inline-flex;
    align-items: center;
    color: var(--accent);
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    transition: transform 0.2s ease, color 0.2s ease;
    margin-top: auto;
}

.service-card-link:hover {
    text-decoration: underline;
    transform: translateX(3px);
}

.project-card p {
    color: var(--text-muted);
    font-size: 0.925rem;
    line-height: 1.55;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}


/* Standardized Placeholders */
.image-placeholder {
    width: 100%;
    background: var(--bg-services, #f9fafb);
    border: 1px dashed var(--border-color, #d1d5db);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.card-image {
    width: 100%;
    height: 220px; /* Hier kannst du die gewünschte Bildhöhe einstellen */
    overflow: hidden;
    border-radius: 8px; /* Falls deine Karten abgerundete Ecken haben */
    margin-bottom: 1rem;
}

/* --- Kleine, zentrierte Service-PNG-Icons --- */


.service-card-img {
    height: 85px; /* Reserviert exakt den Platz, bevor das Bild geladen ist */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}



/*
.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
}
*/

.service-card-img {
    height: 85px; /* Reserviert exakt den Platz, bevor das Bild geladen ist */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.2rem;
}

.service-icon-img {
    width: 45%; /* Macht die Icons etwas größer */
    max-height: 75px;
    height: auto;
    display: block;
    margin: 0 auto; /* Zentriert das Icon perfekt */
}


.hero-image {
    max-width: 900px;
    margin: 0 auto 1.5rem auto;
    overflow: hidden;
    border-radius: 8px;
    border-style: solid;
    background-color: var(--bg-services); /* Falls Ränder entstehen, passen sie sich an */
}

.hero-image img {
    width: 100%;
    height: auto; /* Passt die Höhe automatisch an das Seitenverhältnis an */
    max-height: 400px; /* Verhindert, dass es auf riesigen Bildschirmen zu hoch wird */
    object-fit: contain; /* Zeigt das ganze Bild ohne Schnitt */
}
/* --- 8. ABOUT SECTION --- */
.about-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}


.about-visual {
    background-color: transparent;
    border: none;
    border-radius: 50%;
    width: 280px;
    height: 280px;
    margin: 0 auto;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 12px var(--border-color); /* Erzeugt den runden Rahmen im Stil deines Beispiels */
}

.about-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* --- 9. FOOTER & LINKS --- */
.section-footer-link {
    text-align: center;
    margin-top: 2rem;
}

.section-footer-link a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
}

.section-footer-link a:hover {
    text-decoration: underline;
}

.contact-email {
    font-size: 1.15rem;
    font-weight: 500;
    margin: 1.5rem 0;
}

.contact-email a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-email a:hover {
    color: var(--accent);
}

.footer-legal {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-link {
    color: inherit;
    text-decoration: underline;
}

/* --- 10. RESPONSIVE DESIGN --- */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .main-nav { display: none; }
    .about-container { grid-template-columns: 1fr; gap: 2.5rem; }
    .hero-section { padding-top: 5rem; padding-bottom: 4rem; }
}

@media (max-width: 640px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

/* --- 11. ZOOMABLE IMAGES & LIGHTBOX MODAL --- */
/* --- 11. PURE CSS IMAGE ENLARGEMENT (ZERO JAVASCRIPT) --- */
.card-image,
.image-row,
.image-row-triple,
.project-card-img {
    overflow: hidden;
    position: relative;
}

.card-image img,
.image-row img,
.image-row-triple img,
.project-card-img img {
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-image:hover img,
.image-row img:hover,
.image-row-triple img:hover,
.project-card-img:hover img {
    transform: scale(1.03);
}

/* --- MODEST IMAGE VIEWER --- */
.img-viewer-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    cursor: zoom-out;
}

.img-viewer-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.img-viewer-box {
    position: relative;
    max-width: min(780px, 86vw);
    max-height: 72vh;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
}

.img-viewer-img {
    max-width: 100%;
    max-height: 72vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
    background: #0f172a;
    cursor: zoom-out;
}

.img-viewer-close {
    position: absolute;
    top: -2.25rem;
    right: 0;
    background: transparent;
    border: none;
    color: #f1f5f9;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: opacity 0.2s ease;
}

.img-viewer-close:hover {
    opacity: 0.75;
}

/* --- 12. CONSISTENT MOBILE LAYOUT --- */
@media (max-width: 800px) {
    html {
        font-size: 15px;
    }

    html body {
        font-size: 1rem;
    }

    html body h1 {
        font-size: clamp(1.5rem, 6vw, 2.2rem);
        line-height: 1.15;
    }

    html body h2 {
        font-size: clamp(1.2rem, 3.5vw, 1.6rem);
        line-height: 1.25;
    }

    html body h3 {
        font-size: clamp(1rem, 2.4vw, 1.15rem);
        line-height: 1.3;
    }

    html body h4 {
        font-size: 1rem;
        line-height: 1.35;
    }

    html body p,
    html body li,
    html body a {
        font-size: clamp(14px, 3.8vw, 15px);
        line-height: 1.5;
        overflow-wrap: anywhere;
    }

    html body .hero-section h1 {
        font-size: clamp(1.5rem, 6vw, 2.2rem);
    }

    html body .section-header h2,
    html body .about-statement h2,
    html body .contact-section h2,
    html body .contact-page-item h2 {
        font-size: clamp(1.2rem, 3.5vw, 1.6rem);
    }

    html body .service-card h3,
    html body .project-card h3,
    html body .service-card-box h3,
    html body .about-card h3,
    html body .active-projects h3 {
        font-size: clamp(1rem, 2.4vw, 1.15rem);
    }

    html body .service-card p,
    html body .project-card p,
    html body .active-projects .project-desc,
    html body .completed-projects .project-desc,
    html body .service-meta {
        font-size: clamp(14px, 3.8vw, 15px);
    }

    html body .nav-container {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
    }

    html body .main-nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem 1rem;
        width: 100%;
    }

    html body .main-nav a {
        font-size: 0.85rem;
    }

    html body section {
        padding-top: 3.5rem;
        padding-bottom: 3.5rem;
    }

    html body .hero-section {
        padding-top: 3rem;
        padding-bottom: 2.5rem;
    }

    html body .hero-section .subtitle,
    html body .subtitle {
        font-size: 1rem;
    }

    html body .services-grid,
    html body .projects-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    html body .contact-page-card,
    html body .about-page-grid,
    html body .about-container,
    html body .projects-gallery.completed-projects,
    html body .image-row-triple {
        grid-template-columns: minmax(0, 1fr);
    }

    html body .service-card,
    html body .project-card,
    html body .about-card,
    html body .contact-page-card,
    html body .collab-card {
        padding: 1.5rem;
    }

    html body .project-media-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    html body .card-image,
    html body .project-card-img,
    html body .image-row,
    html body .image-row-triple,
    html body .about-profile-frame {
        height: auto;
        aspect-ratio: 16 / 10;
    }

    html body .about-profile-frame {
        aspect-ratio: 1 / 1;
    }

    html body .card-image img,
    html body .project-card-img img,
    html body .image-row img,
    html body .image-row-triple img {
        width: 100%;
        height: 100%;
        max-width: 100%;
        object-fit: contain;
    }

    html body .image-row-triple {
        width: calc(100% + 3rem);
        margin-left: -1.5rem;
        margin-right: -1.5rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    html body {
        font-size: 1rem;
    }

    html body p,
    html body li,
    html body a {
        font-size: 1rem;
    }

    html body section {
        padding-top: 2.75rem;
        padding-bottom: 2.75rem;
    }

    html body .hero-section {
        padding-top: 2.5rem;
        padding-bottom: 2rem;
    }

    html body .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    html body h1 {
        font-size: clamp(1.45rem, 6.5vw, 1.9rem);
    }

    html body .hero-section h1 {
        font-size: clamp(1.45rem, 6.5vw, 1.9rem);
    }

    html body .section-header h2,
    html body .about-statement h2,
    html body .contact-section h2,
    html body .contact-page-item h2 {
        font-size: clamp(1.2rem, 4vw, 1.5rem);
    }

    html body .service-card h3,
    html body .project-card h3,
    html body .service-card-box h3,
    html body .about-card h3,
    html body .active-projects h3 {
        font-size: clamp(1rem, 3.5vw, 1.15rem);
    }

    html body .service-card,
    html body .project-card,
    html body .about-card,
    html body .contact-page-card,
    html body .collab-card {
        padding: 1.25rem;
    }

    html body .projects-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
