/* AgroERP Landing Page - Custom Styles */

/* ============================================
   CSS Variables
   ============================================ */
:root {
    --primary: #2d4a3e;
    --accent: #d4e368;
    --earth-light: #f9f7f2;
    --earth-muted: #6b705c;
    --border: #e2e2d9;
    --charcoal: #1a1c1a;
}

/* ============================================
   Base Styles
   ============================================ */
body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--earth-light);
    color: #1a1c1a;
}

/* ============================================
   Material Icons Configuration
   ============================================ */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ============================================
   Custom Background Patterns
   ============================================ */
.feature-grid-pattern {
    background-image: radial-gradient(#2d4a3e 0.5px, transparent 0.5px);
    background-size: 24px 24px;
    opacity: 0.05;
}

/* ============================================
   Smooth Scroll Behavior
   ============================================ */
html {
    scroll-behavior: smooth;
}

/* ============================================
   Mobile Menu Styles - FIXED
   ============================================ */

/* Hide desktop navigation on mobile */
@media (max-width: 1023px) {
    nav.hidden {
        display: none !important;
    }
}

/* Hamburger button - visible only on mobile */
.hamburger {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 60;
    position: relative;
}

/* Hide hamburger on desktop */
@media (min-width: 1024px) {
    .hamburger {
        display: none !important;
    }
}

/* Hamburger lines */
.hamburger-line {
    width: 24px;
    height: 2px;
    background-color: var(--primary);
    display: block;
    transition: all 0.3s ease-in-out;
    transform-origin: center;
}

/* Hamburger active state (X icon) */
.hamburger.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

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

/* Mobile menu overlay */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 40;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
    display: none;
}

/* Show overlay on mobile when menu is active */
@media (max-width: 1023px) {
    .mobile-menu-overlay {
        display: block;
    }
    
    .mobile-menu-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }
}

/* Hide overlay on desktop */
@media (min-width: 1024px) {
    .mobile-menu-overlay {
        display: none !important;
    }
}

/* Mobile menu panel */
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 100%;
    background-color: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 50;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: none;
}

/* Show mobile menu on mobile screens */
@media (max-width: 1023px) {
    .mobile-menu {
        display: block;
    }
    
    .mobile-menu.active {
        transform: translateX(0);
    }
}

/* Hide mobile menu on desktop */
@media (min-width: 1024px) {
    .mobile-menu {
        display: none !important;
    }
}

/* Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
}

/* Mobile menu close button */
.mobile-menu [data-mobile-menu-close] {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
    cursor: pointer;
    border: none;
    background: transparent;
}

.mobile-menu [data-mobile-menu-close]:hover {
    background-color: var(--earth-light);
}

/* ============================================
   Custom Utilities & Mobile Overrides
   ============================================ */
@media (max-width: 768px) {
    /* Hero section mobile adjustments */
    .hero-title {
        font-size: 2.5rem !important;
        line-height: 1.1 !important;
    }
}

/* Ensure header stays on top */
header {
    position: sticky;
    top: 0;
    z-index: 50;
}