/*
  Moss Farms Custom Stylesheet
*/

:root {
    --primary-color: #004d40; /* A deep, earthy green */
    --secondary-color: #8d6e63; /* A warm, earthy brown */
    --accent-color: #ffb74d; /* A golden harvest accent */
    --text-color: #333;
    --light-gray: #f8f9fa;
    --heading-font: 'Merriweather', serif;
    --body-font: 'Roboto', sans-serif;
}

/* 1. General & Body
--------------------------------*/
body {
    font-family: var(--body-font);
    color: var(--text-color);
    background-color: #fff;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    color: var(--primary-color);
}

.section-title {
    text-align: center;
    padding-bottom: 40px;
}

.section-title h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 20px;
    position: relative;
    text-transform: uppercase;
}

.section-title h2::after {
    content: '';
    position: absolute;
    display: block;
    width: 60px;
    height: 3px;
    background: var(--accent-color);
    bottom: 0;
    left: calc(50% - 30px);
}

.section-title p {
    margin-bottom: 0;
    color: #555;
    font-style: italic;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* 2. Header & Navigation
--------------------------------*/
.header {
    background-color: rgba(0, 0, 0, 0.7);
    transition: all 0.5s;
    z-index: 997;
    padding: 15px 0;
}

.header .logo-img {
    max-height: 60px;
}
.header .logo-img-footer {
    max-height: 80px;
    margin-bottom: 1rem;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    transition: 0.3s;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    color: #fff;
}

/* 3. Hero Section
--------------------------------*/
#hero {
    width: 100%;
    height: 80vh;
    background-color: rgba(0,0,0,0.5);
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
    position: relative;
    color: #fff;
}

#hero:before {
    content: "";
    position: absolute;
    bottom: 0;
    top: 0;
    left: 0;
    right: 0;
}

#hero .container {
    position: relative;
    text-align: center;
}

#hero h1 {
    margin: 0;
    font-size: 48px;
    font-weight: 700;
    line-height: 56px;
    color: #fff;
}

#hero h2 {
    color: rgba(255, 255, 255, 0.8);
    margin: 15px 0 0 0;
    font-size: 24px;
    font-family: var(--body-font);
    font-weight: 400;
}

@media (max-width: 768px) {
    #hero h1 { font-size: 32px; line-height: 36px; }
    #hero h2 { font-size: 18px; }
}

/* 4. Content Sections
--------------------------------*/
#main {
    padding-top: 90px; /* Height of the header */
}

.mission-statement {
    padding: 60px 0;
    background-color: var(--light-gray);
}

.features {
    padding: 60px 0;
}
.feature-box {
    padding: 30px;
    border: 1px solid #eef0f2;
    text-align: center;
    transition: 0.3s;
    height: 100%;
}
.feature-box:hover {
    box-shadow: 0px 0 30px rgba(0, 0, 0, 0.08);
    transform: translateY(-5px);
}
.feature-icon {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 20px;
}
.feature-box h3 {
    font-size: 20px;
    font-weight: 700;
}

.products {
    padding: 60px 0;
    background-color: var(--light-gray);
}
.product-card {
    transition: all 0.3s ease-in-out;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.food-safety {
    padding: 120px 0;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}
.food-safety:before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
}
.safety-content {
    position: relative;
    background: rgba(255, 255, 255, 0.9);
    padding: 40px;
    border-radius: 5px;
}
.safety-content h2 {
    font-weight: 700;
    font-size: 34px;
}
.safety-content p {
    color: #444;
}
.safety-content .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}
.safety-content .btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.links {
    padding: 60px 0;
}
.link-item img {
    filter: grayscale(100%);
    transition: all 0.3s ease-in-out;
    padding: 15px;
    opacity: 0.7;
}
.link-item img:hover {
    filter: grayscale(0);
    transform: scale(1.1);
    opacity: 1;
}

/* 5. Footer
--------------------------------*/
#footer {
    background: #111;
    color: #fff;
    font-size: 14px;
}

#footer .footer-top {
    background: #181818;
    padding: 60px 0 30px 0;
}

/* This is the new rule that fixes the logo size */
#footer .logo-img-footer {
    max-height: 70px;          /* Sets a maximum vertical size for the logo */
    width: auto;               /* Ensures the width scales proportionally */
    max-width: 100%;           /* A failsafe to prevent it from ever overflowing its column */
    margin-bottom: 1.5rem;     /* Adds a good amount of space below the logo */
}

#footer .footer-info h4, #footer .footer-contact h4, #footer .footer-map h4 {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    position: relative;
    padding-bottom: 12px;
}

#footer .footer-info p {
    font-size: 14px;
    line-height: 24px;
    margin-bottom: 0;
    color: #eee;
}

#footer .social-links a {
    font-size: 18px;
    display: inline-block;
    background: #333;
    color: #fff;
    line-height: 1;
    padding: 8px 0;
    margin-right: 4px;
    border-radius: 50%;
    text-align: center;
    width: 36px;
    height: 36px;
    transition: 0.3s;
}

#footer .social-links a:hover {
    background: var(--accent-color);
    color: #111;
}

#footer .footer-contact p {
    line-height: 26px;
    color: #eee;
}
#footer .footer-contact a {
    color: var(--accent-color);
}
#footer .footer-contact a:hover {
    color: #fff;
}

#footer .footer-bottom {
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#footer .copyright {
    text-align: left;
}

#footer .credits {
    text-align: right;
    font-size: 13px;
}
#footer .credits a {
    color: var(--accent-color);
}

@media(max-width: 768px) {
    #footer .footer-bottom {
        flex-direction: column;
        padding: 20px;
    }
    #footer .copyright, #footer .credits {
        text-align: center;
        width: 100%;
        padding: 5px 0;
    }
}


/* 6. Scroll Top Button
--------------------------------*/
.scroll-top {
    position: fixed;
    visibility: hidden;
    opacity: 0;
    right: 15px;
    bottom: 15px;
    z-index: 996;
    background: var(--primary-color);
    width: 40px;
    height: 40px;
    border-radius: 50px;
    transition: all 0.4s;
}

.scroll-top i {
    font-size: 24px;
    color: #fff;
    line-height: 0;
}

.scroll-top:hover {
    background: var(--secondary-color);
    color: #fff;
}

.scroll-top.active {
    visibility: visible;
    opacity: 1;
}