/* GLOBAL VARIABLES */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #1e293b;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    scroll-behavior: smooth;
}

/* HERO SECTION */
.hero {
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://images.unsplash.com/photo-1600585154340-be6161a56a0c?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* SERVICES */
.service-card {
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.service-card:hover {
    transform: translateY(-5px);
    border-bottom-color: var(--primary-color);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* MOBILE MENU */
.mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.mobile-menu.open {
    max-height: 500px;
}

/* TESTIMONIALS */
.testimonial-card {
    background: linear-gradient(145deg, #ffffff, #f8fafc);
}

/* PORTFOLIO */
.portfolio-item {
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(37, 99, 235, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 15px;
    text-align: center;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

/* FORM FOCUS */
.input-field:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
}

/* ANIMATIONS */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.6s ease-out forwards;
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

/* COOKIE POPUP */
.cookie-popup {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 500px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    transform: translateY(120%);
    transition: transform 0.5s ease;
}

.cookie-popup.active {
    transform: translateY(0);
}

.cookie-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.cookie-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* LIGHTBOX */
#lightboxModal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
align-items: center;
justify-content: center;
background-color: rgba(0, 0, 0, 0.8);
z-index: 9999;
padding: 20px;
}

#lightboxModal.active {
display: flex;
}

#lightboxModal img {
max-width: 90%;
max-height: 80vh;
object-fit: contain;
border-radius: 10px;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

#lightboxModal .arrow {
position: absolute;
top: 50%;
transform: translateY(-50%);
font-size: 1.5rem;
color: rgba(255, 255, 255, 0.7);
background-color: rgba(0, 0, 0, 0.3);
border: none;
padding: 0.5rem;
cursor: pointer;
z-index: 10;
transition: all 0.3s ease;
width: 35px;
height: 35px;
display: flex;
justify-content: center;
align-items: center;
border-radius: 50%;
opacity: 0.6;
}

#lightboxModal .arrow:hover {
background-color: rgba(37, 99, 235, 0.7);
opacity: 1;
color: white;
}

#lightboxPrev {
left: 20px;
}

#lightboxNext {
right: 20px;
}

#lightboxClose {
position: absolute;
top: 20px;
right: 20px;
font-size: 2rem;
color: white;
background: transparent;
border: none;
cursor: pointer;
z-index: 10000;
}

/* RESPONSIVE STYLES */
@media (max-width: 640px) {
    .cookie-popup {
        left: 10px;
        right: 10px;
        bottom: 10px;
    }

    /* PORTFOLIO MOBILE FIXES */
    .portfolio-item {
        margin-bottom: 15px;
    }

    .portfolio-overlay {
        background: rgba(37, 99, 235, 0.8);
    }

    .portfolio-overlay h3 {
        font-size: 1rem;
    }

    .portfolio-overlay p {
        font-size: 0.8rem;
    }

    /* LIGHTBOX MOBILE FIXES - SOLUTION RADICALE */
    #lightboxModal {
    padding: 0 !important;
    overflow-y: auto;
    align-items: flex-start;
    }

    #lightboxModal img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 110vh !important;
    object-fit: contain;
    border-radius: 0;
    }

    #lightboxClose {
    top: 10px;
    right: 10px;
    font-size: 1.5rem;
    }

    #lightboxModal .arrow {
    width: 30px;
    height: 30px;
    font-size: 1rem;
    }

    #lightboxPrev {
    left: 5px;
    }

    #lightboxNext {
    right: 5px;
    }
}

/* MEDIUM SCREENS */
@media (min-width: 641px) and (max-width: 1024px) {
    .portfolio-gallery {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* LARGE SCREENS */
@media (min-width: 1025px) {
    .portfolio-gallery {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
}
