/* ==========================================================================
   Design System & Variables
   ========================================================================== */
:root {
    /* Colors */
    --clr-dark: #1a1a1a;
    /* Anthracite */
    --clr-dark-alt: #2c2c2c;
    --clr-light: #f8f9fa;
    /* Off-white */
    --clr-white: #ffffff;
    --clr-stone: #e6e2dd;
    /* Stone beige */
    --clr-accent: #e85d2a;
    /* Premium Orange */
    --clr-accent-hover: #cf5224;
    --clr-text: #4a4a4a;
    --clr-text-light: #7a7a7a;

    /* Typography */
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 8rem;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
    --shadow-accent: 0 8px 24px rgba(232, 93, 42, 0.25);

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    color: var(--clr-text);
    background-color: var(--clr-white);
    line-height: 1.6;
    overflow-x: hidden;
    max-width: 100vw;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--clr-dark);
    line-height: 1.2;
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-normal);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Utility Classes */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-sm);
}

.section {
    padding: var(--space-xl) 0;
}

.text-accent {
    color: var(--clr-accent);
}

.bg-light {
    background-color: var(--clr-light);
}

.bg-dark {
    background-color: var(--clr-dark);
}

.placeholder-bg {
    background-color: var(--clr-stone);
    position: relative;
    overflow: hidden;
}

.mt-2 {
    margin-top: var(--space-sm);
}

.mt-4 {
    margin-top: var(--space-md);
}

.pb-5 {
    padding-bottom: 5rem;
}

/* ==========================================================================
   Typography & Components
   ========================================================================== */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-lg);
}

.section-subtitle {
    display: inline-block;
    font-family: var(--font-heading);
    color: var(--clr-accent);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: var(--space-sm);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: var(--space-sm);
}

.section-desc {
    color: var(--clr-text-light);
    font-size: 1.125rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-weight: 500;
    cursor: pointer;
    border: none;
    outline: none;
    transition: var(--transition-normal);
    min-height: 48px; /* Ensure 48px height for touch targets */
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-primary {
    background-color: var(--clr-accent);
    color: var(--clr-white);
}

.btn-primary:hover {
    background-color: var(--clr-accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-accent);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--clr-white);
    color: var(--clr-white);
}

.btn-outline:hover {
    background-color: var(--clr-white);
    color: var(--clr-dark);
}

.btn-full {
    width: 100%;
}

.arrow-anim {
    transition: transform var(--transition-fast);
}

.group:hover .arrow-anim {
    transform: translateX(4px);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition-normal);
    padding: 1.5rem 0;
}

.header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
}

.header.scrolled .logo,
.header.scrolled .nav-link {
    color: var(--clr-dark);
}

.header.scrolled .mobile-toggle {
    color: var(--clr-dark);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--clr-white);
    z-index: 1001;
}

.site-logo {
    height: 60px;
    /* Adjust height based on actual logo proportion */
    width: auto;
    border-radius: var(--radius-sm);
    transition: transform var(--transition-fast);
}

.site-logo:hover {
    transform: scale(1.05);
}

/* Removed redundant logo icon color block */

.nav-list {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--clr-white);
    font-weight: 500;
    font-size: 0.9375rem;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--clr-accent);
    transition: var(--transition-normal);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.btn-primary-nav {
    background-color: var(--clr-accent);
    color: var(--clr-white) !important;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
}

.btn-primary-nav::after {
    display: none;
}

.header.scrolled .btn-primary-nav:hover {
    background-color: var(--clr-accent-hover);
    color: var(--clr-white);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--clr-white);
    font-size: 2rem;
    cursor: pointer;
    z-index: 1001;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    padding-bottom: 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('carrelage-multi.jpg');
    /* Modern construction/tiling bg */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Parallax */
    z-index: -1;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(26, 26, 26, 0.9) 0%, rgba(26, 26, 26, 0.6) 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
}

.hero-text-wrapper {
    max-width: 800px;
}

.badge {
    display: inline-block;
    padding: 0.25rem 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: var(--clr-white);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(4px);
}

.hero-title {
    color: var(--clr-white);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    color: var(--clr-stone);
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.hero-features {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--clr-white);
    font-weight: 500;
}

.feature-item i {
    color: var(--clr-accent);
    font-size: 1.5rem;
}

.scroll-down-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--clr-white);
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 6px;
    background-color: var(--clr-accent);
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 1.5s infinite;
}

@keyframes scroll {
    0% {
        top: 6px;
        opacity: 1;
    }

    100% {
        top: 20px;
        opacity: 0;
    }
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 4rem;
}

.about-image-wrapper {
    position: relative;
    order: 1; /* Default order on desktop works as is or can specify 1 and 2, let's keep it implicitly ordered, will change on mobile */
}

.about-content {
    order: 2; /* Default on desktop */
}

.about-image-placeholder {
    width: 100%;
    aspect-ratio: 4/5;
    background-color: var(--clr-stone);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('https://images.unsplash.com/photo-1541888081-06bde9a65f97?q=80&w=1964&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
}

.about-image-placeholder i {
    font-size: 4rem;
    color: var(--clr-dark);
    opacity: 0.2;
    display: none;
    /* Hide icon since we have bg image */
}

.experience-badge {
    position: absolute;
    bottom: -2rem;
    right: -2rem;
    background-color: var(--clr-dark);
    color: var(--clr-white);
    padding: 2rem;
    border-radius: var(--radius-sm);
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.exp-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    color: var(--clr-accent);
    line-height: 1;
}

.exp-text {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.about-text {
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

.values-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.value-item {
    display: flex;
    gap: 1rem;
}

.value-icon {
    width: 48px;
    height: 48px;
    background-color: var(--clr-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--clr-accent);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.value-item h3 {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.intervention-zone {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background-color: var(--clr-light);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--clr-accent);
}

.intervention-zone i {
    color: var(--clr-accent);
    font-size: 1.25rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    border-top: 1px solid var(--clr-stone);
    padding-top: 3rem;
    margin-top: 2rem;
}

.stat-card {
    text-align: center;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--clr-dark);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--clr-text-light);
    font-weight: 500;
}

/* ==========================================================================
   Services Section
   ========================================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--clr-white);
    padding: 2.5rem 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--clr-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-normal);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
    border-color: rgba(232, 93, 42, 0.1);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--clr-accent);
    margin-bottom: 1.5rem;
    transition: transform var(--transition-normal);
}

.service-card:hover .service-icon {
    transform: scale(1.1);
}

.service-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-desc {
    color: var(--clr-text-light);
    margin-bottom: 1.5rem;
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--clr-dark);
    font-weight: 600;
    font-family: var(--font-heading);
    margin-top: auto;
}

.service-link i {
    color: var(--clr-accent);
    transition: transform var(--transition-fast);
}

.service-link:hover i {
    transform: translateX(4px);
}

/* ==========================================================================
   Process Section
   ========================================================================== */
.process-steps {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.process-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 2;
    padding: 0 1rem;
}

.step-number {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 800;
    color: var(--clr-stone);
    line-height: 1;
    margin-bottom: -1.5rem;
    opacity: 0.5;
}

.step-icon {
    width: 80px;
    height: 80px;
    background-color: var(--clr-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--clr-dark);
    box-shadow: var(--shadow-md);
    margin: 0 auto 1.5rem;
    position: relative;
    border: 2px solid var(--clr-light);
    transition: var(--transition-normal);
}

.process-step:hover .step-icon {
    background-color: var(--clr-accent);
    color: var(--clr-white);
    border-color: var(--clr-accent);
    transform: translateY(-5px);
}

.step-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.step-desc {
    color: var(--clr-text-light);
    font-size: 0.9375rem;
}

.step-connector {
    flex: 0.5;
    height: 2px;
    background-color: var(--clr-stone);
    margin-top: 60px;
    /* Align with middle of icons */
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   Gallery Section
   ========================================================================== */
.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: none;
    border: 1px solid var(--clr-stone);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: 500;
    color: var(--clr-text);
    transition: var(--transition-normal);
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--clr-dark);
    color: var(--clr-white);
    border-color: var(--clr-dark);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (min-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Make some items span differently for masonry look */
.gallery-item:nth-child(2) {
    grid-row: span 2;
}

/* .gallery-item:nth-child(4) removed to prevent large width */

.gallery-img-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 300px;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
}

.gallery-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(26, 26, 26, 0.9) 0%, rgba(26, 26, 26, 0.2) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-category {
    color: var(--clr-accent);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transform: translateY(20px);
    transition: transform var(--transition-normal);
}

.gallery-title {
    color: var(--clr-white);
    font-size: 1.5rem;
    transform: translateY(20px);
    transition: transform var(--transition-normal) 0.1s;
}

.zoom-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    width: 60px;
    height: 60px;
    background-color: var(--clr-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--clr-white);
    font-size: 1.5rem;
    opacity: 0;
    transition: all var(--transition-normal);
}

.gallery-item:hover .gallery-category,
.gallery-item:hover .gallery-title {
    transform: translateY(0);
}

.gallery-item:hover .zoom-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* ==========================================================================
   Testimonials
   ========================================================================== */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.testimonial-card {
    background-color: var(--clr-white);
    padding: 3rem 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.testimonial-card::after {
    content: '"';
    position: absolute;
    top: 1rem;
    right: 2rem;
    font-family: var(--font-heading);
    font-size: 8rem;
    color: var(--clr-stone);
    opacity: 0.3;
    line-height: 1;
}

.stars {
    color: var(--clr-accent);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.testimonial-text {
    font-size: 1.125rem;
    font-style: italic;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--clr-dark);
}

.testimonial-author h4 {
    margin-bottom: 0.125rem;
}

.testimonial-author span {
    color: var(--clr-text-light);
    font-size: 0.875rem;
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

.contact-info p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 3rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-method-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background-color: var(--clr-dark-alt);
    border-radius: var(--radius-sm);
    transition: var(--transition-normal);
}

.contact-method-card:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateX(10px);
}

.contact-method-card.whatsapp:hover {
    background-color: #25D366;
    color: var(--clr-white);
}

.contact-method-card.whatsapp:hover .icon-box {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--clr-white);
}

.icon-box {
    width: 50px;
    height: 50px;
    background-color: rgba(232, 93, 42, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--clr-accent);
    font-size: 1.5rem;
    transition: var(--transition-normal);
}

.contact-method-card .label {
    display: block;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.25rem;
}

.contact-method-card .value {
    font-size: 1.125rem;
    font-family: var(--font-heading);
}

.contact-form-wrapper {
    background-color: var(--clr-white);
    padding: 3rem;
    border-radius: var(--radius-md);
    color: var(--clr-dark);
}

.form-title {
    margin-bottom: 2rem;
    font-size: 1.75rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9375rem;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--clr-stone);
    border-radius: var(--radius-sm);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: var(--transition-fast);
    background-color: var(--clr-light);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--clr-accent);
    background-color: var(--clr-white);
    box-shadow: 0 0 0 3px rgba(232, 93, 42, 0.1);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: var(--clr-dark);
    color: var(--clr-white);
    padding-top: 5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-logo {
    margin-bottom: 1.5rem;
}

.site-logo-footer {
    height: 80px;
    width: auto;
    border-radius: var(--radius-sm);
}

.footer-desc {
    color: rgba(255, 255, 255, 0.6);
    max-width: 300px;
}

.footer h4 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
}

.footer-links a:hover {
    color: var(--clr-accent);
    padding-left: 5px;
}

.text-sm {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9375rem;
}

.footer-bottom {
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

.footer-legal {
    display: flex;
    gap: 1.5rem;
}

.footer-legal a:hover {
    color: var(--clr-white);
}

/* ==========================================================================
   Globals & Animations
   ========================================================================== */
/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
}

.lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: var(--clr-white);
    font-size: 2rem;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.lightbox-close:hover {
    color: var(--clr-accent);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--clr-white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.lightbox-nav:hover {
    background: var(--clr-accent);
}

.lightbox-nav.prev {
    left: -70px;
}

.lightbox-nav.next {
    right: -70px;
}

/* Floating Elements */
.floating-cta {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--clr-white);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    transition: var(--transition-normal);
}

.whatsapp-float {
    background-color: #25D366;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 6rem;
    width: 50px;
    height: 50px;
    background-color: var(--clr-dark);
    color: var(--clr-white);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: var(--transition-normal);
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--clr-accent);
}

/* Scroll Reveals */
.reveal {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translate(0, 0);
}

.fade-up {
    transform: translateY(50px);
}

.fade-right {
    transform: translateX(-50px);
}

.fade-left {
    transform: translateX(50px);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* 1280px + is handled by base container class */

@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-item:nth-child(2) {
        grid-row: span 1; /* Turn off masonry for uniformity on smaller screens */
    }
}

@media (max-width: 992px) {

    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .experience-badge {
        bottom: -1rem;
        right: 1rem;
    }

    .process-steps {
        flex-direction: column;
        align-items: center;
        gap: 3rem;
    }

    .step-connector {
        display: none;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }
    
    .hero-title {
        font-size: 2.5rem; /* Ensure doesn't cut off */
    }

    .navbar {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--clr-white);
        padding: 6rem 2rem 2rem;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        transition: right var(--transition-normal);
        overflow-y: auto;
    }

    .navbar.active {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-link {
        color: var(--clr-dark);
        font-size: 1.125rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 640px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .about-image-wrapper {
        order: -1; /* Image first on mobile */
    }
    
    .about-content {
        order: 2; /* Text below image on mobile */
    }
    
    .hero {
        min-height: auto; /* Allow auto height on very small devices to prevent huge gaps if content is tall */
        padding-top: 120px;
    }
}

/* Landscape orientation adjustments for mobile (phones turned sideways) */
@media (max-height: 480px) and (orientation: landscape) {
    .header {
        padding: 0.5rem 0; /* Reduce header height */
    }

    .hero {
        min-height: max-content;
        padding-top: 80px; /* Less top padding so it doesn't overlap header */
        padding-bottom: 60px;
    }
    
    .hero-title {
        font-size: 1.75rem; /* Slightly smaller to fit better */
        margin-bottom: 0.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .navbar {
        padding-top: 4rem; /* less padding for landscape */
    }
    
    .nav-list {
        gap: 0.5rem;
    }
    
    .hero-cta {
        flex-direction: row;
        gap: 0.5rem;
        margin-bottom: 2rem;
    }
    
    .hero-cta .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        white-space: nowrap; /* Prevent text breaking like 'de mander 1 de vis' */
    }

    .scroll-down-indicator {
        bottom: 0.5rem; /* Move up slightly to avoid overlapping 'Chantier propre' */
        transform: scale(0.8) translateX(-50%); /* Make slightly smaller */
    }
}

/* Fix parallax blur on mobile */
@media (max-width: 1024px) {
    .hero-bg {
        background-attachment: scroll;
    }
}
