/* css/style.css - General Website Styles (excluding Header, Footer, Mobile Nav/Sidebar) */
/* --- CSS Variables --- */
/* IMPORTANT: :root variables MUST be defined here, as this is loaded first. */
:root {
    --color-primary: #1A1A1A;
    --color-accent: #B08D5B;
    --color-white: #FFFFFF;
    --color-light-grey: #F5F5F5;
    --color-glass-bg: rgba(255, 255, 255, 0.1);
    --color-glass-border: rgba(255, 255, 255, 0.2);
    --color-mobile-nav-active-bg: rgba(176, 141, 91, 0.1);
    /* Updated Fonts */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;
    --font-alt: 'Outfit', sans-serif;
    /* Base horizontal padding - will be overridden by responsive.css for larger screens */
    --padding-mobile-x: 20px; 
    --padding-desktop-x: clamp(30px, 10vw, 50px); /* Default desktop, adjusted in responsive.css */
    --content-max-width: 1600px; /* Default max width, adjusted in responsive.css */
    /* Section max width - mobile default, adjusted in responsive.css */
    --section-max-width: 99vw; 
    --section-max-width-mobile: 98%; 
    --padding-mobile-x-calculated: 5px; /* Specific smaller mobile padding for some elements */
    --product-section-gap: 4rem;
    --transition-speed: 0.3s ease-in-out;
    --transition-fast: 0.2s ease-out;
    --shadow-subtle: 0 4px 12px rgba(0,0,0,0.05);
    --shadow-medium: 0 8px 20px rgba(0,0,0,0.1);
    --shadow-strong: 0 15px 40px rgba(0,0,0,0.2);
    --shadow-liquid: 0 8px 32px 0 rgba(31, 38, 135, 0.1);

    /* --- Standardized Padding Variables (Mobile-first defaults) --- */
    --section-padding-y-mobile: 60px; 
    --section-padding-y-desktop: 100px; 
    --section-padding-y: var(--section-padding-y-mobile); /* Default to mobile */

    --heading-margin-y-mobile: 1.5rem; 
    --heading-margin-y-desktop: 2rem; 
    --heading-margin-y: var(--heading-margin-y-mobile); /* Default to mobile */
}
/* --- Base Styles & Typography --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    scroll-behavior: smooth;
}
body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--color-primary);
    background-color: var(--color-light-grey);
    overflow-x: hidden;
    position: relative;
}
body.no-scroll {
    overflow: hidden;
}
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
}
h2 {
    font-size: clamp(1.2rem, 4vw, 2.5rem);
    /* Apply standardized vertical margin */
    margin-top: var(--heading-margin-y);
    margin-bottom: var(--heading-margin-y);
}
h3 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
a {
    text-decoration: none;
    color: var(--color-primary);
    transition: color var(--transition-fast);
}
a:hover {
    color: var(--color-accent);
}
img {
    max-width: 100%;
    height: auto;
    display: block;
}
/* --- Full Width Sections & Content Wrapper --- */
.full-width {
    width: 100%;
    position: relative;
}
.section-content {
    max-width: var(--section-max-width); /* Default max width, will be adjusted by responsive.css */
    margin: 0 auto;
    /* Use the new standardized padding variables */
    padding-top: var(--section-padding-y);
    padding-bottom: var(--section-padding-y);
    padding-left: var(--padding-mobile-x);  /* Keep existing horizontal padding logic, will be overridden */
    padding-right: var(--padding-mobile-x); /* Keep existing horizontal padding logic, will be overridden */
    width: 100%;
    text-align: center;
}
/* Specific adjustment for Products Section heading padding */
.products-section .section-content--no-padding-bottom {
    padding-bottom: 0; 
}
/* --- Hero Section (Auto-Slider) --- */
.hero-section {
    height: calc(var(--vh, 1vh) * 100); /* DYNAMIC: Fixes 100vh issue on mobile using JS-calculated value */
    overflow: hidden;
    position: relative;
    background: linear-gradient(145deg, #B08D5B, #F5F5F5, #1A1A1A, #B08D5B);
    background-size: 800% 800%;
    animation: hero-gradient 8s ease-in-out infinite;
}
@keyframes hero-gradient {
    0% {background-position:0% 50%;}
    50% {background-position:100% 50%;}
    100% {background-position:0% 50%;}
}
.hero-slider {
    width: 100%;
    height: 100%;
    overflow: hidden;
}
.hero-slider__track {
    display: flex;
    height: 100%;
    transition: transform 0.8s ease-out;
    will-change: transform;
}
.hero-slider__slide {
    min-width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    color: var(--color-white);
    position: relative;
}
.hero-slider__slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.13);
}
/* Default (Mobile-first) background image */
.hero-slider__slide:nth-child(1) {
    background-image: url('https://cdn.dotworkplace.xyz/assets/Images/slider5.jpg');
}
.hero-slider__slide:nth-child(2) {
    background-image: url('https://cdn.dotworkplace.xyz/assets/Images/slider4.jpg');
}
.hero-slider__slide:nth-child(3) {
    background-image: url('https://cdn.dotworkplace.xyz/assets/Images/slider2.jpg');
}
/* Hero caption base (desktop) */
.hero-slider__caption.section-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0;
    padding-left: var(--padding-mobile-x);
    padding-right: var(--padding-mobile-x);
    text-align: left;
    /* Override standard section padding for hero caption */
    padding-top: 0;
    padding-bottom: 0;
}
.hero-slider__caption h2 {
    font-size: clamp(3rem, 6vw, 5rem);
    line-height: 1.1;
    margin-bottom: 0.5em;
    text-shadow: var(--shadow-liquid);
}
.hero-slider__caption p {
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    opacity: 0.9;
    text-shadow: var(--shadow-subtle);
}
.hero-slider__nav-arrows {
    position: absolute;
    bottom: 40px;
    right: var(--padding-mobile-x);
    z-index: 10;
    display: flex;
    gap: 15px;
}
.slider-arrow {
    background-color: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 1.8rem;
    color: var(--color-white);
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}
.slider-arrow:hover {
    background-color: rgba(255,255,255,0.4);
    transform: translateY(-3px);
}
.slider-arrow:active {
    transform: translateY(0);
}
/* --- About Section Specific Alignment --- */
.about-section .section-content {
    text-align: center;
}
/* --- Product Grid --- */
.product-grid {
    display: grid;
    gap: 30px;
    padding-left: var(--padding-mobile-x);
    padding-right: var(--padding-mobile-x);
    padding-bottom: var(--section-padding-y);
    margin: 0 auto;
    grid-template-columns: repeat(2, 1fr);
}
.product-card {
    background-color: var(--color-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-subtle);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    display: flex;
    flex-direction: column;
    cursor: pointer;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.product-card img {
    width: 100%;
    height: 250px;
    object-fit: contain;
    transition: transform var(--transition-speed);
}
.product-card:hover img {
    transform: scale(1.05);
}
.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: left;
}
.product-info h4 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 0.5em;
    color: var(--color-primary);
}
.product-info p {
    font-size: 0.9rem;
    color: #555;
}
.btn-link {
    display: inline-block;
    margin-top: 15px;
    color: var(--color-accent);
    font-weight: 600;
    font-size: 0.95rem;
}
.btn-link:hover {
    text-decoration: underline;
}
/* By default (for tablet/mobile), only show the first 6 products */
.product-card:nth-child(n+7) {
    display: none;
}
/* --- Gallery Section --- */
.gallery-section {
    text-align: center; /* This will center the button */
}
.gallery-section .section-content {
    padding: 0;
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding-left: var(--padding-mobile-x-calculated); 
    padding-right: var(--padding-mobile-x-calculated); 
    padding-bottom: var(--section-padding-y);
    max-width: var(--section-max-width-mobile); 
    margin: 0 auto;
}
.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border-radius: 8px;
    box-shadow: var(--shadow-subtle);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}
.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform var(--transition-speed);
}
.gallery-item:hover img {
    transform: scale(1.05);
}
/* --- Gallery "Show More" Logic --- */

/* Default for Mobile and Tablet (2x2 and 3x3 grids): Show first 6 items */
.gallery-item:nth-child(n+7) {
    display: none;
}

/* On large Desktop screens (4x4 grid): Override to show first 8 items */
/* This breakpoint should be high enough to only target the 4-column layout */
@media (min-width: 1200px) {
    /* Un-hide items 7 and 8, which were hidden by the default mobile-first rule */
    .gallery-item:nth-child(7),
    .gallery-item:nth-child(8) {
        display: block;
    }
    /* Hide items from 9 onwards for the initial desktop view */
    .gallery-item:nth-child(n+9) {
        display: none;
    }
}

/* When .show-more is active, reveal up to 12 items on all screen sizes */
/* This rule overrides the initial hiding rules */
.gallery-grid.show-more .gallery-item:nth-child(-n+12) {
    display: block;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--color-white);
    opacity: 0;
    transition: opacity var(--transition-fast);
    text-align: center;
    padding: 20px;
}
.gallery-item:hover .gallery-overlay {
    opacity: 1;
}
.gallery-overlay .site-name {
    font-family: var(--font-heading);
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 500;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.gallery-overlay i {
    font-size: clamp(2rem, 3vw, 3rem);
    color: var(--color-accent);
}
/* --- Advanced "Show More" Button Style --- */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.btn-reveal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px; /* Base desktop padding */
    border: 2px solid var(--color-primary);
    background-color: transparent;
    color: var(--color-primary);
    border-radius: 5px;
    cursor: pointer;
    font-family: var(--font-alt); /* UPDATED: Using site font */
    font-weight: 500; /* UPDATED: Adjusted weight */
    font-size: 1rem; /* Base desktop font size */
    letter-spacing: 0.5px; /* UPDATED: Softer letter spacing */
    margin-top: 30px;
    position: relative;
    overflow: hidden;
    transition: background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}
.btn-reveal:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-3px);
    box-shadow: var(--shadow-subtle);
}
.btn-reveal:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: none;
}
.btn-reveal__text,
.btn-reveal__icon {
    display: inline-block;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}
.btn-reveal__icon {
    margin-left: 8px;
    font-size: 1.2em;
}
.btn-reveal__spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -0.6em; 
    margin-left: -0.6em;
    font-size: 0; 
    opacity: 0;
    transition: font-size 0.3s ease-out, opacity 0.3s ease-out;
}
.btn-reveal.is-loading {
    pointer-events: none;
    color: transparent !important;
    background-color: var(--color-primary) !important;
}
.btn-reveal.is-loading .btn-reveal__text,
.btn-reveal.is-loading .btn-reveal__icon {
    opacity: 0;
    transform: translateY(10px);
}
.btn-reveal.is-loading .btn-reveal__spinner {
    font-size: 1.2em;
    opacity: 1;
    animation: spin 1s linear infinite;
    color: var(--color-white);
}
/* --- Lightbox Modal Styles --- */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}
/* Animation for opening */
.lightbox-modal.is-open {
    opacity: 1;
    visibility: visible;
}
/* Wrapper to contain image, loader, and caption */
.lightbox-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    max-width: 95%;
    max-height: 95%;
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55), opacity 0.3s ease-out;
}
.lightbox-modal.is-open .lightbox-wrapper {
    transform: scale(1);
    opacity: 1;
}
.lightbox-image {
    max-width: 100%;
    max-height: calc(100vh - 80px);
    object-fit: contain;
    display: block;
    opacity: 0;
    transition: opacity 0.3s ease-out;
    border-radius: 4px;
}
.lightbox-image.is-loaded {
    opacity: 1;
}
.lightbox-loader {
    display: block;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--color-accent);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}
/* Close Button (No Nav Buttons) */
.lightbox-close-btn {
    background: rgba(255, 255, 255, 0.2);
    color: var(--color-white);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 2.2rem;
    transition: background-color var(--transition-fast), opacity 0.3s ease-out;
    z-index: 10;
    opacity: 0;
    position: absolute;
    top: -20px;
    right: -20px;
    box-shadow: var(--shadow-subtle);
}
.lightbox-close-btn:hover {
    background-color: var(--color-accent);
}
.lightbox-close-btn:active {
    transform: scale(0.95);
}
.lightbox-modal.is-open .lightbox-wrapper:hover .lightbox-close-btn,
.lightbox-close-btn:hover {
    opacity: 1;
}
/* Caption */
.lightbox-caption {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--color-white);
    text-align: center;
    margin-top: 15px;
    padding: 8px 15px;
    background-color: rgba(0,0,0,0.4);
    border-radius: 5px;
    max-width: 80%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* --- Clients Section (Auto Logo Carousel) --- */
.clients-section {
    background-color: var(--color-white);
    position: relative;
    z-index: 1;
}
.client-logo-carousel {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    position: relative;
    padding: 30px 0;
    max-width: var(--content-max-width);
    margin: 0 auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
/* Hide scrollbar for Chrome, Safari, Opera */
.client-logo-carousel::-webkit-scrollbar {
    display: none;
}
/* Left fade overlay */
.client-logo-carousel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 8%;
    background: linear-gradient(to right, var(--color-white), transparent);
    pointer-events: none;
    z-index: 2;
}
/* Right fade overlay */
.client-logo-carousel::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 8%;
    background: linear-gradient(to left, var(--color-white), transparent);
    pointer-events: none;
    z-index: 2;
}
.client-logo {
    display: inline-block;
    height: 80px;
    margin: 0 40px;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: filter var(--transition-fast), opacity var(--transition-fast);
    mix-blend-mode: multiply;
}
.client-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
}
/* --- Sustainability Section --- */
.sustainability-content {
    align-items: center;
    text-align: center;
}
.sustainability-image {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 1.5rem;
}
.sustainability-image video {
    height: auto;
    max-width: 70vw;
    width: 100%;
    border-radius: 8px;
    box-shadow: var(--shadow-subtle);
}
.sustainability-text {
    flex: 1;
    padding-right: 0;
    text-align: center;
}
.sustainability-content ul {
    list-style: none;
    margin-top: 20px;
    padding-left: 0;
}
.sustainability-content ul li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    color: #333;
    justify-content: center;
}
.sustainability-content ul li i {
    font-size: 1.5rem;
    margin-right: 10px;
    color: var(--color-accent);
}
/* --- Contact Section --- */
.contact-section .section-content {
    text-align: center;
    padding-bottom: calc(var(--section-padding-y) / 2);
}
.form-container {
    background-color: var(--color-white);
    border-radius: 8px;
    box-shadow: var(--shadow-subtle);
    padding: 30px;
    max-width: 600px;
    margin: calc(var(--section-padding-y) / 2) auto 0; 
    text-align: left;
}
.form-container h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 1.5em;
    color: var(--color-primary);
    text-align: center;
}
.form-container form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.form-container label {
    font-weight: 500;
    margin-bottom: 5px;
    display: block;
    color: var(--color-primary);
}
.form-container input[type="text"],
.form-container input[type="email"],
.form-container textarea {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-primary);
    background-color: var(--color-light-grey);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.form-container input[type="text"]:focus,
.form-container input[type="email"]:focus,
.form-container textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(var(--color-accent), 0.1);
    background-color: var(--color-white);
}
.form-container textarea {
    resize: vertical;
    min-height: 100px;
}
.required-star {
    color: var(--color-accent);
    font-size: 1.2em;
    margin-left: 2px;
}
.form-container button[type="submit"] {
    display: inline-block;
    padding: 15px 30px;
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: background-color var(--transition-speed), transform var(--transition-fast);
    align-self: center;
    margin-top: 20px;
}
.form-container button[type="submit"]:hover {
    background-color: var(--color-accent);
    transform: translateY(-2px);
}
.form-container button[type="submit"]:active {
    transform: translateY(0);
}
/* --- Popups (Feedback & Loading) --- */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none; /* Changed from flex to none */
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
}
.popup.is-visible {
    display: flex; /* Display is controlled by this class */
    opacity: 1;
    visibility: visible;
}
.popup-content {
    background-color: var(--color-white);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow-strong);
    max-width: 400px;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}
.popup.is-visible .popup-content {
    transform: scale(1);
}
.popup-content h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 0.5em;
    color: var(--color-primary);
}
.colorful-text {
    color: var(--color-accent);
}
.popup-content p {
    font-size: 1rem;
    color: #555;
}

/* --- NEW: Enquiry Form Popup Specific Styles --- */
#enquiry-popup .form-container {
    position: relative;
    margin: 0; /* Override margin from contact section */
    max-width: 500px;
    width: 90vw;
}
.popup-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--color-primary);
    padding: 5px;
    border-radius: 50%;
    line-height: 1;
    transition: background-color var(--transition-fast);
}
.popup-close-btn:hover {
    background-color: var(--color-light-grey);
}


/* --- Animations (Scroll Fade-in) --- */
.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}
.fade-in-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Custom Scrollbar Styles --- */
/* Works on Webkit-based browsers (Chrome, Safari, Edge, etc.) */
body::-webkit-scrollbar {
    width: 12px;
}

body::-webkit-scrollbar-track {
    background: var(--color-light-grey);
}

body::-webkit-scrollbar-thumb {
    background-color: rgba(26, 26, 26, 0.4);
    border-radius: 10px;
    border: 3px solid var(--color-light-grey);
    transition: background-color var(--transition-fast);
}

body::-webkit-scrollbar-thumb:hover {
    background-color: var(--color-accent);
}