/* --- MODULE: Global Variables & Reset --- */
:root {
    --color-primary: #C05A35;
    /* Burnt Orange */
    --color-secondary: #364146;
    /* Charcoal Grey */
    --color-bg: #F8F9FA;
    /* Light Grey */
    --color-white: #FFFFFF;
    --font-primary: 'Arial', sans-serif;
    /* Placeholder for corporate font */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg);
    color: var(--color-secondary);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

/* --- MODULE: Header & Nav --- */
header {
    background-color: var(--color-white);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo img {
    max-height: 60px;
    width: auto;
    display: block;
}

nav ul {
    display: flex;
    gap: 1.5rem;
    /* Reduced from 2rem for better fit */
}

nav a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-secondary);
    padding: 0.5rem 0;
    position: relative;
}

nav a:hover,
nav a.active {
    color: var(--color-primary);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

.lang-selector {
    border: 1px solid var(--color-secondary);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: bold;
    white-space: nowrap;
    /* Prevent line break */
}

.lang-selector:hover {
    background-color: var(--color-secondary);
    color: var(--color-white);
}

/* --- MODULE: Main Content --- */
main {
    flex: 1;
    width: 100%;
}

/* --- MODULE: Hero Section --- */
.hero {
    /* Fallback and gradient background */
    background: linear-gradient(135deg, var(--color-secondary) 0%, #1a1f22 100%);
    /* Placeholder for future image:
    background: linear-gradient(rgba(54, 65, 70, 0.8), rgba(26, 31, 34, 0.9)), url('path/to/hero-image.jpg');
    background-size: cover;
    background-position: center;
    */
    color: var(--color-white);
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    max-width: 800px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    max-width: 600px;
    opacity: 0.9;
}

.btn-cta {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: inline-block;
}

.btn-cta:hover {
    background-color: #a0492a;
    /* Darker shade */
    transform: translateY(-2px);
}

/* Responsive Styles for Hero */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }
}

/* --- MODULE: Product Tabs (Dynamic Hub) --- */
.products-hub {
    background-color: var(--color-bg);
    padding: 80px 2rem;
    text-align: center;
}

.hub-header {
    margin-bottom: 3rem;
}

.hub-header h2 {
    color: var(--color-secondary);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.hub-header p {
    color: #666;
    font-size: 1.1rem;
}

/* Tabs Navigation */
.tabs-container {
    max-width: 1200px;
    margin: 0 auto;
}

.tab-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.tab-btn {
    background: transparent;
    border: 2px solid transparent;
    color: var(--color-secondary);
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    border-radius: 30px;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.tab-btn:hover {
    opacity: 1;
    background-color: rgba(192, 90, 53, 0.05);
    /* very light primary */
}

.tab-btn.active {
    opacity: 1;
    background-color: var(--color-primary);
    color: var(--color-white);
    box-shadow: 0 4px 10px rgba(192, 90, 53, 0.3);
}

/* Secondary Sub-Tabs (Replacing Back buttons) */
.sub-tab-btn {
    font-size: 0.95rem;
    padding: 0.5rem 1.2rem;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    background: transparent;
    opacity: 1;
}

.sub-tab-btn:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.sub-tab-btn.active {
    background-color: var(--color-primary);
    color: var(--color-white);
    box-shadow: 0 4px 8px rgba(192, 90, 53, 0.2);
}

.sub-tab-btn.return-root {
    border-color: #aaa;
    color: #555;
    background: #f4f4f4;
}

.sub-tab-btn.return-root:hover {
    background: #e0e0e0;
    color: #333;
}

/* Tab Contents */
.tab-content {
    position: relative;
    text-align: left;
    min-height: 400px;
}

.tab-pane {
    display: none;
    opacity: 0;
    transform: translateY(20px);
}

.tab-pane.active {
    display: block;
    animation: fadeInTab 0.5s forwards ease-out;
}

@keyframes fadeInTab {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Product Grid inside Tabs */
.product-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

/* Product Item (Card) Premium Styling */
.product-item {
    flex: 0 1 calc(20% - 16px);
    max-width: calc(20% - 16px);
    min-width: 200px;
    background: transparent;
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    box-shadow: none;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-item:hover {
    transform: translateY(-5px);
}

.product-image-wrapper {
    width: 100%;
    height: 180px;
    background-color: var(--color-white);
    overflow: hidden;
    position: relative;
    border-radius: 8px;
    border: 1px solid #eaeaea;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.product-meta {
    padding: 1rem 0.5rem 0.5rem 0.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-meta h3 {
    color: var(--color-secondary);
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.product-meta p {
    color: #888;
    font-size: 0.9rem;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    flex-grow: 1;
}

.view-details {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: transform 0.3s ease;
}

.product-item:hover .view-details {
    transform: translateX(3px);
}

/* --- MODULE: Mini Carousel --- */
.mini-carousel {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
    background-color: transparent;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;

    .categories h2 {
        font-size: 2rem;
    }
}

/* --- MODULE: Featured Projects --- */
.projects {
    background-color: #FFFFFF;
    padding: 80px 0;
}

.projects h2 {
    text-align: center;
    color: var(--color-secondary);
    font-size: 2.2rem;
    margin-bottom: 40px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1400px;
    /* Wider for gallery feel */
    margin: 0 auto;
    padding: 0 20px;
}

.project-card {
    position: relative;
    cursor: pointer;
}

.project-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 4px;
    background-color: #eee;
    /* Placeholder bg */
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
    /* Zoom In effect */
}

.project-info {
    margin-top: 15px;
}

.project-info h3 {
    font-size: 1.1rem;
    color: var(--color-secondary);
    margin-bottom: 5px;
}

.project-info p {
    font-size: 0.9rem;
    color: #888;
}

/* Responsive Projects */
@media (max-width: 1024px) {
    .project-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .project-grid {
        grid-template-columns: 1fr;
    }
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive Styles for Products Hub */
@media (max-width: 768px) {
    .products-hub {
        padding: 60px 1.5rem;
    }

    .hub-header h2 {
        font-size: 2rem;
    }

    .tab-buttons {
        gap: 0.5rem;
    }

    .tab-btn {
        font-size: 0.95rem;
        padding: 0.6rem 1.2rem;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }
}

/* --- MODULE: About Us Section --- */
.about-us {
    background-color: #E4DDD3;
    /* Beige Stone for symmetry/contrast */
    padding: 80px 0;
    /* Breathable padding */
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    padding: 0 20px;
    /* Internal padding for container */
}

.about-text h2 {
    color: var(--color-secondary);
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
}

.about-text p {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.about-text ul {
    list-style: none;
    margin-top: 1.5rem;
}

.about-text li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
    color: var(--color-secondary);
    font-weight: 500;
}

.about-text li::before {
    content: '???';
    color: var(--color-primary);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.about-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.img-placeholder {
    width: 100%;
    height: 400px;
    background-color: #E0E0E0;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #999;
}

/* Responsive Styles for About Us */
@media (max-width: 768px) {
    .about-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-text {
        text-align: center;
    }

    .about-text ul {
        text-align: left;
        display: inline-block;
    }
}

/* --- FIXED FOOTER STYLES --- */
footer {
    background-color: #364146;
    color: #fff;
    padding: 60px 0 20px 0;
    /* More space bottom for copyright */
}

/* Container to center and limit width */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* 2 Equal Columns */
    gap: 60px;
    margin-bottom: 40px;
}

/* Left Column Styles */
.footer-info h3,
.footer-form h3 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-info p {
    color: #ccc;
    line-height: 1.8;
    margin-bottom: 10px;
}

/* --- REPAIRED FORM --- */
.footer-form input,
.footer-form textarea {
    width: 100%;
    /* Occupy full available width */
    padding: 12px 15px;
    /* Comfortable internal padding */
    margin-bottom: 15px;
    /* Separation between fields */
    background-color: rgba(255, 255, 255, 0.1);
    /* Semi-transparent background */
    border: 1px solid #555;
    /* Subtle border */
    color: #fff;
    /* White text when typing */
    border-radius: 4px;
    box-sizing: border-box;
    /* Vital so padding doesn't break width */
    font-family: inherit;
}

.footer-form textarea {
    height: 100px;
    /* Fixed height for message */
    resize: vertical;
}

.footer-form button {
    background-color: #C05A35;
    /* Brand Orange */
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    transition: background 0.3s;
    width: auto;
    /* Do not stretch button */
}

.footer-form button:hover {
    background-color: #d66a45;
    /* Lighter orange on hover */
}

/* --- CENTERED COPYRIGHT --- */
.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    /* Faint separator line */
    color: #888;
    font-size: 0.9rem;
}

/* Mobile responsive fix */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        /* 1 column on mobile */
    }
}

/* Mobile Header Fix */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }

    .site-logo {
        margin-bottom: 0.5rem;
    }

    nav ul {
        flex-direction: column;
        gap: 15px;
        /* Space between items */
        text-align: center;
        width: 100%;
        padding: 0;
    }

    nav a {
        display: block;
        padding: 5px 0;
        font-size: 1.1rem;
        /* Slightly larger for touch */
    }

    .lang-selector {
        margin-top: 1rem;
        align-self: center;
    }
}
