/* 
    ARGABIM - Modern Branding & Interface System 
    Design Language: Technical Excellence, Minimalism, Fluidity
*/

:root {
    /* Color Palette - Optimized with the vibrant "Invisible" Blue */
    --primary: #0084ff;
    --primary-bright: #33a1ff;
    --primary-dark: #0066cc;
    --accent: #00f2ff;
    --bg-deep: #030508;
    --bg-surface: #0a0d12;
    --bg-card: rgba(255, 255, 255, 0.03);

    /* Semantic Colors */
    --text-high: #ffffff;
    --text-med: #cbd5e0;
    --text-low: #718096;
    --border-light: rgba(0, 132, 255, 0.15);
    --border-active: rgba(0, 132, 255, 0.4);

    /* Spacing & Transitions */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* --- Global Reset & Base Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html,
body {
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-med);
    /* Kept original text color variable */
    background-color: var(--bg-deep);
    /* Kept original background color variable */
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    /* Kept original property */
}

/* Custom Selection */
::selection {
    background: var(--primary);
    color: white;
}

/* Scrollbar Style */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-card);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* --- Layout Utility --- */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 5%;
}

.section-head {
    text-align: center;
    margin-bottom: 5rem;
}

section {
    padding: 8rem 0;
}

.badge {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    background: rgba(0, 132, 255, 0.1);
    border: 1px solid var(--border-active);
    border-radius: 100px;
    color: var(--primary);
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1.5rem;
}

h2.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--text-high);
    font-weight: 700;
    letter-spacing: -1px;
}

span.gradient-text {
    background: linear-gradient(135deg, #fff 30%, var(--primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- Navigation --- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition-smooth);
}

header.scrolled {
    background: rgba(5, 7, 10, 0.85);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-light);
}

header .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-wrap img {
    height: 50px;
    width: auto;
    display: block;
    object-fit: contain;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.logo-wrap .brand-name {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #fff 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

nav a {
    text-decoration: none;
    color: var(--text-med);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
}

nav a:hover {
    color: var(--primary);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

/* --- Progress Bar --- */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: #0084ff;
    /* Solid fallback for Chrome */
    background: var(--primary);
    box-shadow: 0 2px 10px rgba(0, 132, 255, 0.6);
    z-index: 99999;
    transition: width 0.1s ease-out;
}

/* --- Sidebar Navigation --- */
.side-nav-container {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    z-index: 1000;
}

.side-dot {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
    text-decoration: none;
}

.side-dot::after {
    content: attr(data-label);
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-surface);
    color: white;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
}

.side-dot:hover::after {
    opacity: 1;
    right: 20px;
}

.side-dot:hover,
.side-dot.active {
    background: var(--primary);
    transform: scale(1.4);
    box-shadow: 0 0 10px var(--primary);
}

@media (max-width: 768px) {
    .side-nav-container {
        display: none;
    }
}

/* --- Hero Section --- */
#home {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 80px 0 0 0;
    overflow: hidden;
}

.hero-mesh {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(0, 132, 255, 0.15) 0%, transparent 70%);
    filter: blur(60px);
    z-index: 0;
    opacity: 0.5;
}

#home .container {
    display: flex;
    align-items: center;
    gap: 4rem;
    position: relative;
    z-index: 2;
    max-width: 100%;
    padding: 0 4rem;
}

#neural-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.4;
}

#building-3d-container {
    position: absolute;
    right: -5%;
    top: 50%;
    transform: translateY(-50%);
    width: 55%;
    height: 80vh;
    z-index: 1;
    pointer-events: all;
}

.hero-content {
    flex: 1;
    max-width: 50%;

    /* Forced Left Alignment Layout */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* CRITICAL: Aligns text blocks to the LEFT */
    justify-content: center;
    text-align: left;

    padding-right: 2rem;
    margin-top: 2rem;
    position: relative;
    z-index: 5;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 8vw, 4.8rem);
    line-height: 1;
    font-weight: 800;
    color: var(--text-high);
    margin-bottom: 1.5rem;
    letter-spacing: -3px;
    text-align: left;
    display: block;
    width: 100%;
}

.hero-visual img {
    max-height: 500px;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.hero-visual:hover img {
    transform: scale(1.03);
}

@media (max-width: 968px) {
    #home .container {
        flex-direction: column;
        text-align: left;
        /* Keep left alignment on mobile too */
        padding-top: 8rem;
        /* More space for header */
        align-items: flex-start;
    }

    .hero-content {
        max-width: 100%;
        padding-right: 0;
        margin-bottom: 2rem;
    }

    /* Reset 3D Container for Mobile Flow */
    #building-3d-container {
        position: relative !important;
        width: 100% !important;
        height: 400px !important;
        right: auto !important;
        top: auto !important;
        transform: none !important;
        margin-top: 2rem;
    }

    .hero-visual {
        width: 100%;
        justify-content: center !important;
        display: none;
        /* Hide old hero visual wrapper just in case */
    }
}

.hero-content p {
    font-size: 1.25rem;
    max-width: 550px;
    margin-bottom: 1.5rem;
}

.hero-list {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
    color: var(--text-med);
}

.hero-list-item {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-list-item:last-child {
    margin-bottom: 0;
}

.hero-check {
    color: var(--primary);
}

.cta-group {
    display: flex;
    gap: 1.5rem;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: 1px solid var(--primary);
    box-shadow: 0 10px 20px rgba(0, 132, 255, 0.2);
}

.btn-primary:hover {
    background: var(--primary-bright);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 132, 255, 0.4);
}

.btn-full {
    width: 100%;
}

/* --- Typewriter Effect --- */
.typewriter {
    display: inline-block;
    position: relative;
}

.typing-cursor::after {
    content: '|';
    animation: blink 1s step-end infinite;
    color: var(--primary);
    margin-left: 2px;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.btn-outline {
    border: 1px solid var(--border-light);
    color: var(--text-high);
    background: rgba(255, 255, 255, 0.05);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-med);
}

/* --- Services Grid --- */
#services {
    background: var(--bg-surface);
    position: relative;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    max-width: 1100px;
    margin: 0 auto;
}

@media (max-width: 968px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

/* --- 3D Flip Cards --- */
.service-flip-container {
    perspective: 1000px;
    height: 340px;
    /* Fixed height for consistency */
    cursor: pointer;
}

.flipper {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy effect */
    transform-style: preserve-3d;
}

.service-flip-container.flipped .flipper {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;

    /* Original Card Styles */
    background: var(--bg-deep);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--glass-shadow);
}

/* Front Face */
.card-front {
    z-index: 2;
    transform: rotateY(0deg);
}

/* Rotation Icon Indicator */
.section-subtitle {
    color: var(--text-med);
    margin-top: 1rem;
    font-size: 1.1rem;
    opacity: 0.8;
}

/* --- 3D Flip Cards --- */
.flip-hint {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 132, 255, 0.08);
    border: 1px solid var(--border-light);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    transition: all 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.hint-icon {
    font-size: 1.2rem;
    animation: pulse-spin 2s infinite ease-in-out;
    display: inline-block;
}

@keyframes pulse-spin {
    0% {
        transform: rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(180deg) scale(1.2);
    }

    100% {
        transform: rotate(360deg) scale(1);
    }
}

.service-flip-container:hover .flip-hint {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 132, 255, 0.4);
}

.card-back {
    transform: rotateY(180deg);
    background: var(--bg-surface);
    border-color: var(--primary);
}



.service-flip-container:hover .card-front {
    box-shadow: 0 15px 30px rgba(0, 132, 255, 0.2);
    border-color: var(--primary-bright);
}

.service-flip-container h3 {
    margin: 0;
    text-align: center;
}

.card-front .icon-box {
    transform: scale(1.5);
    margin-bottom: 2rem;
}

.card-back p {
    font-size: 1rem;
    line-height: 1.5;
    text-align: center;
}

/* --- About Section --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text-col {
    text-align: left;
}

.about-badge {
    display: inline-block;
    font-size: 1.1rem;
    padding: 0.7rem 1.6rem;
    margin-bottom: 1.5rem;
}

.about-description {
    font-size: 1.15rem;
    line-height: 1.9;
    color: var(--text-med);
    margin: 0;
    font-weight: 400;
}

.about-description.spaced {
    margin-bottom: 1rem;
}

.about-stats-col {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    margin-top: 4rem;
    width: 100%;
}

.about-title {
    margin: 0 auto;
    text-align: center;
    max-width: 800px;
    line-height: 1.2;
    font-size: 3rem;
}

.about-stats-wrapper {
    display: flex;
    gap: 3rem;
    justify-content: center;
    align-items: flex-start;
    margin-top: 2rem;
}

.about-stat-item {
    text-align: right;
    padding-right: 1.5rem;
    padding-left: 0;
    background: none;
    box-shadow: none;
    margin: 0;
}

.about-stat-item.primary-border {
    border-right: 2px solid var(--primary);
}

.about-stat-item.accent-border {
    border-right: 2px solid var(--accent);
}

.about-stat-number {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.about-stat-label {
    color: var(--text-med);
    font-weight: 600;
}

.about-text-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: left;
    align-items: start;
}

.about-intro-block {
    margin-bottom: 0;
}

@media (max-width: 968px) {
    .about-text-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
        max-width: 800px;
    }
}

/* --- Statistics Section --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 4rem;
    padding: 6rem 0;
    border-top: 1px solid var(--border-light);
    margin-top: 4rem;
}

.stat-item h4 {
    font-size: 3.5rem;
    color: var(--text-high);
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.stat-item p {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary);
}

/* --- Process / Methodology Section --- */
.process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1100px) {
    .process-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .process-grid {
        grid-template-columns: 1fr;
    }
}

.process-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    padding: 2.5rem 1.5rem;
    border-radius: 24px;
    position: relative;
    transition: all 0.4s ease;
    border-bottom: 4px solid var(--border-light);
    display: flex;
    flex-direction: column;
}

.process-card:hover {
    transform: translateY(-10px);
    border-bottom-color: var(--primary);
    box-shadow: var(--glass-shadow);
}

.process-num {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, rgba(255, 255, 255, 0.05) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.5;
}

.process-card h3 {
    color: var(--text-high);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.process-card p {
    color: var(--text-med);
    font-size: 0.95rem;
    line-height: 1.7;
}

.process-line {
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 4px;
    background: var(--primary);
    transition: width 0.4s ease;
    border-radius: 0 0 24px 24px;
}

.process-card:hover .process-line {
    width: 100%;
}

/* --- Commitments Section --- */
#commitments {
    background: var(--bg-deep);
}

.commitments-intro {
    margin-top: 2rem;
}

.commitments-list {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.commitment-item {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    transition: var(--transition-fast);
}

.commitment-item:hover {
    border-color: var(--primary-bright);
    background: rgba(255, 255, 255, 0.05);
}

.commit-icon {
    font-size: 2rem;
    min-width: 60px;
    height: 60px;
    background: rgba(0, 132, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.commitment-item h3 {
    color: var(--text-high);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.commitment-item p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* --- Contact Section --- */
.contact-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    padding: 3rem;
    border-radius: 24px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.contact-card:hover {
    border-color: var(--primary);
    box-shadow: var(--glass-shadow);
    transform: translateY(-5px);
}

/* --- Contact Form Styling --- */
.honeypot {
    display: none;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group-lg {
    margin-bottom: 2rem;
}

@media (max-width: 480px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

#quote-form input,
#quote-form textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    background: var(--bg-deep);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    color: var(--text-high);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition-fast);
    outline: none;
}

#quote-form input:focus,
#quote-form textarea:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 4px rgba(0, 132, 255, 0.1);
}

#quote-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-med);
    font-weight: 500;
}

.service-card form {
    position: relative;
    z-index: 5;
    /* Ensure form is above any pseudo-elements */
}

.contact-flex {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.contact-text h2 {
    font-size: 3.5rem;
    margin-bottom: 2rem;
}

.info-list {
    list-style: none;
    margin-top: 3rem;
}

.info-list li {
    margin-bottom: 2rem;
    display: flex;
    gap: 1.5rem;
}

.info-icon {
    color: var(--primary);
    font-size: 1.25rem;
}

/* --- Back to Top --- */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: none;
    opacity: 0;
    transition: all 0.3s ease, opacity 0.3s ease;
    z-index: 9999;
}

#back-to-top.visible {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

/* --- Animations --- */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up.reveal {
    opacity: 1;
    transform: translateY(0);
}

/* Animation Delays */
.delay-200 {
    transition-delay: 0.2s;
}

.delay-400 {
    transition-delay: 0.4s;
}

/* --- Responsive Optimizations --- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    width: 100%;
    height: 2px;
    background: var(--text-high);
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

.overflow-hidden {
    overflow: hidden;
}

@media (max-width: 968px) {
    section {
        padding: 4rem 0;
    }

    .container {
        padding: 0 4%;
    }

    .menu-toggle {
        display: flex;
    }

    .hide-mobile {
        display: none !important;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        height: 100vh;
        background: var(--bg-surface);
        -webkit-backdrop-filter: blur(20px);
        backdrop-filter: blur(20px);
        border-left: 1px solid var(--border-light);
        padding: 8rem 2rem 3rem;
        transition: right 0.6s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 1000;
        display: block !important;
    }

    nav.active {
        right: 0;
    }

    nav ul {
        flex-direction: column;
        gap: 2.5rem;
    }

    nav a {
        font-size: 1.4rem;
        font-weight: 600;
    }

    #home .container {
        flex-direction: column;
        text-align: center;
        gap: 3rem;
        padding-top: 8rem;
        position: relative;
    }

    /* Move 3D Container behind text on mobile */
    #building-3d-container {
        position: absolute !important;
        width: 100% !important;
        height: 100% !important;
        top: 0 !important;
        left: 0 !important;
        right: auto !important;
        bottom: auto !important;
        transform: none !important;
        z-index: 1 !important;
        opacity: 0.2 !important;
        pointer-events: none !important;
    }

    .hero-content {
        flex: none;
        width: 100%;
        padding-right: 0;
        margin-top: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        position: relative;
        z-index: 5;
    }

    .hero-content h1 {
        font-size: clamp(2.2rem, 9vw, 3.5rem) !important;
        margin-bottom: 1.5rem;
        text-align: center;
        letter-spacing: -1px;
    }

    .hero-content p {
        font-size: 1.1rem;
        margin-bottom: 2rem;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-list {
        align-items: center;
        display: inline-block;
        text-align: left;
    }

    .cta-group {
        justify-content: center;
        width: 100%;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .service-flip-container {
        height: auto;
        min-height: 380px;
    }

    .contact-flex {
        grid-template-columns: 1fr;
        gap: 4rem;
    }

    .contact-text h2 {
        font-size: 2.5rem;
        text-align: center;
    }

    .info-list {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .info-list li {
        text-align: center;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .about-text-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .about-intro-block,
    .about-author-block {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .about-description {
        text-align: center;
    }

    .about-stats-col {
        margin-top: 3rem;
    }

    .about-stats-wrapper {
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 1.5rem;
    }

    .about-stat-item {
        width: 100%;
        max-width: 300px;
        text-align: center;
        padding: 2rem 1rem;
        border: 1px solid var(--border-light);
        border-radius: 20px;
        background: var(--bg-card);
    }

    .about-stat-item.primary-border,
    .about-stat-item.accent-border {
        border-right: none;
        border-bottom: 3px solid var(--primary);
    }

    .about-stat-item.accent-border {
        border-bottom-color: var(--accent);
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .cta-group {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}

/* --- High-Tech Preloader --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #020403;
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.spinner-ring {
    width: 80px;
    height: 80px;
    border: 3px solid rgba(0, 224, 198, 0.1);
    border-top-color: #00E0C6;
    border-right-color: rgba(0, 224, 198, 0.5);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: relative;
    box-shadow: 0 0 15px rgba(0, 224, 198, 0.1);
}

.spinner-ring::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border: 3px solid transparent;
    border-top-color: #FFD166;
    border-left-color: rgba(255, 209, 102, 0.5);
    border-radius: 50%;
    animation: spin-reverse 1.5s linear infinite;
}

.brand-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: #ffffff;
    letter-spacing: 4px;
    text-transform: uppercase;
    animation: pulse 2s ease-in-out infinite;
    opacity: 0.8;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes spin-reverse {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(-360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.5;
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
    }

    50% {
        opacity: 1;
        text-shadow: 0 0 20px rgba(0, 224, 198, 0.3);
    }
}

.preloader-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* --- Footer --- */
footer {
    background: var(--bg-deep);
    border-top: 1px solid var(--border-light);
    padding: 5rem 0 2rem;
    font-size: 0.95rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    color: var(--text-high);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.footer-col .brand-name {
    margin-bottom: 1rem;
    display: inline-block;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -1px;
    color: var(--text-high);
}

.footer-col p {
    color: var(--text-med);
    line-height: 1.6;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.8rem;
    color: var(--text-med);
}

.footer-links a {
    color: var(--text-med);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 2rem;
    text-align: center;
    color: var(--text-low);
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* --- Travaux Supervisés / Projects Section --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.project-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    height: 350px;
    cursor: pointer;
    border: 1px solid var(--border-light);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--glass-shadow);
    background: var(--bg-surface);
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 15px 30px rgba(0, 132, 255, 0.15);
}

.project-img-placeholder {
    width: 100%;
    height: 100%;
    /* Gradient placeholder until real images are added */
    background: linear-gradient(135deg, rgba(20, 24, 32, 1) 0%, rgba(30, 35, 45, 1) 100%);
    position: relative;
    transition: transform 0.8s ease;
}

.project-img-placeholder.residentiel {
    background: linear-gradient(160deg, #1e293b, #0f172a);
}

.project-img-placeholder.tertiaire {
    background: linear-gradient(160deg, #334155, #1e293b);
}

.project-img-placeholder.mixte {
    background: linear-gradient(160deg, #0f172a, #020617);
}

.project-img-placeholder.hrbt {
    background-image: url('02SJ_image.png');
    background-size: cover;
    background-position: center;
}

.project-img-placeholder.iter {
    background-image: url('ITER.png');
    background-size: cover;
    background-position: center;
}

.project-img-placeholder.rjh {
    background-image: url('nucleair-reacteur.png');
    background-size: cover;
    background-position: center;
}

/* Subtle background pattern for placeholder */
.project-img-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.5;
}

.project-card:hover .project-img-placeholder {
    transform: scale(1.05);
    /* Zoom effect */
}

/* Overlay Content */
.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    background: linear-gradient(to top, rgba(3, 5, 8, 0.95), rgba(3, 5, 8, 0.6), transparent);
    z-index: 2;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.project-card:hover .project-overlay {
    transform: translateY(0);
}

.project-overlay h3 {
    color: var(--text-high);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.project-overlay p {
    color: var(--text-med);
    font-size: 0.9rem;
    margin: 0;
}

.project-tag {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 132, 255, 0.15);
    color: var(--primary);
    padding: 0.4rem 1rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    border: 1px solid var(--border-light);
    z-index: 3;
}

/* --- Legal Page Styles --- */
.legal-page-body {
    padding-top: 5rem;
}

.legal-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.legal-container h1 {
    color: var(--text-high);
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.legal-container h2 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 0.5rem;
}

.legal-container p,
.legal-container li {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.legal-container strong {
    color: var(--text-high);
}

.legal-container a {
    color: var(--primary);
    text-decoration: none;
}

.legal-container .back-link {
    display: inline-block;
    margin-bottom: 2rem;
    color: var(--text-low);
    font-size: 0.9rem;
}

.legal-container .back-link:hover {
    color: var(--primary);
}

.legal-footer {
    margin-top: 4rem;
    text-align: center;
    font-size: 0.8rem;

    color: var(--text-low);
}

/* --- Administration Panel --- */
#init-loader {
    text-align: center;
    padding: 2rem;
}

/* --- Admin Form --- */
.admin-form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.admin-form-group.mb-2 {
    margin-bottom: 2rem;
}

.admin-form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-med);
    font-size: 0.9rem;
}

.admin-form-input {
    width: 100%;
    padding: 0.8rem;
    background: var(--bg-deep);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.admin-form-input:focus {
    border-color: var(--primary);
    outline: none;
}

.admin-btn {
    width: 100%;
    cursor: pointer;
}

.admin-error-msg {
    color: #ff4444;
    margin-top: 1rem;
    display: none;
    font-size: 0.9rem;
}

.table-container {
    overflow-x: auto;
}

.loading-message {
    text-align: center;
    padding: 2rem;
}

/* --- Success / Thank You Page --- */
.thanks-page {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background: var(--bg-deep);
}

.success-card {
    background: var(--bg-surface);
    padding: 4rem 2rem;
    border-radius: 32px;
    border: 1px solid var(--border-light);
    box-shadow: var(--glass-shadow);
    max-width: 500px;
    width: 90%;
    position: relative;
    z-index: 10;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: rgba(0, 132, 255, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 2rem;
    border: 1px solid var(--border-active);
    animation: pulse-blue 2s infinite;
}

@keyframes pulse-blue {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 132, 255, 0.4);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(0, 132, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 132, 255, 0);
    }
}

.success-card h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, var(--text-med));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.success-card p {
    color: var(--text-med);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
}