/* 
   MARCENARIA NEW MODEL V1
   Clean, Modern, Landing Page Structure
*/

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #8B4513; /* Wood tone */
    --secondary: #2C2C2C; /* Dark Grey */
    --accent: #D4A373; /* Light Wood */
    --bg-light: #F9F9F9;
    --text-dark: #1A1A1A;
    --text-light: #F4F4F4;
    --border: #E5E5E5;
    --font-main: 'Plus Jakarta Sans', sans-serif;
    --container: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: #fff;
    overflow-x: hidden;
}

h1, h2, h3, h4 { font-weight: 700; color: var(--secondary); line-height: 1.2; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
img { max-width: 100%; display: block; object-fit: cover; }

/* Utility */
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; }
.text-center { text-align: center; }
.flex { display: flex; align-items: center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }

.btn {
    display: inline-block;
    padding: 14px 28px;
    background: var(--secondary);
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}
.btn:hover { background: var(--primary); }
.btn-outline {
    background: transparent;
    border: 2px solid var(--secondary);
    color: var(--secondary);
}
.btn-outline:hover { background: var(--secondary); color: #fff; }

/* Header V3 Style Logic */
.header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    background: transparent; /* Starts transparent like V3 */
    box-shadow: none;
    z-index: 1000;
    height: 90px;
    transition: all 0.4s ease;
    padding: 0 20px;
}
.header.scrolled {
    background: var(--text-dark); /* Becomes dark/solid like V3/Wood brand */
    height: 70px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.navbar {
    height: 100%;
    justify-content: space-between;
}

.logo { 
    font-size: 1.5rem; 
    font-weight: 800; 
    letter-spacing: -1px; 
    text-transform: uppercase;
    color: #fff; /* White initially */
}
.header.scrolled .logo { color: #fff; } /* Stays white on dark bg */
.logo span { color: var(--accent); } /* High contrast */

/* Nav Links V3 Style */
.nav-menu { display: flex; gap: 40px; align-items: center; }
.nav-link { 
    font-weight: 500; 
    font-size: 0.9rem; 
    color: rgba(255,255,255,0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}
.nav-link:after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent);
    transition: width 0.3s;
}
.nav-link:hover { color: #fff; }
.nav-link:hover:after { width: 100%; }

.btn-header {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 10px 25px;
    border-radius: 50px; /* Pill shape like V3 */
    color: #fff;
}
.btn-header:hover {
    background: #fff;
    color: var(--text-dark);
}

.mobile-toggle { display: none; font-size: 1.5rem; cursor: pointer; color: #fff; }

/* Hero Adjustment for Fixed Transparent Header */
.hero {
    padding-top: 0; /* Removing padding so bg goes under header */
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('../images/hero-bg.jpg') center/cover no-repeat;
    color: #fff;
}
.hero-content {
    max-width: 700px;
    padding-top: 80px;
}
.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: #fff;
}
.hero p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
}
.hero .btn { background: var(--primary); border: none; }
.hero .btn:hover { background: #fff; color: var(--primary); }

/* Features */
.features { background: var(--bg-light); }
.feature-card {
    background: #fff;
    padding: 40px;
    border-bottom: 3px solid transparent;
    transition: 0.3s;
}
.feature-card:hover { border-bottom-color: var(--primary); transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.feature-icon { font-size: 2rem; color: var(--primary); margin-bottom: 20px; }
.feature-card h3 { margin-bottom: 15px; }

/* About */
.about-img { position: relative; }
.about-img::before {
    content: '';
    position: absolute;
    top: -20px; left: -20px;
    width: 200px; height: 200px;
    background: var(--bg-light);
    z-index: -1;
}
.about-text h2 { font-size: 2.5rem; margin-bottom: 20px; }
.about-text p { margin-bottom: 20px; color: #555; }

/* Services/Projects (Gallery Style) */
.gallery-section { padding-bottom: 0; }
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 400px;
}
.gallery-item {
    position: relative;
    overflow: hidden;
    height: 100%;
}
.gallery-item img {
    width: 100%; height: 100%;
    transition: 0.5s;
}
.gallery-item:hover img { transform: scale(1.1); }
.gallery-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: 0.3s;
    cursor: pointer;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-title { color: #fff; font-size: 1.2rem; font-weight: 700; text-transform: uppercase; border: 1px solid #fff; padding: 10px 20px; }

/* Process Section */
.process-card {
    background: #fff;
    padding: 30px;
    border: 1px solid #eee;
    text-align: center;
    transition: 0.3s;
}
.process-card:hover { border-color: var(--primary); transform: translateY(-5px); }
.step-number {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    opacity: 0.2;
    margin-bottom: 10px;
    line-height: 1;
}
.process-card h3 { margin-bottom: 15px; }

/* Testimonials */
.testimonial-card {
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    font-style: italic;
    position: relative;
}
.testimonial-card:before {
    content: '"';
    font-size: 5rem;
    color: var(--primary);
    opacity: 0.1;
    position: absolute;
    top: 0px; left: 20px;
    font-family: serif;
}
.testimonial-card p { margin-bottom: 20px; color: #555; font-size: 1.1rem; }
.client-info strong { display: block; color: var(--secondary); }
.client-info span { font-size: 0.85rem; color: #888; }

/* Stats Section */
.stats-section {
    background: var(--secondary);
    color: #fff;
    padding: 100px 0;
    position: relative;
    background-image: url('../images/hero-bg.jpg'); /* Reuse hero bg with overlay */
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
}
.stats-overlay {
    position: absolute;
    top:0; left:0; width:100%; height:100%;
    background: rgba(0,0,0,0.8);
    z-index: 1;
}
.stats-content { position: relative; z-index: 2; }
.stat-item h3 { font-size: 3.5rem; color: var(--accent); margin-bottom: 5px; }
.stat-item p { font-size: 1.1rem; opacity: 0.8; text-transform: uppercase; letter-spacing: 1px; }

/* Materials / Brands Section */
.brands-section { background: #fff; border-top: 1px solid #eee; border-bottom: 1px solid #eee; }
.brands-grid {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 40px;
    opacity: 0.6;
}
.brand-item {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ccc;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 10px;
}
.brand-item i { font-size: 2rem; }

/* FAQ Section */
.faq-container { max-width: 800px; margin: 0 auto; }
.accordion-item { border-bottom: 1px solid #eee; }
.accordion-header {
    background: #fff;
    padding: 25px 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1.1rem;
    transition: 0.3s;
}
.accordion-header:hover { color: var(--primary); }
.accordion-header i { transition: 0.3s; }
.accordion-header.active i { transform: rotate(180deg); }
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 10px;
    color: #666;
    line-height: 1.6;
}
.accordion-content p { padding-bottom: 25px; }

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
}
.lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 900px;
    max-height: 80vh;
    object-fit: contain;
    animation: zoom 0.6s;
}
@keyframes zoom {
  from {transform:scale(0)} 
  to {transform:scale(1)}
}
.close-lightbox {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}
.close-lightbox:hover,
.close-lightbox:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}
#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
    font-size: 1.2rem;
}

/* Simple Quote/CTA */
.cta-section {
    background: var(--secondary);
    color: #fff;
    padding: 100px 0;
    text-align: center;
}
.cta-section h2 { color: #fff; font-size: 2.5rem; margin-bottom: 20px; }
.cta-section p { margin-bottom: 30px; opacity: 0.8; max-width: 700px; margin-left: auto; margin-right: auto; }

/* Footer */
.footer { background: #111; color: #777; padding: 60px 0 20px; font-size: 0.9rem; }
.footer h4 { color: #fff; margin-bottom: 20px; font-size: 1.2rem; }
.footer ul li { margin-bottom: 10px; }
.footer ul a:hover { color: var(--primary); }
.copyright { border-top: 1px solid #333; margin-top: 50px; padding-top: 20px; text-align: center; }

@media (max-width: 900px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; gap: 30px; }
    .hero h1 { font-size: 2.2rem; }
    
    /* New Gallery Responsive Logic */
    .gallery-grid { 
        grid-template-columns: repeat(2, 1fr); /* 2 cols on tablet */
        gap: 15px; 
        height: auto; /* Reset fixed height so it grows */
        margin-bottom: 40px; /* Add breathing room before stats */
    } 
    .gallery-item { height: 250px; }

    /* FIX: Remove Header padding to avoid double padding with .container */
    .header { padding: 0; height: 70px; background: rgba(0,0,0,0.9); } 
    
    .navbar { width: 100%; justify-content: space-between; }

    /* Hide Nav Wrapper so Flex works correctly */
    .header nav { display: contents; } 

    .nav-menu { display: none; }
    
    .mobile-toggle { 
        display: block; 
        font-size: 1.5rem;   /* Reduced slightly for cleaner look */
        margin-left: auto;   /* Force right alignment */
        padding: 10px;       /* Good touch target */
        margin-right: -10px; /* Optical alignment with container edge */
        cursor: pointer;
    }
    
    .nav-menu.active { 
        display: flex; 
        flex-direction: column; 
        position: fixed; 
        top: 70px; left: 0; width: 100%; 
        height: calc(100vh - 70px);
        background: #1a1a1a; 
        padding: 40px 20px; 
        align-items: flex-start;
        gap: 25px;
        overflow-y: auto;
        z-index: 999;
        border-top: 1px solid rgba(255,255,255,0.1);
    }
    .nav-link { color: #fff; font-size: 1.2rem; width: 100%; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 15px; }
    .btn-header { width: 100%; text-align: center; border-color: var(--accent); color: var(--accent); margin-top: 10px; padding: 15px 0; }
}

@media (max-width: 600px) {
    .gallery-grid { grid-template-columns: 1fr; } /* 1 col on mobile */
    .hero h1 { font-size: 1.8rem; }
    .process-card { margin-bottom: 20px; }
    .testimonial-card:before { font-size: 3rem; top: 10px; }
    .lightbox-content { width: 95%; }
}

