@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800&family=Open+Sans:wght@400;600&display=swap');

/* VARIABLES */
:root {
    --primary-red: #e63946;
    --primary-orange: #f3722c;
    --dark-bg: #1a1a1a;
    /* Very Dark Grey/Black */
    --light-bg: #f8f9fa;
    --text-dark: #2b2d42;
    --text-light: #ffffff;
    --gradient: linear-gradient(135deg, var(--primary-red), var(--primary-orange));
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --radius: 16px;
    --trans: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-dark);
    background-color: #fff;
    overflow-x: hidden;
    line-height: 1.6;
}

h1,
h2,
h3,
h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--trans);
}

ul {
    list-style: none;
}

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

/* UTILITIES */
.container {
    width: 100%;
    /* REQUIRED to fill flex parent (header) */
    max-width: 80%;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-padding {
    padding: 6rem 0;
}


.text-gradient {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #fff;
    background: var(--gradient);
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.3);
    border: none;
    cursor: pointer;
    transform: translateY(0);
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(230, 57, 70, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid #fff;
    box-shadow: none;
}

.btn-outline:hover {
    background: #fff;
    color: var(--primary-red);
}

/* HEADER - DARK THEME */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: #1a1a1a;
    /* Darker background for Logo visibility */
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
    height: 80px;
    display: flex;
    align-items: center;
}

/* NAVBAR STYLING */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    margin-right: auto;
}

.logo img {
    height: 55px;
}

.nav-links {
    display: flex;
    gap: 3.5rem;
    /* Increased gap between links for a cleaner look */
}

.nav-links a {
    font-weight: 600;
    font-size: 0.95rem;
    color: #fff;
    position: relative;
}

/* White text */
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-orange);
    transition: var(--trans);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.8rem;
    color: #fff;
}

/* HERO SECTION */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('images/hero-bg.jpg');
    /* Increased opacity from 0.5 to 0.7 */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    margin-top: 0;
}

.hero-content {
    max-width: 800px;
    padding: 2rem;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.1;
    color: #ffffff !important;
    /* Force white */
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    /* Add contrast shadow */
}

.hero h2 {
    font-size: clamp(1rem, 3vw, 1.5rem);
    margin-bottom: 2rem;
    font-weight: 400;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* SLIDER (ACCUEIL) */
.slider-wrapper {
    position: relative;
    width: 100%;
}

.slider-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 2rem;
    padding: 1rem 1.5rem 3rem 1.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-behavior: smooth;
    /* Smooth scrolling for buttons */
}

.slider-container::-webkit-scrollbar {
    display: none;
}

/* SLIDER CONTROLS (ARROWS) */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    color: var(--primary-red);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: var(--trans);
}

.slider-btn:hover {
    background: var(--primary-red);
    color: #fff;
}

.slider-btn.prev {
    left: -20px;
}

.slider-btn.next {
    right: -20px;
}

.slide {
    flex: 0 0 min(300px, 85vw);
    /* Responsive width for mobile */
    scroll-snap-align: center;
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--trans);
}

.slide:hover {
    transform: translateY(-5px);
}

.slide-img {
    height: 200px;
    width: 100%;
    object-fit: cover;
}

.slide-content {
    padding: 1.5rem;
    text-align: center;
}

.slide-content h3 {
    color: var(--primary-orange);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.slide-content p {
    color: #666;
    font-size: 0.9rem;
}


/* SERVICE GRID */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.card-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.service-card:hover .card-image img {
    transform: scale(1.1);
}

.card-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    margin-top: 0;
    color: var(--primary-orange);
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.card-content ul {
    margin-bottom: 0;
    padding-left: 1.5rem;
    list-style: disc;
    color: #666;
}

/* BEFORE/AFTER DRAGGABLE SLIDER (REALISATIONS) */
.ba-wrapper {
    margin-bottom: 4rem;
}

.ba-title {
    text-align: center;
    margin-bottom: 2rem;
}

.comparison-slider {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.image-container {
    position: relative;
    width: 100%;
    /* Aspect ratio fallback or specific height if needed, 
       but images dictate height usually. */
    line-height: 0;
}

.img-before {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.img-after {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* This clips the after image based on the slider position */
    clip-path: inset(0 0 0 var(--position));
    /* var(--position) is a percentage e.g. 50% */
}

/* The vertical line */
.slider-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--position);
    width: 2px;
    background: #fff;
    z-index: 10;
    pointer-events: none;
    /* Let clicks pass through to input */
}

/* The round handle visual */
.slider-handle {
    position: absolute;
    top: 50%;
    left: var(--position);
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: var(--primary-red);
    border: 3px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    z-index: 11;
    pointer-events: none;
    /* Let clicks pass through to input */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* The actual input range - invisible but interactive */
.slider-range {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: col-resize;
    margin: 0;
    z-index: 20;
    /* On top of everything */
    /* Touch action needed for smooth mobile scrolling when not engaging slider? 
       Actually standard range inputs handle this well mostly, but let's be safe */
    -webkit-tap-highlight-color: transparent;
}

/* Labels */
.label {
    position: absolute;
    top: 20px;
    padding: 5px 15px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 20px;
    pointer-events: none;
    z-index: 5;
}

.label-before {
    left: 20px;
}

.label-after {
    right: 20px;
}

/* CONTACT */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
}

.info-item i {
    color: var(--primary-orange);
    font-size: 1.5rem;
    margin-top: 5px;
}

form {
    background: #fff;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-control {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    transition: var(--trans);
    font-size: 1rem;
}

.form-control:focus {
    border-color: var(--primary-red);
    outline: none;
}

/* FOOTER */
footer {
    background: #111;
    color: #888;
    padding: 4rem 0 2rem;
    text-align: center;
}

footer .socials {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

footer .socials a {
    color: #fff;
    font-size: 1.5rem;
    transition: var(--trans);
}

footer .socials a:hover {
    color: var(--primary-orange);
    transform: translateY(-3px);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* RESPONSIVE */
@media (min-width: 768px) {
    .slide {
        flex: 0 0 350px;
    }

    .contact-wrapper {
        grid-template-columns: 1fr 1.5fr;
        gap: 4rem;
    }

    form {
        padding: 3rem;
    }
}

@media (max-width: 768px) {
    nav {
        padding: 0 1rem;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: #1a1a1a;
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
        text-align: center;
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: block;
    }

    .hero {
        height: auto;
        min-height: 80vh;
        padding: 8rem 0 4rem 0;
    }

    .section-padding {
        padding: 4rem 0;
    }
}

/* PROJECT INFO (REALISATIONS) */
.project-info {
    text-align: center;
    margin-top: 1.5rem;
}

.project-info h3 {
    color: var(--primary-orange);
    margin-bottom: 0.5rem;
}