@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Outfit:wght@500;700;800&display=swap');

:root {
    /* Professional Earthy/Agri Palette */
    --primary: #059669; /* Emerald 600 */
    --primary-dark: #047857; /* Emerald 700 */
    --primary-light: #d1fae5; /* Emerald 100 */
    --accent: #f59e0b; /* Amber 500 */
    --accent-hover: #d97706; /* Amber 600 */
    
    --text-main: #111827; /* Gray 900 */
    --text-muted: #4b5563; /* Gray 600 */
    --text-light: #9ca3af; /* Gray 400 */
    
    --bg-main: #f9fafb; /* Gray 50 */
    --bg-surface: #ffffff;
    --border-color: #e5e7eb; /* Gray 200 */
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* Typography Utilities */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white !important;
    box-shadow: 0 4px 14px 0 rgba(5, 150, 105, 0.39);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.23);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary-light);
}

/* Attractive Glow Button */
.btn-glow {
    position: relative;
    padding: 0.75rem 1.75rem;
    background: linear-gradient(135deg, #ffffff 0%, #bbf7d0 100%);
    color: #000000 !important;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-full);
    font-weight: 700;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.15);
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: 0; left: -150%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
    z-index: -1;
}

.btn-glow:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.5);
}

.btn-glow:hover::before {
    left: 150%;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.25rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm);
    padding: 1rem 5%;
}

.navbar.scrolled .mobile-menu-btn {
    color: var(--primary-dark) !important;
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.logo span {
    color: white;
}

.navbar.scrolled .logo {
    color: var(--text-main);
}

.navbar.scrolled .logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 700;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

.nav-links a:hover, .nav-links a.active {
    color: white;
}

.navbar.scrolled .nav-links a {
    color: var(--text-muted);
}

.navbar.scrolled .nav-links a:hover,
.navbar.scrolled .nav-links a.active {
    color: var(--primary);
}

.nav-links a:not(.btn)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary);
    transition: var(--transition);
}

.nav-links a:not(.btn):hover::after, .nav-links a.active:not(.btn)::after {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5%;
    background: 
        linear-gradient(to top, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.85) 35%, rgba(255, 255, 255, 0) 100%),
        url('https://images.unsplash.com/photo-1500382017468-9049fed747ef?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    position: relative;
    text-align: center;
}

.hero-content {
    max-width: 700px;
    margin-top: 4rem;
    animation: fadeInUp 1s ease-out;
}

.hero-tag {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: var(--primary-light);
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: var(--radius-full);
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero p {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 580px;
    text-wrap: balance;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Sections */
.section {
    padding: 6rem 5%;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.75rem;
    color: var(--text-main);
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Grid Layouts */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
    max-width: 1280px;
    margin: 0 auto;
}

/* Professional Cards */
.card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.card-img-wrap {
    position: relative;
    overflow: hidden;
    height: 240px;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .card-img {
    transform: scale(1.05);
}

.badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    color: var(--primary-dark);
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    z-index: 2;
}

.card-content {
    padding: 1.75rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.card-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-desc i {
    color: var(--primary);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

/* Specific Card overrides for Products */
.product-price {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.product-qty {
    background: var(--bg-main);
    color: var(--text-muted);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 500;
}

/* Page Headers (Details Pages) */
.page-header {
    padding: 9rem 5% 4rem;
    background: linear-gradient(180deg, var(--primary-light) 0%, var(--bg-main) 100%);
    text-align: center;
}

.profile-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid var(--bg-surface);
    box-shadow: var(--shadow-lg);
    margin: 0 auto 1.5rem;
}

.page-title {
    font-size: 3rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    background: white;
    border-top: 1px solid var(--border-color);
    padding: 4rem 5% 2rem;
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand .logo {
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border-color);
    grid-column: 1 / -1;
}

.empty-state i {
    font-size: 3rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-muted);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    outline: none;
    font-size: 1.6rem;
    color: white;
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 0.5rem;
    line-height: 1;
    -webkit-appearance: none;
    appearance: none;
}

.sidebar-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

body.sidebar-mobile-open .sidebar-overlay {
    display: block;
    opacity: 1;
}

/* Nav Drawer */
.nav-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.nav-drawer-overlay.open {
    opacity: 1;
    visibility: visible;
}

.nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 80%;
    max-width: 300px;
    background: #ffffff;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-drawer.open {
    transform: translateX(0);
}
.nav-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}
.nav-drawer-close {
    background: #f3f4f6;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: #4b5563;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: all 0.2s ease;
}
.nav-drawer-close:hover { background: #e5e7eb; color: #059669; }
.nav-drawer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}
.nav-drawer-links li a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 1rem;
    border-radius: 0.75rem;
    text-decoration: none;
    color: #111827;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
}
.nav-drawer-links li a:hover,
.nav-drawer-links li a.active {
    background: #d1fae5;
    color: #047857;
}
.nav-drawer-links .drawer-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 0.75rem 0;
}
.nav-drawer-links li a.btn-glow {
    margin-top: 0.25rem;
    background: linear-gradient(135deg, #ffffff 0%, #bbf7d0 100%);
    color: #000 !important;
    border: 1px solid #cbd5e1;
    border-radius: 9999px;
    justify-content: center;
}

/* =============================================
   Portal Overlapping Section
   ============================================= */
.portal-overlap-section {
    position: relative;
    z-index: 10;
    margin-top: -7rem;
    padding: 0 5% 0;
    margin-bottom: 0;
}

.portal-overlap-container {
    max-width: 1100px;
    margin: 0 auto;
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 25px 60px rgba(5, 150, 105, 0.13), 0 8px 24px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
    overflow: hidden;
    padding: 3rem 3.5rem;
    display: flex;
    gap: 3rem;
    align-items: stretch;
}

.portal-overlap-header {
    flex: 1 1 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.75rem;
    padding-right: 2rem;
    border-right: 1px solid var(--border-color);
}

.portal-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary);
    background: var(--primary-light);
    padding: 0.35rem 0.9rem;
    border-radius: var(--radius-full);
    width: fit-content;
}

.portal-overlap-header h2 {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
    margin: 0;
}

.portal-overlap-header p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
}

.portal-cards-row {
    flex: 2 1 560px;
    display: flex;
    align-items: stretch;
    gap: 0;
}

.portal-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 2rem;
    border-radius: 1rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.portal-card:hover {
    background: var(--bg-main);
    transform: translateY(-4px);
}

.portal-card-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-light), rgba(34,197,94,0.05));
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.portal-card-icon i {
    font-size: 2.25rem;
    color: var(--primary);
}

.portal-card-icon--accent {
    background: linear-gradient(135deg, #fef3c7, #fde68a33);
}

.portal-card-icon--accent i {
    color: var(--accent-hover);
}

.portal-card-body {
    flex: 1;
}

.portal-card-body h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.portal-card-body p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin: 0;
}

.portal-card-action {
    font-size: 0.875rem;
    padding: 0.6rem 1.25rem;
    border-color: var(--primary);
    color: var(--primary) !important;
    width: 100%;
    justify-content: center;
    white-space: nowrap;
}

.portal-card-guide:hover .portal-card-action {
    background: var(--primary-light);
}

.portal-card-btns {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    width: 100%;
}

.portal-card-btns .btn {
    font-size: 0.875rem;
    padding: 0.6rem 1.25rem;
    justify-content: center;
}

.portal-divider {
    width: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1002;
        position: relative;
        border: none !important;
        outline: none !important;
        box-shadow: none !important;
        background: transparent !important;
    }

    .nav-links { display: none !important; }

    .sidebar {
        position: fixed;
        margin-left: -250px;
    }
    
    body.sidebar-mobile-open .sidebar {
        margin-left: 0;
    }

    .close-sidebar-btn { display: block; }

    .hero-tag { font-size: 0.7rem; padding: 0.3rem 0.8rem; margin-top: 1rem; }
    .hero h1 { font-size: 2.8rem; }
    .hero-content { margin-top: 7rem; text-align: center; flex-direction: column !important; gap: 3rem !important; padding-bottom: 2rem; }
    .hero-content > div { max-width: 100% !important; justify-content: center !important; align-items: center !important; flex-wrap: wrap !important; }
    .hero-cards-wrapper { justify-content: center !important; width: 100%; }
    .hero {
        background: linear-gradient(to top, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.9) 35%, rgba(255, 255, 255, 0) 100%),
                    url('https://images.unsplash.com/photo-1500382017468-9049fed747ef?auto=format&fit=crop&w=1920&q=80') center/cover;
        justify-content: center;
        align-items: flex-start;
    }
    .hero-actions { display: flex; flex-direction: column; gap: 1rem; align-items: center; width: 100%; }
    .hero-actions .btn { width: 100%; justify-content: center; max-width: 300px; }
    .section-header h2 { font-size: 2.25rem; }

    /* Portal Overlap - Mobile */
    .portal-overlap-section {
        margin-top: -4rem;
        padding: 0 1rem;
    }
    .portal-overlap-container {
        flex-direction: column;
        padding: 2rem 1.5rem;
        gap: 1.75rem;
        border-radius: 1.25rem;
    }
    .portal-overlap-header {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding-right: 0;
        padding-bottom: 1.5rem;
    }
    .portal-overlap-header h2 {
        font-size: 1.5rem;
    }
    .portal-cards-row {
        flex-direction: column;
        gap: 0;
    }
    .portal-divider {
        width: 100%;
        height: 1px;
        margin: 0;
    }
    .portal-card {
        padding: 1.5rem 1rem;
    }
    .portal-card:hover {
        transform: none;
    }
}
