﻿/* Global Styles */
body, html {
    height: 100%;
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #e8f5e9;
}

header, footer {
    padding: 15px 20px;
}

a {
    text-decoration: none;
}

/* Header */
header .site-title {
    font-size: 22px;
    font-weight: 700;
}

header .site-subtitle {
    font-size: 14px;
    color: #f1f1f1;
}

.header-logo {
    animation: logoFadeSlide 0.9s ease-out;
}

@keyframes logoFadeSlide {
    0% {
        opacity: 0;
        transform: translateY(-8px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.header-logo img {
    animation: logoWiggle 3.5s ease-in-out infinite;
}

@keyframes logoWiggle {
    0% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(6px);
    }

    100% {
        transform: translateX(0);
    }
}






/* Navbar */
nav.navbar-dark .navbar-nav .nav-link {
    position: relative;
    color: #fff;
    font-weight: 500;
    transition: color 0.3s;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #cddc39; /* subtle hover underline */
    transition: width 0.3s;
}

.navbar-nav .nav-link:hover::after {
    width: 100%;
}

.navbar-nav .nav-link:hover {
    color: #cddc39;
}

/* Mega Dropdown */
/* Desktop Mega Menu Fix */
@media (min-width: 768px) {
    .mega-dropdown {
        position: static;
    }

        .mega-dropdown .dropdown-menu {
            display: block;
            visibility: hidden;
            opacity: 0;
            transition: opacity 0.2s ease;
            position: absolute;
            top: 100%;
            left: 0;
            width: 100vw; /* full viewport width */
            margin-left: calc((100vw - 100%) / -2); /* breakout from container */
            padding: 25px 40px;
            border-radius: 0 0 10px 10px;
            z-index: 1000;
        }

        .mega-dropdown:hover .dropdown-menu {
            visibility: visible;
            opacity: 1;
        }
}
/* Mega Category Item Style */
.mega-item {
    display: block;
    padding: 10px 14px;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-weight: 500;
    color: #2e7d32;
    transition: all 0.25s ease;
}

    /* Hover Effect */
    .mega-item:hover {
        background-color: #dcedc8;
        border-color: #a5d6a7;
        color: #1b5e20;
        transform: translateY(-2px); /* Light lift effect */
        box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    }

    .mega-item:nth-child(odd) {
        background-color: #f4fff4;
    }

    .mega-item:nth-child(even) {
        background-color: #f9fff9;
    }



/* Subtle category accents */
.mega-dropdown .mega-item:nth-child(1) {
    color: #2e7d32;
}

.mega-dropdown .mega-item:nth-child(2) {
    color: #388e3c;
}

.mega-dropdown .mega-item:nth-child(3) {
    color: #43a047;
}

.mega-dropdown .mega-item:nth-child(4) {
    color: #66bb6a;
}

/* Search Input */
.search-input {
    border-radius: 50px;
    padding: 6px 16px;
    border: 1px solid #ccc;
    transition: all 0.3s;
    width: 200px;
}

    .search-input:focus {
        outline: none;
        border-color: #43a047;
        box-shadow: 0 0 5px rgba(67,160,71,0.5);
    }

/* Search Button */
#btnSearch {
    border-radius: 50px;
    padding: 6px 18px;
    transition: all 0.3s;
}

    #btnSearch:hover {
        background-color: #2e7d32;
        border-color: #2e7d32;
        color: #fff;
    }

/* Header Login / Signup Buttons */
header .btn-outline-light {
    border-radius: 50px;
    padding: 5px 18px;
    font-size: 0.875rem;
    transition: 0.3s;
    border-width: 2px;
}

    header .btn-outline-light:hover {
        background-color: #ffffff;
        color: #2e7d32;
        border-color: #2e7d32;
    }

header .btn-light {
    border-radius: 50px;
    padding: 5px 18px;
    font-size: 0.875rem;
    transition: 0.3s;
}

    header .btn-light:hover {
        background-color: #dcedc8;
        color: #1b5e20;
    }

/* Main Content */
.main-content {
    flex: 1;
    padding-bottom: 50px;
}

/* Pre-Footer Wrapper */
.pre-footer {
    padding: 35px 0;
    background: #ffffff;
    border-top: 1px solid #e5e5e5;
}

/* Links area */
.pre-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
}

/* Link Style */
.custom-link {
    padding: 6px 12px;
    color: #2e7d32;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.25s ease;
}

    /* Hover */
    .custom-link:hover {
        background-color: #dcedc8;
        color: #1b5e20;
    }

    /* Optional subtle dividers */
    .custom-link:not(:last-child) {
        border-right: 1px solid #c8e6c9;
        padding-right: 18px;
    }

/* Contact Section */
.footer-contact i {
    font-size: 14px;
    margin-right: 5px;
    color: #555;
}

/* Responsive: center items on mobile */
@media (max-width: 767px) {
    .pre-links {
        justify-content: center;
        gap: 10px 15px;
    }

    .footer-contact {
        text-align: center;
        margin-top: 15px;
    }
}



/* Footer */
footer {
    background-color: #2e7d32;
    text-align: center;
    color: #fff;
    padding: 15px 0;
}

/* Responsive Adjustments */
/* Desktop Mega Menu */
@media (min-width: 768px) {
    .mega-dropdown .dropdown-menu {
        position: absolute;
        top: 100%; /* below navbar */
        left: 0; /* align left edge with parent nav */
        width: 100vw; /* full viewport width */
        max-width: none;
        max-height: 80vh; /* allow full width */
        padding: 20px;
        background-color: #f9f9f9;
        border-radius: 0 0 10px 10px;
        box-shadow: 0 8px 20px rgba(0,0,0,0.12);
        z-index: 1050;
        overflow-y: auto;
    }

        /* Reset row margins */
        .mega-dropdown .dropdown-menu .row {
            margin: 0;
        }

        /* Adjust column padding */
        .mega-dropdown .dropdown-menu .col-6,
        .mega-dropdown .dropdown-menu .col-md-3 {
            padding-left: 15px;
            padding-right: 15px;
        }
}

.search-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

    .search-container .form-control {
        height: 40px;
        border-radius: 50px;
    }

    .search-container #btnSearch {
        height: 40px;
        border-radius: 50px;
        padding: 0 18px;
    }

/* Mobile still side-by-side */
@media (max-width: 500px) {
    .search-container {
        width: 100%;
    }

        .search-container .form-control {
            flex: 1; /* textbox takes full space */
        }

        .search-container #btnSearch {
            white-space: nowrap;
        }
}


/* Pre-Footer */
.pre-footer .container {
    flex-direction: column !important;
    text-align: center;
}

.pre-footer a.custom-link {
    display: inline-block;
    margin: 6px 10px;
    font-size: 15px;
}

.pre-footer .container div:last-child {
    margin-top: 10px;
    font-size: 15px;
}

/* Header Buttons */
header .d-flex.mt-3.mt-md-0 {
    justify-content: center;
    width: 100%;
    gap: 10px;
    margin-top: 10px !important;
}
