/* NETCOM CLEAN - Main Stylesheet */

/* Base Styles */
* {
    font-family: 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
}

/* CSS Variables — aligned with official NETCOM CLEAN brand identity */
:root {
    --primary: #0a396d;
    /* Brand primary: logo name color */
    --secondary: #1a72bb;
    /* Brand secondary: lighter complement for gradients */
    --accent: #10b981;
    /* Keep green accent for trust indicators */
    --brand-neutral: #e7e7e7;
    /* Brand neutral: logo symbol color */
    --dark-bg: #0c1929;
    /* Dark mode bg — slightly tinted with brand blue */
    --dark-card: #172436;
    /* Dark mode card — brand-tinted */
}

/* Dark Mode Styles */
body.dark-mode {
    background-color: var(--dark-bg);
    color: #f1f5f9;
}

body.dark-mode .bg-white {
    background-color: var(--dark-card) !important;
}

body.dark-mode .text-gray-800,
body.dark-mode .text-gray-900 {
    color: #f1f5f9 !important;
}

body.dark-mode .text-gray-600 {
    color: #cbd5e1 !important;
}

body.dark-mode .bg-gray-50 {
    background-color: #172436 !important;
}

body.dark-mode .bg-gray-100 {
    background-color: #1e3a5f !important;
}

/* Hero Section with Background Image */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://images.unsplash.com/photo-1600585154340-be6161a56a0c?w=1920&h=1080&fit=crop&q=80');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.1) 100%);
    z-index: 1;
}

/* Service Cards */
.service-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: rgba(26, 114, 187, 0.35);
    /* lighter brand blue accent */
}

/* Gallery Items */
.gallery-item {
    overflow: hidden;
    transition: transform 0.3s ease;
}

.gallery-item img {
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Hide scrollbar but keep functionality */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Mobile Menu */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-menu.active {
    transform: translateX(0);
}

/* Dark Mode Transition */
.dark-mode-transition {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Primary Button */
.btn-primary {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    /* lighter blue leads → dark blue trails */
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 25px rgba(26, 114, 187, 0.4);
    /* #1a72bb shadow */
}

/* Secondary Button */
.btn-secondary {
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    transform: translateY(-2px) scale(1.02);
}

/* Quote Modal */
.quote-modal {
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.quote-modal.hidden {
    display: none !important;
}

.modal-content {
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Form Inputs */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* Mobile Responsiveness Improvements */
@media (max-width: 640px) {
    .hero-section h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero-section p {
        font-size: 1rem;
    }

    .service-card {
        margin-bottom: 1rem;
    }

    .modal-content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }
}

/* Tablet Responsiveness */
@media (min-width: 641px) and (max-width: 1024px) {
    .hero-section h1 {
        font-size: 3rem;
    }
}

/* Google Maps iframe */
iframe[title*="Localisation"] {
    min-height: 500px;
    border: 0;
}

@media (max-width: 768px) {
    iframe[title*="Localisation"] {
        min-height: 350px;
    }
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 100;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    cursor: pointer;
}

.whatsapp-float:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.6);
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
    color: white;
}

@media (max-width: 640px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
    }

    .whatsapp-float svg {
        width: 28px;
        height: 28px;
    }
}

/* Improved Section Spacing */
@media (max-width: 640px) {
    .section-spacing {
        padding-top: 3.5rem;
        padding-bottom: 3.5rem;
    }
}

@media (min-width: 641px) {
    .section-spacing {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }
}

/* Enhanced Card Hover Effects */
.card-hover {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-8px);
}

/* Smooth Navbar Shadow */
nav.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Typography Improvements */
.hero-headline {
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.section-title {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

/* Prevent horizontal overflow on all elements */
* {
    max-width: 100%;
}

.container-safe {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

@media (max-width: 640px) {
    .container-safe {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* ============================================================
   TESTIMONIALS CAROUSEL (Task 1)
   ============================================================ */

/* On mobile: each slide takes 100% of the track width */
.testimonial-slide {
    min-width: 100%;
}

/* On md+ screens: each slide takes exactly 1/3 of the track width */
@media (min-width: 768px) {
    .testimonial-slide {
        min-width: 33.3333%;
    }
}

/* Arrow buttons — hide partially off the card on small screens */
@media (max-width: 767px) {
    .testimonial-arrow {
        display: none;
    }
}

/* Active dot scales up slightly for emphasis */
.testimonial-dot.bg-blue-600 {
    transform: scale(1.35);
    width: 0.875rem;
    height: 0.875rem;
}

/* ============================================================
   NAVBAR LOGO (Task 2 & 3)
   ============================================================ */

/* In dark mode, the dark-blue SVG logo needs to be visible */
body.dark-mode nav img[alt="NETCOM CLEAN Logo"] {
    filter: brightness(0) invert(1);
}

/* ============================================================
   GALLERY POLISH (Task 4)
   ============================================================ */

/* Slightly stronger shadow on gallery items for depth */
.gallery-item {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.35s ease;
}

.gallery-item:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

/* Mobile gallery swipe cards */
@media (max-width: 767px) {
    #gallery .flex.overflow-x-auto {
        padding-bottom: 1rem;
        gap: 0.75rem;
    }

    #gallery .gallery-item.flex-shrink-0 {
        width: 85vw;
    }
}

/* ============================================================
   SECTION RHYTHM (Task 5 — global polish)
   ============================================================ */

/* Slightly increase vertical rhythm on larger screens */
@media (min-width: 1024px) {
    .section-spacing {
        padding-top: 5.5rem;
        padding-bottom: 5.5rem;
    }
}

/* Headings inside sections always have a comfortable margin */
.section-title+p {
    margin-top: 0.5rem;
}

/* ============================================================
   ABOUT SECTION (Task 6)
   ============================================================ */

/* Ensure the image container fills the grid cell vertically */
#about .container-safe>div>div:first-child {
    align-self: stretch;
}

/* ============================================================
   BRAND COLOR SYSTEM — NETCOM CLEAN Identity Alignment
   Primary: #0a396d | Secondary: #1a72bb | Neutral: #e7e7e7
   These overrides bring all Tailwind blue-* interactive elements
   in line with the official brand palette.
   ============================================================ */

/* --- Navigation link hovers -------------------------------- */
nav a:hover,
.mobile-menu a:hover {
    color: #1a72bb !important;
}

/* Active / current nav link highlight */
nav a.text-blue-600 {
    color: #1a72bb !important;
}

/* --- Scroll-to-Top FAB ------------------------------------- */
a[aria-label="Retour en haut"] {
    background-color: #1a72bb !important;
}

a[aria-label="Retour en haut"]:hover {
    background-color: #2283cc !important;
    /* slightly lighter on hover */
}

/* --- Gallery "Voir plus" link ------------------------------ */
#showMoreGallery {
    color: #1a72bb;
}

#showMoreGallery:hover {
    color: #0a396d;
}

/* --- Contact email link ------------------------------------ */
a[href^="mailto"] {
    color: #1a72bb;
}

a[href^="mailto"]:hover {
    color: #0a396d;
}

/* --- Form focus ring --------------------------------------- */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(26, 114, 187, 0.25) !important;
    border-color: #1a72bb !important;
}

/* --- About section stats highlight ------------------------- */
#about .text-blue-600 {
    color: #1a72bb !important;
}

#about .bg-blue-50 {
    background-color: #eaf4fb !important;
    /* lighter brand-tinted blue */
}

/* --- Testimonial carousel dot (active state) --------------- */
.testimonial-dot.bg-blue-600 {
    background-color: #1a72bb !important;
}

/* --- Testimonial arrow hover ------------------------------- */
.testimonial-arrow:hover {
    color: #1a72bb !important;
}

/* --- Brand-neutral divider accent -------------------------- */
.brand-divider {
    background-color: #e7e7e7;
    height: 1px;
}

/* ============================================================
   DARK MODE — Brand Color Overrides
   Ensure critical interactive elements remain legible against
   the brand-tinted dark backgrounds.
   ============================================================ */

/* Navbar in dark mode */
body.dark-mode nav {
    background-color: #0f2238 !important;
    /* deep brand-tinted navy */
    border-bottom: 1px solid rgba(231, 231, 231, 0.08);
}

/* Nav links in dark mode */
body.dark-mode nav a {
    color: #cbd5e1;
}

body.dark-mode nav a:hover {
    color: #7eb3e0 !important;
    /* lighter brand blue for dark bg contrast */
}

/* Navbar logo remains visible in dark mode (dark blue→white) */
body.dark-mode nav img[alt="NETCOM CLEAN Logo"] {
    filter: brightness(0) invert(1);
}

/* Buttons keep sufficient contrast on dark bg */
body.dark-mode .btn-primary {
    background: linear-gradient(135deg, #1a72bb 0%, #0a396d 100%);
    box-shadow: 0 4px 15px rgba(26, 114, 187, 0.4);
}

body.dark-mode .btn-primary:hover {
    box-shadow: 0 8px 25px rgba(26, 114, 187, 0.6);
}

/* Dark mode: gallery + testimonial cards maintain readable accents */
body.dark-mode .text-blue-600 {
    color: #7eb3e0 !important;
    /* readable bright blue on dark bg */
}

body.dark-mode .bg-blue-100 {
    background-color: #1a3d5c !important;
}

body.dark-mode .bg-blue-50 {
    background-color: #12304e !important;
}

/* Dark mode: form focus */
body.dark-mode input:focus,
body.dark-mode select:focus,
body.dark-mode textarea:focus {
    box-shadow: 0 0 0 3px rgba(126, 179, 224, 0.3) !important;
    border-color: #7eb3e0 !important;
}

/* Dark mode: email link */
body.dark-mode a[href^="mailto"] {
    color: #7eb3e0;
}

body.dark-mode a[href^="mailto"]:hover {
    color: #a8ccee;
}

/* Dark mode: scroll-to-top FAB stays visible */
body.dark-mode a[aria-label="Retour en haut"] {
    background-color: #1a72bb !important;
}

body.dark-mode a[aria-label="Retour en haut"]:hover {
    background-color: #2283cc !important;
}

/* Dark mode: active testimonial dot */
body.dark-mode .testimonial-dot.bg-blue-600 {
    background-color: #1a72bb !important;
}

/* Dark mode: "Voir plus" gallery button */
body.dark-mode #showMoreGallery {
    color: #7eb3e0 !important;
}

/* Dark mode: footer logo stays white */
footer img[alt="NETCOM CLEAN Logo"] {
    filter: brightness(0) invert(1);
}

/* Dark mode: footer text */
body.dark-mode footer {
    background-color: #070f1a;
}