/* ===================================================================
   FLYATIVE - PROJECTS PAGE STYLESHEET (UNIFORM 4:3 & NO STACKING)
   =================================================================== */

/* --- HERO SECTION WITH OVERLAPPING IMAGE --- */
.hero-projects {
    position: relative;
    padding-top: 3.5rem;
    padding-bottom: 2rem;
    background-color: #eef3f8; 
    border-bottom: 1px solid var(--border-color, #d2e3f3);
    text-align: left;
    overflow: hidden;
}

.hero-projects .container {
    position: relative;
    z-index: 10;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    pointer-events: none;
}

.hero-projects h1,
.hero-projects .subtitle {
    pointer-events: auto;
    color: var(--text-main, #0f172a);
}

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

.hero-projects .subtitle {
    font-size: clamp(1rem, 1.2vw, 1.2rem);
    color: var(--text-muted, #475569);
    margin-bottom: 0;
    line-height: 1.7;
}

.projects-hero-img-container {
    max-width: 900px;
    margin: -4.5rem auto -1rem auto;
    position: relative;
    z-index: 1;
    overflow: hidden;
    border-radius: 8px;
    background-color: transparent;
}

.projects-hero-img {
    width: 100%;
    height: auto;
    max-height: 380px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    opacity: 0.85; 
    transition: opacity 0.2s ease;

    -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 12%, rgba(0,0,0,1) 88%, rgba(0,0,0,0) 100%),
                        linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 15%, rgba(0,0,0,1) 85%, rgba(0,0,0,0) 100%);
    -webkit-mask-composite: destination-in;
    mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 12%, rgba(0,0,0,1) 88%, rgba(0,0,0,0) 100%),
                linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 15%, rgba(0,0,0,1) 85%, rgba(0,0,0,0) 100%);
    mask-composite: intersect;
}

.projects-hero-img:hover {
    opacity: 1;
}

/* --- GALLERY SECTIONS --- */
.projects-section {
    background-color: #ffffff;
    border-top: none;
    padding-top: 3rem;
    padding-bottom: 4rem;
}

.project-category-title {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    color: var(--text-main);
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0.5rem;
}

.project-category-title.completed {
    margin-top: 5rem;
}

.project-list {
    font-size: 0.95rem;
    font-weight: normal; /* Erzwingt normale Schriftstärke */
    padding-left: 1.2rem;
    margin-top: 0.4rem;
    margin-bottom: 0.8rem;
}

.project-list li {
    font-size: inherit;

    font-weight: 400; /* Ganz wichtig: explizit 400 statt normal */
    color: var(--text-muted); /* Nimmt genau die gleiche gedämpfte Farbe wie deine Beschreibungen */
    line-height: 1.3;
    margin-bottom: 0.2rem;
}

.project-card-content ul {
    font-size: 0.95rem; /* Gleiche Größe wie deine p.project-desc */
    /* oder gib exakt die px-Größe an, die deine anderen Texte nutzen, z.B. font-size: 14px; */
}

.project-card-content ul li {
    font-size: inherit; /* Erbt die Größe sauber */
    margin-bottom: 0.3rem;
}

/* ===================================================================
   IMAGE BOX PATTERN (Uniform 4:3 Ratio, Fluid Scaling, Never Stack)
   =================================================================== */
.image-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.75rem;
    width: 100%;
    margin-bottom: 1rem;
}

.img-box {
    flex: 1 1 0;
    min-width: 0;
    min-height: 0;
    max-height: 200px;
    aspect-ratio: 4 / 3;
    margin: 0 auto 1rem auto; /* Centers the img-box horizontally within the card */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    overflow: hidden;
}

.img-box img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
    cursor: zoom-in;
    transition: transform 0.2s ease;
}

.img-box img:hover {
    transform: scale(1.02);
}

/* ===================================================================
   1. ACTIVE / NEW PROJECTS
   =================================================================== */
.projects-gallery.active-projects {
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.active-projects .project-card-item {
    background: #ffffff;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    scroll-margin-top: 100px;
}

.active-projects .project-card-item:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.active-projects .project-card-content {
    padding: 1rem 0 0.5rem 0;
}

.active-projects h3 {
    font-size: 1.35rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    color: var(--text-main);
}

.active-projects .project-desc {
    font-size: 1rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.6;
    max-width: 950px;
}

.active-projects .project-card-footer {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid var(--border-color, #f1f5f9);
}

.project-client-text {
    font-size: 0.88rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* ===================================================================
   2. COMPLETED PROJECTS (2 Columns Per Row)
   =================================================================== */
.projects-gallery.completed-projects {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}


.completed-projects .project-card-item:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
}

.completed-projects .project-card-content {
    flex-grow: 1;
    margin-bottom: 0.75rem;
    padding: 0 1rem;
}

.completed-projects h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    color: var(--text-main);
    line-height: 1.35;
}

.completed-projects .project-desc {
    font-size: 0.93rem;
    color: var(--text-muted);
    margin: 0 0 0.75rem;
    line-height: 1.55;
}

.completed-projects .project-card-footer {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem 0 1rem; /* Gleiches Seiten-Padding (1rem) wie der Content oben */
    border-top: none;
}

/* Shared Link & Utility Styles */
.project-detail-link {
    color: var(--accent, #2563eb);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.project-detail-link:hover {
    text-decoration: underline;
}

.project-stack {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

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

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 768px) {
    .hero-projects {
        padding-top: 3.5rem;
        padding-bottom: 3rem;
    }
    .projects-gallery.completed-projects {
        grid-template-columns: 1fr;
    }
}