/* Engineering Page - Simplified & Elegant */

:root {
    --color-ie-blue: #1e3a8a;
    --color-ie-slate: #475569;
    --color-ie-gold: #b5951a;
    --color-ie-teal: #0d9488;
    --font-heading: 'Inter', sans-serif;
    --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.contextual-view {
    background-color: #fff;
    color: #1e293b;
    scroll-behavior: smooth;
}

/* ========== VISION HEADER ========== */

.vision-header {
    height: 100vh;
    display: flex;
    align-items: center;
    background: #f8fafc;
    position: relative;
    overflow: hidden;
}

.glitch-text {
    font-size: clamp(4rem, 12vw, 10rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -2px;
    color: var(--color-ie-blue);
}

.vision-line {
    width: 0;
    height: 10px;
    background: var(--color-ie-gold);
    margin: 2rem 0;
    transition: width 1.5s var(--ease-smooth);
}

.vision-content.in-view .vision-line {
    width: 250px;
}

.vision-desc {
    font-size: 1.5rem;
    max-width: 500px;
    opacity: 0.7;
}

/* ========== CONTEXT ITEMS ========== */

.context-item {
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding: 100px 0;
    position: relative;
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s var(--ease-smooth);
}

.context-item.in-view {
    opacity: 1;
    transform: translateY(0);
}

.grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.ctx-content h2 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    line-height: 1;
}

.ctx-tag {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--color-ie-gold);
    display: block;
    margin-bottom: 1rem;
}

.ctx-content p {
    font-size: 1.25rem;
    line-height: 1.7;
    margin-bottom: 2.5rem;
    color: #64748b;
}

.btn-context {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    transition: transform 0.3s var(--ease-smooth);
}

.btn-context:hover {
    transform: translateY(-5px);
}

/* VRD - City Grid Styling */

.vrd-viz .city-blocks {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    width: 300px;
}

.block {
    height: 80px;
    background: #f1f5f9;
    border-radius: 8px;
    transition: 0.5s;
}

.block.highlighted {
    background: var(--color-ie-blue);
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 20px 40px rgba(30, 58, 138, 0.3);
}

.vrd-btn {
    background: var(--color-ie-blue);
    padding: 1.5rem 3rem;
    color: white;
    clip-path: polygon(10% 0, 100% 0, 90% 100%, 0% 100%);
}

/* ROUTIER - Road */
.road-viz .perspective-road {
    width: 100%;
    height: 500px;
    clip-path: polygon(25% 0%, 75% 0%, 100% 100%, 0% 100%);
    overflow: hidden;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.1);
}

.perspective-road img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.road-btn {
    background: #1e293b;
    padding: 1.5rem 3rem;
    color: white;
    position: relative;
    overflow: hidden;
    clip-path: polygon(10% 0, 100% 0, 90% 100%, 0% 100%);
}

.road-lines {
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: repeating-linear-gradient(90deg, #fff 0, #fff 10px, transparent 10px, transparent 20px);
    animation: roadMove 1s linear infinite;
    opacity: 0.3;
}

@keyframes roadMove {
    from {
        transform: translateX(-20px);
    }

    to {
        transform: translateX(0);
    }
}

/* OUVRAGES - Bridge */
.bridge-shape-container {
    width: 100%;
    height: 500px;
    clip-path: ellipse(50% 100% at 50% 100%);
    overflow: hidden;
}

.bridge-shape-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bridge-btn {
    border: 3px solid var(--color-ie-gold);
    color: var(--color-ie-gold);
    background: transparent;
    padding: 1.5rem 3rem;
    font-weight: 900;
    border-radius: 100px 100px 0 0;
    transition: 0.3s;
}

.bridge-btn:hover {
    background: var(--color-ie-gold);
    color: white;
}

/* EXPERTISES - Fluid */
.organic-blob {
    width: 500px;
    height: 500px;
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
    animation: morph 8s ease-in-out infinite;
    overflow: hidden;
}

.organic-blob img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes morph {

    0%,
    100% {
        border-radius: 40% 60% 70% 30% / 40% 40% 60% 50%;
    }

    34% {
        border-radius: 70% 30% 50% 50% / 30% 30% 70% 70%;
    }

    67% {
        border-radius: 100% 60% 60% 100% / 100% 100% 60% 60%;
    }
}

.fluid-btn {
    background: var(--color-ie-teal);
    color: white;
    padding: 1.5rem 3rem;
    border-radius: 50% 20% 50% 20%;
    transition: border-radius 0.5s;
}

.fluid-btn:hover {
    border-radius: 20% 50% 20% 50%;
}

/* ========== HORIZONTAL CIRCLES LAYOUT ========== */

.interactive-portal {
    padding: 150px 0;
    background: #0f172a;
    color: #fff;
}

.interactive-portal h2 {
    font-size: 5rem;
    letter-spacing: 10px;
    opacity: 0.1;
    margin-bottom: 100px;
}

.parallelogram-circles {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
    flex-wrap: wrap;
}

.category-circle {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: var(--circle-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.category-circle:hover {
    transform: scale(1.15) translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.circle-inner {
    text-align: center;
    color: white;
    font-weight: 900;
    font-size: 1.1rem;
}

/* ========== DETAIL VIEW WITH CATEGORY COLORS ========== */

.detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--current-category-color, #1e3a8a);
    z-index: 3000;
    overflow-y: auto;
}

.engineering-page.in-detail {
    overflow: hidden;
}

.detail-nav {
    display: flex;
    padding: 40px 5%;
    background: rgba(255, 255, 255, 0.08);
    /* Slightly more opaque for better blur contrast */
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: 3010;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.btn-close-view {
    font-size: 3rem;
    background: none;
    border: none;
    cursor: pointer;
    margin-right: 40px;
    color: white;
    transition: transform 0.3s;
}

.btn-close-view:hover {
    transform: scale(1.1);
}

.detail-info h1 {
    color: white;
}

.detail-info p {
    color: rgba(255, 255, 255, 0.9);
}

.project-grid-dynamic {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 50px 0;
    width: 70%;
    margin: 0 auto;
}

/* Mobile Handling for split layout */
/* Stacking handled in realisations.css */

.ctx-footer {
    padding: 40px 0;
    opacity: 0.5;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 1024px) {
    .project-grid-dynamic {
        width: 85%;
    }

    .grid-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .ctx-content h2 {
        font-size: 2.5rem;
    }

    .organic-blob,
    .perspective-road {
        width: 100%;
        height: 350px;
    }

    .vision-header {
        height: auto;
        padding: 150px 0;
    }

    .category-circle {
        width: 140px;
        height: 140px;
    }

    .parallelogram-circles {
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .project-grid-dynamic {
        width: 95%;
    }
}