/* ============================================================
   agtech.help Frontend Global Stylesheet
   Master Design System - Premium Agriculture Ecosystem
   ============================================================ */

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

:root {
    --primary: #2E7D32;
    --primary-light: #43A047;
    --primary-soft: #E8F5E9;
    --accent: #FFB300;
    --accent-soft: #FFF8E1;
    --dark: #0F172A;
    --bg-body: #F8FAFC;
    --white: #FFFFFF;
    --success: #4CAF50;
    --warning: #F59E0B;
    --danger: #EF4444;
    --text-primary: #1E293B;
    --text-muted: #64748B;
    --border: #E2E8F0;

    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 32px;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-hover: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6,
.font-poppins {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -0.02em;
}

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

/* ─── Layout & Utilities ────────────────────────────────────────── */
.section-padding {
    padding: 40px 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

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

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, #1B5E20 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* ─── Buttons ─────────────────────────────────────────────────── */
.btn-premium {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.2);
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(16, 185, 129, 0.3);
    color: white;
}

.btn-outline-premium {
    background: transparent;
    color: #10b981;
    border: 2px solid #10b981;
    border-radius: 50px;
    padding: 0.4rem 1.4rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-premium:hover {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    transform: translateY(-2px);
    border-color: transparent;
}

.btn-primary-custom {
    background: var(--primary);
    color: var(--white);
    border-radius: 99px;
    font-weight: 600;
    padding: 12px 28px;
    border: none;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(46, 125, 50, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary-custom:hover {
    background: var(--primary-light);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.35);
}

.btn-accent {
    background: var(--accent);
    color: var(--dark);
    border-radius: 99px;
    font-weight: 600;
    padding: 12px 28px;
    border: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-accent:hover {
    background: #FFC107;
    transform: translateY(-2px);
}

/* ─── Header ──────────────────────────────────────────────────── */
.navbar {
    transition: var(--transition);
    padding: 1rem 0;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    padding: 0.5rem 0;
}

.navbar-brand {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    font-weight: 500;
    color: var(--text-primary) !important;
    font-size: 0.95rem;
}

.nav-link:hover {
    color: var(--primary) !important;
}

/* ─── Active Nav Link ────────────────────────────────────────── */
.nav-link.nav-active {
    color: var(--primary) !important;
    font-weight: 600;
    position: relative;
}

/* Animated green underline indicator */
.nav-link.nav-active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 99px;
    animation: navDotIn 0.25s ease forwards;
}

@keyframes navDotIn {
    from {
        width: 0;
        opacity: 0;
    }

    to {
        width: 22px;
        opacity: 1;
    }
}

/* Active Login link */
.nav-login-link.nav-active {
    color: var(--primary) !important;
}

/* ─── Hero Section ────────────────────────────────────────────── */
.hero-section {
    position: relative;
    padding: 10px 0 20px;
    background:
        linear-gradient(to bottom,
            rgba(15, 23, 42, 0.7) 0%,
            rgba(15, 23, 42, 0.5) 40%,
            rgba(15, 23, 42, 0.85) 100%),
        url('/images/hero-bg.png') center 40% / cover no-repeat;
    overflow: hidden;
}

.hero-title {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 650px;
}

.floating-card {
    position: absolute;
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 0.85rem 1.1rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.85rem;
    animation: float 6s ease-in-out infinite;
    z-index: 2;
    white-space: nowrap;
    max-width: 220px;
}

/* AI Crop Advisor — top right, safely inside */
.floating-card.fc-1 {
    top: 18%;
    right: 3%;
    animation-delay: 0s;
}

/* Weather Telemetry — bottom right, safely inside */
.floating-card.fc-2 {
    bottom: 25%;
    right: 3%;
    animation-delay: 2s;
}

/* Marketplace — left side, safely inside (was -5%, now 2%) */
.floating-card.fc-3 {
    top: 38%;
    left: 2%;
    animation-delay: 4s;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* ─── Cards ───────────────────────────────────────────────────── */
.ag-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.ag-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-light);
}

.icon-box {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 1.5rem;
}

.icon-box.primary {
    background: var(--primary-soft);
    color: var(--primary);
}

.icon-box.accent {
    background: var(--accent-soft);
    color: var(--accent);
}

.badge-custom {
    padding: 6px 12px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
}

.badge-primary {
    background: var(--primary-soft);
    color: var(--primary);
}

.badge-accent {
    background: var(--accent-soft);
    color: var(--accent);
}

/* ─── AI Tools Section ────────────────────────────────────────── */
.ai-section {
    background-color: var(--dark);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.ai-section::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(67, 160, 71, 0.15) 0%, transparent 70%);
    top: -200px;
    left: -200px;
}

.ai-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
}

.ai-card:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 30px rgba(67, 160, 71, 0.2);
    border-color: rgba(67, 160, 71, 0.5);
    transform: translateY(-5px);
}

/* ─── Footer ──────────────────────────────────────────────────── */
.footer {
    background-color: var(--white);
    border-top: 1px solid var(--border);
    padding: 60px 0 30px;
}

.footer-link {
    color: var(--text-muted);
    transition: var(--transition);
    display: block;
    margin-bottom: 0.5rem;
}

.footer-link:hover {
    color: var(--primary);
    transform: translateX(4px);
}

/* ─── Animations ──────────────────────────────────────────────── */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUpAnim 0.8s forwards cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeUpAnim {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Jobs Hero Section ───────────────────────────────────────── */
.jobs-hero-section {
    position: relative;
    min-height: 400px;
    isolation: isolate;
}

/* Full-bleed background image */
.jobs-hero-bg {
    position: absolute;
    inset: 0;
    background-image: url('https://images.unsplash.com/photo-1574943320219-553eb213f72d?q=80&w=2071&auto=format&fit=crop');
    background-size: cover;
    background-position: center 40%;
    background-repeat: no-repeat;
    z-index: 1;
    transform: scale(1.03);
    transition: transform 8s ease;
}

.jobs-hero-section:hover .jobs-hero-bg {
    transform: scale(1.06);
}

/* Multi-layer dark gradient overlay */
.jobs-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, rgba(5, 20, 10, 0.72) 0%, rgba(5, 30, 15, 0.65) 60%, rgba(5, 20, 10, 0.85) 100%),
        linear-gradient(135deg, rgba(0, 60, 20, 0.5) 0%, rgba(0, 0, 0, 0.2) 100%);
    z-index: 2;
}

/* Green radial glow orb */
.jobs-hero-glow {
    position: absolute;
    top: -80px;
    right: 10%;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(105, 240, 174, 0.12) 0%, transparent 65%);
    z-index: 3;
    pointer-events: none;
}

/* Subtle dot grid pattern */
.jobs-hero-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 28px 28px;
    z-index: 3;
    pointer-events: none;
}

/* Bottom fade into body bg */
.jobs-hero-bottom-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, transparent, var(--bg-body));
    z-index: 4;
    pointer-events: none;
}

/* Hero badge */
.jobs-hero-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(105, 240, 174, 0.15);
    border: 1px solid rgba(105, 240, 174, 0.35);
    color: #69f0ae;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 6px 18px;
    border-radius: 99px;
    backdrop-filter: blur(6px);
}

/* ─── Mobile Responsiveness Overrides ─────────────────────────── */
@media (max-width: 991.98px) {
    .floating-card {
        display: none !important;
    }
}

@media (max-width: 767.98px) {
    .section-padding {
        padding: 30px 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .ai-section::before {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .btn-primary-custom,
    .btn-accent,
    .btn-saas {
        width: 100%;
        margin-bottom: 0.5rem;
        justify-content: center;
    }

    .d-flex.gap-3 {
        flex-direction: column;
        gap: 0.5rem !important;
    }
}