/* ==========================================================================
   CSS Variables
   ========================================================================== */
:root {
    --primary-color: #284422;
    --accent-color: #fb890f;
    --text-color: #000000;
    --text-color-light: #FFFFFF;
    --background-color: #FFFFFF;
    --section-background: #f5f5f5;
    --header-height: 120px;
    --container-max-width: 1400px;
    --border-radius: 10px;
    --box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    --section-spacing: 20px;
    --transition-speed: 0.3s;
}

/* ==========================================================================
   Global Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--background-color);
    text-align: center;
    color: var(--text-color);
    overflow-x: hidden;
    background-image: 
        linear-gradient(
            to right,
            rgba(40, 68, 34, 0.03) 1px,
            transparent 1px
        ),
        linear-gradient(
            to bottom,
            rgba(40, 68, 34, 0.03) 1px,
            transparent 1px
        );
    background-size: 20px 20px;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1 {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 20px;
}

h2 {
    font-size: 24px;
    font-weight: 600;
    padding-bottom: 5px;
    margin-bottom: 10px;
}

p {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* ==========================================================================
   Layout & Grid
   ========================================================================== */
.wrapper {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 5%;
}

.textbox {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto 60px;
    padding: 0 20px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 5%;
    gap: 40px;
    background-color: var(--primary-color);
    box-shadow: var(--box-shadow);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    min-height: 100px;
}

.logo-container {
    flex-shrink: 0;
}

.logo-desktop {
    display: block;
    height: 70px;
    width: auto;
}

.logo-mobile {
    display: none;
    height: 60px;
    width: auto;
}

nav {
    display: flex;
    gap: 25px;
    align-items: center;
    flex-wrap: wrap;
}

nav a {
    color: var(--text-color-light);
    text-decoration: none;
    font-size: 16px;
    font-weight: 800;
    transition: color 0.3s ease;
    white-space: nowrap;
}

nav a:hover {
    color: var(--accent-color);
}

/* Add to Header & Navigation section */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 102;
    transition: opacity 0.3s ease;
}

.hamburger:hover {
    opacity: 0.8;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color-light);
    margin: 5px 0;
    transition: 0.3s;
}

/* ==========================================================================
   Section Styles
   ========================================================================== */
#home {
    margin-top: 180px;
}

/* Product Lines and Offer Sections */
#product-lines-container,
#offer-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 30px;
    padding: 0;
}

.product-lines-section,
.offer-section {
    width: 100%;
    background-color: var(--section-background);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.product-lines-section {
    aspect-ratio: 1/1;
}

.product-lines-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(40, 68, 34, 0.1);
    opacity: 0;
    transition: opacity var(--transition-speed) ease;
}

.product-lines-section:hover::after {
    opacity: 1;
}

.offer-section {
    aspect-ratio: auto;
    min-height: 350px;
    height: auto;
}

.offer-section img {
    height: 200px;
    width: 100%;
    object-fit: cover;
}

.offer-section h3 {
    margin: 15px 0;
}

.offer-section p {
    margin-top: 0;
    margin-bottom: 15px;
}

.product-lines-section:hover,
.offer-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Images */
.product-lines-section img,
.offer-section img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
}

.offer-section img {
    height: 200px;
}

/* Dealer Logos */
.dealer-logos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    align-items: center;
    margin-top: 40px;
}

.dealer-logos img {
    width: 100%;
    max-width: 250px;
    margin: 0 auto;
}

.dealer-logos a {
    display: block;
    transition: transform 0.3s ease;
}

.dealer-logos a:hover {
    transform: scale(1.05);
}

.dealer-logos a:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 4px;
    border-radius: 4px;
}

/* Scroll Margin for Sections */
#home,
#product-lines,
#where-to-buy,
#what-we-offer,
#about-us,
#safety-section,
#contact {
    scroll-margin-top: var(--header-height);
}

/* ==========================================================================
   Media Queries
   ========================================================================== */
@media screen and (max-width: 1200px) {
    header {
        padding: 15px 3%;
        gap: 20px;
    }

    nav {
        gap: 15px;
    }

    nav a {
        font-size: 14px;
    }
}

@media screen and (max-width: 980px) {
    header {
        flex-direction: row;
        justify-content: space-between;
        padding: 10px 20px;
        min-height: 80px;
    }

    .logo-container {
        width: auto;
    }

    .logo-desktop {
        height: 60px;
    }

    .hamburger {
        display: block;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 250px;
        height: 100vh;
        background-color: var(--primary-color);
        flex-direction: column;
        padding: 80px 20px 20px;
        transition: 0.3s;
        box-shadow: none;
    }

    nav.active {
        right: 0;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
    }

    nav a {
        font-size: 16px;
        padding: 15px 0;
        width: 100%;
        text-align: left;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    .textbox {
        padding: 0 15px;
        margin-bottom: 40px;
    }

    #product-lines-container,
    #offer-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    header {
        min-height: 70px;
    }

    .logo-desktop {
        display: none;
    }

    .logo-mobile {
        display: block;
        height: 50px;
    }

    /* Hide Quick Links section */
    .footer-section:nth-child(2) {
        display: none;
    }

    .footer-content {
        display: grid;
        grid-template-columns: 1fr !important;
        gap: 30px;
        max-width: 400px;
        margin: 0 auto;
    }

    .footer-section {
        width: 100%;
        text-align: center;
    }

    .footer-section nav {
        display: flex;
        flex-direction: column;
        align-items: center;
        position: static;
        width: 100%;
        height: auto;
        padding: 0;
        background: none;
        box-shadow: none;
    }

    .footer-section nav a {
        padding: 10px 0;
        opacity: 1;
        visibility: visible;
        position: static;
        color: var(--text-color-light);
    }
}

@media screen and (max-width: 580px) {
    #product-lines-container,
    #offer-container {
        grid-template-columns: 1fr;
    }

    .product-lines-section,
    .offer-section {
        max-width: 400px;
        margin: 0 auto;
    }
}

@media screen and (max-width: 480px) {
    .logo-desktop {
        display: none;
    }

    .logo-mobile {
        display: block;
    }

    nav {
        gap: 8px;
    }

    nav a {
        font-size: 13px;
        padding: 5px 8px;
    }

    .textbox {
        padding: 0 10px;
        margin-bottom: 30px;
    }

    h1 {
        font-size: 28px;
    }

    h2 {
        font-size: 22px;
    }

    .dealer-logos {
        gap: 20px;
    }

    .textbox,
    .product-lines-section,
    .offer-section,
    .dealer-logos {
        margin-bottom: var(--section-spacing);
    }

    #product-lines-container,
    #offer-container {
        gap: var(--section-spacing);
    }
}

/* Add Footer Styles */
footer {
    background-color: var(--primary-color);
    color: var(--text-color-light);
    padding: 40px 20px 20px;
    margin-top: 60px;
}

.footer-content {
    max-width: var(--container-max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-section h4 {
    font-size: 18px;
    margin-bottom: 15px;
}

.footer-section a {
    color: var(--text-color-light);
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 14px;
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: var(--text-color-light);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

#back-to-top:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

/* Improve focus styles for accessibility */
nav a:focus,
.dealer-logos a:focus,
.contact-email:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 4px;
    border-radius: 4px;
}

/* Style contact email */
.contact-email {
    color: var(--text-color-light);
    text-decoration: none;
    font-weight: bold;
    padding: 5px 0;
    border-radius: var(--border-radius);
    transition: all var(--transition-speed) ease;
}

.contact-email:hover {
    color: var(--accent-color);
    background-color: transparent;
}

/* Adjust animation delay for sections */
#product-lines { animation-delay: 0.2s; }
#where-to-buy { animation-delay: 0.3s; }
#what-we-offer { animation-delay: 0.4s; }
#about-us { animation-delay: 0.5s; }
#safety-section { animation-delay: 0.6s; }
#contact { animation-delay: 0.7s; }

/* Fix email color in body content */
.textbox .contact-email {
    color: var(--primary-color);
    padding: 5px 10px;
}

.textbox .contact-email:hover {
    background-color: var(--primary-color);
    color: var(--text-color-light);
}

/* Footer email stays white */
footer .contact-email {
    color: var(--text-color-light);
    padding: 5px 0;
}

footer .contact-email:hover {
    color: var(--accent-color);
    background-color: transparent;
} 