/* 
  JMD POLYMERS - Professional Pine Products Manufacturer
  Core Design System & Styles
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Color Palette - Pine & Nature Focused */
    --color-primary: #081c15;
    /* Deep Forest Green */
    --color-primary-light: #1b4332;
    /* Pine Green */
    --color-secondary: #d4a373;
    /* Resin Amber */
    --color-accent: #95d5b2;
    /* Sage/Mint */
    --color-text-dark: #1a1a1a;
    --color-text-light: #f8f9fa;
    --color-text-muted: #6c757d;
    --color-bg-light: #ffffff;
    --color-bg-alt: #f1f3f2;
    --color-white: #ffffff;

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    /* Layout */
    --container-max-width: 1280px;
    --section-padding: 6rem 0;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);

    /* Transitions */
    --transition-fast: 0.3s ease;
    --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--color-text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: var(--color-bg-light);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Reusable Components */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    width: 100%;
}

/* Grid System */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.grid-contact {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

.grid-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.section {
    padding: 4rem 0;
    /* Reduced padding for better mobile feel */
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
}

.section-title p {
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition-fast);
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: var(--color-primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition-slow);
}

header.scrolled {
    background-color: var(--color-white);
    padding: 1rem 0;
    box-shadow: var(--shadow-md);
}

header.scrolled .logo,
header.scrolled .nav-links a {
    color: var(--color-primary);
}

header.scrolled .mobile-menu-btn span {
    background-color: var(--color-primary);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-white);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--color-white);
}

.nav-links a:hover {
    color: var(--color-secondary);
}

.nav-links a.active {
    color: var(--color-secondary);
    font-weight: 700;
}

header.scrolled .nav-links a.active {
    color: var(--color-secondary);
}

.mobile-menu-btn {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--color-white);
    transition: var(--transition-fast);
}

/* Footer */
footer {
    background-color: var(--color-primary);
    color: var(--color-text-light);
    padding: 5rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-info p {
    margin-top: 1.5rem;
    opacity: 0.8;
}

.footer-links h4 {
    color: var(--color-white);
    margin-bottom: 1.5rem;
}

.footer-links ul li {
    margin-bottom: 0.8rem;
}

.footer-links ul li a {
    opacity: 0.8;
}

.footer-links ul li a:hover {
    opacity: 1;
    color: var(--color-secondary);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.6;
}

.footer-contact-text a {
    color: var(--color-text-light);
    opacity: 0.9;
}

.footer-contact-text a:hover {
    color: var(--color-secondary);
    opacity: 1;
}

/* Responsive */
@media (max-width: 992px) {
    header .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--color-primary);
        padding: 2rem;
        gap: 1.5rem;
        text-align: center;
    }
    header .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .grid-2,
    .grid-3,
    .grid-4,
    .grid-contact,
    .grid-form,
    .grid-products-intro {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {

    .grid-2,
    .grid-3,
    .grid-4,
    .grid-contact,
    .grid-form,
    .grid-products-intro {
        grid-template-columns: 1fr;
        gap: 2rem;
    }



    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .hero-content h1 {
        font-size: 2.5rem !important;
        /* Override inline styles */
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .text-h1-large {
        font-size: 2.2rem;
    }

    .text-h2-large {
        font-size: 1.8rem;
    }

    .btn-white-outline {
        margin-left: 0;
        margin-top: 1rem;
    }

    .hero-btns {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .sub-hero-section {
        padding: 8rem 0 4rem;
    }
}

/* Accordion Styles (New) */
.accordion-container {
    max-width: 1000px;
    margin: 0 auto;
}

.accordion-item {
    border: 1px solid #eee;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: var(--shadow-sm);
}

.accordion-header {
    padding: 1.5rem 2rem;
    background: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-fast);
}

.accordion-header:hover {
    background-color: #fafafa;
}

.accordion-header h3 {
    margin: 0;
    font-size: 1.4rem;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.accordion-toggle {
    font-size: 1.5rem;
    color: var(--color-secondary);
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-toggle {
    transform: rotate(180deg);
}

.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background-color: var(--color-bg-alt);
}

.accordion-content {
    padding: 2rem;
}

.accordion-content .grid {
    gap: 2rem;
}

/* Refactored Utilities */
.h-50px {
    height: 50px;
    width: auto;
}

.hero-section {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/hero-bg.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    color: var(--color-white);
}

.hero-title {
    font-size: 4rem;
    color: var(--color-white);
    margin-bottom: 1.5rem;
}

.hero-text {
    font-size: 1.25rem;
    max-width: 600px;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.btn-accent {
    background-color: var(--color-secondary);
}

.btn-white-outline {
    border-color: var(--color-white);
    color: var(--color-white);
    margin-left: 1rem;
}

.btn-white-outline:hover {
    background-color: var(--color-white);
    color: var(--color-primary);
}

.items-center {
    align-items: center;
}

.img-rounded-shadow {
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
}

.text-subtitle {
    color: var(--color-secondary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.text-h2-large {
    font-size: 2.5rem;
    margin-top: 1rem;
}

.mb-md {
    margin-bottom: 1.5rem;
}

.mb-lg {
    margin-bottom: 2rem;
}

.bg-primary-dark {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.text-center {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    color: var(--color-secondary);
}

.bg-alt {
    background-color: var(--color-bg-alt);
}

.card-product {
    background: var(--color-white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.product-icon {
    height: 100px;
    width: 100px;
    margin: 0 auto 1.5rem;
    object-fit: cover;
    border-radius: 50%;
    transition: all 0.5s ease-in-out;
}

.card-product:hover .product-icon {
    height: 150px;
    width: 150px;
    border-radius: 8px;
    object-fit: contain;
}

.text-small-muted {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.link-accent {
    color: var(--color-secondary);
    font-weight: 600;
}

.mt-xl {
    margin-top: 4rem;
}

.text-white {
    color: var(--color-white);
}

.footer-contact-text {
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Additional Refactors (Contact & Subpages) */
.sub-hero-section {
    padding: 10rem 0 6rem;
    background-color: var(--color-primary);
    color: var(--color-white);
    text-align: center;
}

.text-h1-large {
    font-size: 3.5rem;
    color: var(--color-white);
}

.text-intro-p {
    opacity: 0.8;
    max-width: 700px;
    margin: 0 auto;
}

.text-muted {
    color: var(--color-text-muted);
}

.form-container-card {
    background: var(--color-white);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
}

.w-full {
    width: 100%;
}

.map-container {
    width: 100%;
    height: 450px;
    background: #e9ecef;
}

/* Quality Page */
.card-test-item {
    background: var(--color-white);
    padding: 2.5rem;
    border-radius: 8px;
    text-align: center;
}

.card-sourcing {
    padding: 2rem;
    border: 1px solid #eee;
    border-radius: 8px;
    width: 200px;
}

.flex-center-wrap {
    display: flex;
    justify-content: center;
    gap: 4rem;
    flex-wrap: wrap;
}

/* Applications Page */
.card-app {
    background: var(--color-bg-alt);
    padding: 3rem;
    border-radius: 8px;
    height: 100%;
    transition: var(--transition-fast);
}

/* About Page */
.card-mission {
    background: var(--color-white);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    border-top: 5px solid var(--color-primary);
}

.card-vision {
    background: var(--color-white);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    border-top: 5px solid var(--color-secondary);
}

.icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.bg-accent {
    background: var(--color-accent);
}

.bg-secondary {
    background: var(--color-secondary);
}

/* Products Page */
.product-category {
    margin-bottom: 6rem;
}

.product-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
    border: 1px solid #eee;
}

.product-item:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--color-accent);
}

.product-content {
    padding: 2rem;
}

.product-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--color-bg-alt);
    color: var(--color-primary);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 20px;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.filter-nav {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--color-primary);
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.filter-btn.active,
.filter-btn:hover {
    background-color: var(--color-primary);
    color: white;
}

.grid-products-intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.img-product-intro {
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    width: 100%;
}

.border-bottom-alt {
    border-bottom: 2px solid var(--color-bg-alt);
    padding-bottom: 0.5rem;
}

.product-img-container {
    height: 150px;
    overflow: hidden;
    margin-bottom: 1rem;
    border-radius: 4px;
    transition: all 0.5s ease-in-out;
}

.product-item:hover .product-img-container {
    height: 250px;
}

.img-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: all 0.5s ease-in-out;
}

.product-item:hover .img-cover {
    object-fit: contain;
    transform: scale(1.02);
}

.h-full {
    height: 100%;
}

/* Mobile Menu Styles */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        right: 0;
        height: calc(100vh - 70px);
        background-color: var(--color-primary);
        /* Changed to primary for better contrast/brand alignment */
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        transform: translateX(100%);
        transition: transform 0.4s ease-in-out;
        z-index: 999;
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        transform: translateX(0%);
    }

    .nav-links a {
        color: var(--color-white);
        font-size: 1.5rem;
        margin: 1.5rem 0;
    }

    .mobile-menu-btn.open span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

    .mobile-menu-btn.open span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.open span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }
}