/* Layout System */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-body);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Container */
.container,
.header-container,
.footer-container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    max-width: 1280px;
}

/* Header & Nav */
header {
    background-color: #ffffff;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0;
    /* Removed padding */
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

header.scrolled {
    padding: 0;
    /* Removed padding */
    box-shadow: var(--shadow-md);
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-wrapper a {
    display: block;
}

.site-logo {
    height: 80px;
    /* Increased from 48px */
    width: auto;
    transition: height 0.3s ease;
}

header.scrolled .site-logo {
    height: 60px;
    /* Increased from 40px */
}

nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

nav a {
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
    position: relative;
    padding: 0.5rem 0;
}

nav a:hover,
nav a.active {
    color: var(--primary-color);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
}

/* Footer Layout */
footer {
    background-color: var(--gray-900);
    color: var(--text-light);
    padding: 4rem 0 2rem;
    margin-top: auto;
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-about h3,
.footer-contact h3,
.footer-quicklinks h3 {
    color: #fff;
    margin-bottom: 1.5rem;
    font-size: var(--text-xl);
}

.footer-contact .contact-info p {
    color: var(--gray-300);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-bottom {
    border-top: 1px solid var(--gray-800);
    padding-top: 2rem;
    text-align: center;
    color: var(--gray-500);
    font-size: var(--text-sm);
}

/* ============================
   Page Specific Styles 
   ============================ */

/* Page Intros (Common) */
.page-intro,
.products-intro,
.about-intro,
.contact-intro {
    text-align: center;
    margin: 2rem auto 3rem;
    padding: 3rem 2rem;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    max-width: 900px;
    /* Constrain width for readability */
}

.page-intro h1,
.products-intro h1,
.about-intro h1,
.contact-intro h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-heading);
}

.page-intro p,
.products-intro p,
.about-intro p,
.contact-intro p {
    color: var(--text-body);
    font-size: 1.125rem;
    max-width: 700px;
    margin: 0 auto;
}

/* Page Specific Hero Backgrounds */
@media (min-width: 1024px) {

    .intro-bg-products,
    .intro-bg-about,
    .intro-bg-blog,
    .intro-bg-gallery,
    .intro-bg-contact {
        background-attachment: fixed;
    }
}

.intro-bg-products {
    background-color: var(--primary-800);
    background: linear-gradient(rgba(15, 23, 42, 0.75), rgba(15, 23, 42, 0.65)), url('../images/palet-3.jpg');
    background-size: cover;
    background-position: center;
    color: #ffffff;
    border: none;
    padding: 5rem 2rem;
}

.intro-bg-about {
    background-color: var(--primary-800);
    background: linear-gradient(rgba(15, 23, 42, 0.75), rgba(15, 23, 42, 0.65)), url('../images/palet-10.jpg');
    background-size: cover;
    background-position: center;
    color: #ffffff;
    border: none;
    padding: 5rem 2rem;
}

.intro-bg-blog {
    background-color: var(--primary-800);
    background: linear-gradient(rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.7)), url('../images/palet-4.jpg');
    background-size: cover;
    background-position: center;
    color: #ffffff;
    border: none;
    padding: 5rem 2rem;
}

.intro-bg-gallery {
    background-color: var(--primary-800);
    background: linear-gradient(rgba(15, 23, 42, 0.75), rgba(15, 23, 42, 0.65)), url('../images/palet-7.jpg');
    background-size: cover;
    background-position: center;
    color: #ffffff;
    border: none;
    padding: 5rem 2rem;
}

.intro-bg-contact {
    background-color: var(--primary-800);
    background: linear-gradient(rgba(15, 23, 42, 0.75), rgba(15, 23, 42, 0.65)), url('../images/palet-11.jpg');
    background-size: cover;
    background-position: center;
    color: #ffffff;
    border: none;
    padding: 5rem 2rem;
}

/* Override text colors when on dark backgrounds */
.intro-bg-products h1,
.intro-bg-about h1,
.intro-bg-blog h1,
.intro-bg-gallery h1,
.intro-bg-contact h1 {
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.intro-bg-products p,
.intro-bg-about p,
.intro-bg-blog p,
.intro-bg-gallery p,
.intro-bg-contact p {
    color: rgba(255, 255, 255, 0.9);
}

/* Home: Hero Section */
.hero-section {
    position: relative;
    height: 70vh;
    min-height: 500px;
    background-image: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.7)), url('../palet foto/palet-1.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: -1px;
}

.hero-content {
    max-width: 800px;
    padding: 2rem;
    animation: fadeInUp 1s ease-out;
}

.hero-content h1 {
    color: #ffffff;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    color: #e2e8f0;
    font-size: var(--text-xl);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Home: Sections */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    padding: 0 1rem;
}

.sustainability-section {
    background-color: var(--bg-surface);
    overflow: hidden;
    margin-top: 4rem;
    margin-bottom: 4rem;
}

.sustainability-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1280px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
}

.sustainability-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0;
}

/* Blog Page */
.blog-intro {
    text-align: center;
    margin: 2rem auto 3rem;
    padding: 3rem 2rem;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    max-width: 900px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-bottom: 4rem;
}

/* Gallery Page */
.gallery-intro {
    text-align: center;
    margin: 2rem auto 3rem;
    padding: 3rem 2rem;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    max-width: 900px;
}

.gallery-page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.gallery-item img {
    height: 250px;
    width: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
    /* Zoom effect */
}

.gallery-caption {
    padding: 1rem;
    background: #fff;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.gallery-caption h4 {
    margin: 0;
    color: var(--text-heading);
    font-size: 1.1rem;
}

/* Blog Detail */
.blog-detail-container {
    max-width: 800px;
    margin: 0 auto 4rem;
}

.blog-header {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.blog-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.blog-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-body);
    margin-bottom: 3rem;
}

@media (max-width: 768px) {

    .blog-grid,
    .gallery-page-grid {
        grid-template-columns: 1fr;
    }
}

/* About Page */
.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.about-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
}

.about-card:hover {
    transform: translateY(-5px);
}

.about-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.timeline-section {
    position: relative;
    padding: 3rem 0;
    margin-bottom: 3rem;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    border-left: 2px solid var(--primary-color);
    padding-left: 2rem;
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-dot {
    position: absolute;
    left: -2.6rem;
    top: 0.5rem;
    width: 1.2rem;
    height: 1.2rem;
    background-color: var(--primary-color);
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: var(--shadow-sm);
}

/* Contact Page */
.contact-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.contact-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.contact-card h3 {
    border-bottom: 2px solid var(--primary-50);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.business-hours-list {
    list-style: none;
}

.business-hours-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-100);
}

.business-hours-list li:last-child {
    border-bottom: none;
}

.contact-form-section {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    max-width: 800px;
    margin: 0 auto 3rem;
}

.contact-form-section h3 {
    margin-bottom: 2rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
}

.map-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 3rem;
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-16 {
    margin-bottom: 4rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-8 {
    margin-top: 2rem;
}

.pt-large {
    padding-top: 8rem;
}

/* For section separation */
.d-flex {
    display: flex;
}

.d-grid {
    display: grid;
}

.align-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-end {
    justify-content: flex-end;
}

.gap-4 {
    gap: 1rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================
   Mobile Responsive 
   ============================ */
@media (max-width: 1024px) {
    .container {
        max-width: 960px;
    }

    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .container {
        max-width: 100%;
    }

    /* Nav */
    nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #fff;
        padding: 1rem;
        box-shadow: var(--shadow-md);
        transform: translateY(-10px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 999;
    }

    nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    nav ul {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .mobile-menu-btn {
        display: block;
    }

    /* Footer */
    .footer-container {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: var(--text-3xl);
    }

    h2 {
        font-size: var(--text-2xl);
    }

    /* Sections */
    .sustainability-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
        padding: 2rem 1.5rem;
    }

    .hero-section {
        height: 60vh;
    }

    /* Intros */
    .about-intro h1,
    .contact-intro h1,
    .products-intro h1 {
        font-size: 2rem;
    }
}