/* ========== PART 1: navbar.css - ROOT VARIABLES & BASE ========== */
:root {
    --primary-green: #5DB85F;
    --dark-green: #3A9B3D;
    --light-green: #8FD892;
    --accent-green: #6FC972;
    --gold: #C8964F;
    --brown-gold: #B8863F;
    --cream: #FAFAFA;
    --text-dark: #2D7A30;
    --text-light: #424242;
    --text-brown: #5D4037;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    overflow-x: hidden;
    color: var(--text-light);
    line-height: 1.6;
    padding-top: 20px;
    background: #f8f9fa;
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--cream);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark-green);
}

/* ========== NAVBAR STYLES ========== */
.navbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    /* padding: 0.5rem 0; */
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(93, 184, 95, 0.1);
}

.navbar.scrolled {
    padding: 0.7rem 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.12);
}

.navbar-nav {
    gap: 10px;
}


.navbar-brand {
    color: var(--dark-green) !important;
    /* font-weight: 800;
    font-size: 1.5rem; */
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    /* gap: 12px; */
    font-size: 1.4rem;
    font-weight: 700;
    gap: 8px;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.03);
}

.logo-img {
    /* width: 50px;
    height: 50px; */
    width: 45px;
    height: 45px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.navbar-brand:hover .logo-img {
    transform: rotate(-5deg) scale(1.1);
}

.navbar-toggler {
    border: 2px solid var(--primary-green);
    padding: 0.5rem;
    border-radius: 8px;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(93, 184, 95, 0.2);
    outline: none;
}

.nav-link {
    color: var(--text-light) !important;
    /* margin: 0 1.2rem; */
    /* font-weight: 500; */
    position: relative;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    cursor: pointer;
    /* padding: 0.5rem 0 !important; */
    margin: 0 8px;
    font-size: 1rem;
    font-weight: 500;
    padding: 6px 4px !important;
    display: flex;
    height: 40px;
    align-items: center;
}

.nav-link:hover {
    color: var(--primary-green) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-green), var(--light-green));
    transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 2px;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active::after {
    width: 100%;
    background: linear-gradient(90deg, var(--primary-green), var(--light-green));
}

/* ========== LANGUAGE TOGGLE BUTTON ========== */
.language-toggle {
    margin-left: 1rem;
}

.language-btn {
    display: flex;
    align-items: center;
    height: 38px;
    gap: 6px;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--dark-green) 100%);
    border: none;
    padding: 4px 8px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(93, 184, 95, 0.3);
    position: relative;
    overflow: hidden;
}

.language-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 50%;
    background: linear-gradient(135deg, var(--dark-green) 0%, var(--accent-green) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.language-btn:hover::before {
    opacity: 1;
}

.language-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(93, 184, 95, 0.4);
}

.language-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(93, 184, 95, 0.3);
}

.lang-en,
.lang-mr {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.lang-en.active,
.lang-mr.active {
    color: #ffffff;
    transform: scale(1.1);
}

.lang-separator {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
    font-size: 0.85rem;
    position: relative;
    z-index: 1;
}

/* ========== CROPS DROPDOWN TOGGLE ========== */
.crops-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.crops-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: var(--text-light);
    background: none;
    border: none;
    font-weight: 500;
    transition: color 0.3s;
    font-size: 0.95rem;
    padding: 6px 4px !important;
    /* SAME as .nav-link */
    margin: 0 8px;
    height: 40px;
    font-family: 'Inter', sans-serif;
}

.crops-dropdown-toggle:hover {
    color: var(--primary-green);
}

.dropdown-arrow {
    transition: transform 0.3s ease;
    opacity: 0.8;
    font-size: 0.75rem;
}

.crops-dropdown-toggle[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
    opacity: 1;
}

/* ========== FULLSCREEN DROPDOWN - NO SCROLL ========== */
.crops-dropdown-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px 40px;
}

.crops-dropdown-menu.active {
    opacity: 1;
    visibility: visible;
}

/* REMOVE EXTRA SPACE FROM BUTTON DEFAULT */
.crops-dropdown-toggle:focus {
    outline: none;
    box-shadow: none;
}


.crops-dropdown-toggle,
.nav-link {
    line-height: 1;
}

/* ========== BACKGROUND IMAGE CONTAINER ========== */
.dropdown-bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.dropdown-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    filter: blur(0px) brightness(0.5);
}

.dropdown-bg-image.active {
    opacity: 1;
}

/* ========== BACK & CLOSE BUTTONS ========== */
.dropdown-back-btn {
    position: fixed;
    top: 30px;
    left: 40px;
    background: white;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 10001;
}

.dropdown-back-btn:hover {
    background: var(--primary-green);
    color: white;
    transform: translateX(-5px);
    box-shadow: 0 6px 30px rgba(93, 184, 95, 0.4);
}

.dropdown-close-btn {
    position: fixed;
    top: 30px;
    right: 40px;
    background: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--text-dark);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 10001;
}

.dropdown-close-btn:hover {
    background: #dc3545;
    color: white;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 6px 30px rgba(220, 53, 69, 0.4);
}

/* ========== DROPDOWN CONTENT & GRID ========== */
.crops-dropdown-content {
    width: 100%;
    max-width: 1500px;
    position: relative;
    z-index: 1;
}

.crops-dropdown-header {
    text-align: center;
    margin-bottom: 30px;
    animation: fadeInDown 0.6s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.crops-dropdown-header h2 {
    font-size: 2.2rem;
    font-weight: 800;
    color: white;
    margin-bottom: 8px;
    letter-spacing: -1px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
}

.crops-dropdown-header p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.3);
}

/* ========== CROPS GRID - PROPER ALIGNMENT ========== */
.crops-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 40px 20px;
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 30px 60px;
    align-content: start;
    justify-items: center;
    width: 100%;
}

/* Modern subtle scrollbar */
.crops-grid::-webkit-scrollbar {
    width: 6px;
}

.crops-grid::-webkit-scrollbar-track {
    background: transparent;
}

.crops-grid::-webkit-scrollbar-thumb {
    background: rgba(93, 184, 95, 0.1);
    border-radius: 10px;
    transition: background 0.3s;
}

.crops-grid:hover::-webkit-scrollbar-thumb {
    background: rgba(93, 184, 95, 0.4);
}

.crop-item {
    text-align: center;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding: 20px 10px;
    border-radius: 30px;
    position: relative;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    max-width: 320px;
    background: transparent;
    animation: fadeInUp 0.8s ease-out backwards;
}

.crop-thumb {
    width: 80%;
    max-width: 250px;
    aspect-ratio: 1/1;
    height: auto;
    border-radius: 50%;
    overflow: hidden;
    border: 8px solid var(--primary-green);
    box-shadow: 0 20px 40px rgba(93, 184, 95, 0.2);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    margin: 0 auto 20px;
    background: #fff;
}

.crop-item:hover .crop-thumb {
    border-color: var(--dark-green);
    box-shadow: 0 30px 80px rgba(93, 184, 95, 0.5);
    transform: scale(1.08) rotate(2deg);
}

.crop-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    display: block;
}

.crop-item:hover .crop-thumb img {
    transform: scale(1.2);
}

.crop-name {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0;
    transition: all 0.3s ease;
    line-height: 1.3;
    letter-spacing: -0.7px;
}

.crop-item:hover .crop-name {
    color: var(--primary-green);
    transform: scale(1.05);
}

/* BACKDROP */
.crops-dropdown-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.crops-dropdown-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* RESPONSIVE */
@media (max-width: 1400px) {
    .crops-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1024px) {
    .crops-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }

    .crop-thumb {
        width: 70px;
        height: 70px;
    }

    .crops-dropdown-header h2 {
        font-size: 2rem;
    }

    .language-btn {
        padding: 6px 12px;
    }

    .lang-en,
    .lang-mr {
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .crops-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .crop-thumb {
        width: 85px;
        height: 85px;
        border-width: 4px;
    }

    .crop-name {
        font-size: 1rem;
    }

    .crops-dropdown-header h2 {
        font-size: 1.8rem;
    }

    .dropdown-back-btn,
    .dropdown-close-btn {
        top: 20px;
    }

    .dropdown-back-btn {
        left: 20px;
    }

    .dropdown-close-btn {
        right: 20px;
        width: 45px;
        height: 45px;
    }

    .language-toggle {
        margin-left: 0;
        margin-top: 0.5rem;
    }

    .navbar-nav {
        align-items: flex-start !important;
    }
}

@media (max-width: 480px) {
    .crops-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px 5px;
        padding: 15px 10px;
    }

    .crop-thumb {
        width: 100%;
        border-width: 3px;
    }

    .crop-name {
        font-size: 0.85rem;
    }

    .crop-item {
        padding: 10px 5px;
    }

    .crops-dropdown-header h2 {
        font-size: 1.4rem;
    }

    .crops-dropdown-header p {
        font-size: 0.8rem;
    }
}