/* Main Stylesheet (Ported from Soil Nutrient Analysis) */

:root {
    --color-primary: #2d6a4f;
    /* Deep Green */
    --color-secondary: #00b4d8;
    /* Tech Cyan */
    --color-dark: #1b4332;
    /* Darker Green */
    --color-light: #f1f8e9;
    /* Light Pale Green */
    --color-text: #333;
    --color-text-light: #666;
    --color-white: #ffffff;
    --color-accent: #d9ed92;
    /* Lime Green */
    --color-orange: #ff9f1c;
    /* Orange for Donate/Highlight */

    --font-heading: 'Prompt', sans-serif;
    --font-body: 'Sarabun', sans-serif;

    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;

    --border-radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--color-light);
    /* Global Background Image */
    background: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)), url('../images/bg-ai-agri.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--color-text);
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-dark);
    margin-bottom: var(--spacing-sm);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--border-radius);
}

/* Header & Nav */
/* Header & Nav */
/* Header & Nav - Futuristic Glassmorphism */
/* Header & Nav - Futuristic Glassmorphism */
header {
    background: transparent;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.4s ease;
    padding: 15px 0;
}

header.scrolled {
    background: rgba(15, 23, 42, 0.85);
    /* Dark blue-gray glass */
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 25px;
}

.nav-links {
    display: flex;
    gap: 8px;
    list-style: none;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    /* Container pill */
    padding: 6px 10px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.nav-links li {
    margin: 0;
    position: relative;
}

/* Base Link Style */
.nav-links a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 18px;
    border-radius: 20px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

/* Hover State - Clean & Glowing */
.nav-links a:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

/* Active State */
.nav-links a.text-orange {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

/* Language Switcher Special Style */
/* Language Switcher Inline Style */
.lang-switcher-item {
    margin-left: 10px;
}

.lang-inline {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2px 10px;
}

.lang-inline a {
    padding: 4px 6px !important;
    /* Override default nav link padding */
    font-size: 0.85rem !important;
    color: rgba(255, 255, 255, 0.6) !important;
    background: transparent !important;
    /* No background on inactive */
    border-radius: 4px !important;
    min-width: unset !important;
    display: inline-block !important;
}

.lang-inline a:hover {
    color: #fff !important;
    transform: none !important;
    text-shadow: none !important;
}

.lang-inline a.active {
    color: #fff !important;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: var(--color-orange);
    text-underline-offset: 4px;
}

.lang-inline .sep {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
    margin: 0 2px;
}

/* Section Backgrounds (Replaces simple colors with Rich Gradients/Patterns) */
.section-bg-1 {
    /* Schedule: Custom Generated Background */
    background: linear-gradient(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.85)), url('../images/bg-schedule.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Parallax feel */
}

.section-bg-2 {
    /* Project: Subtle Tech Green */
    background: linear-gradient(to right, #f0fdf4, #ffffff, #f0fdf4);
    background-image:
        linear-gradient(to right, #f0fdf4, #ffffff, #f0fdf4),
        radial-gradient(#2d6a4f 0.5px, transparent 0.5px);
    background-size: 100%, 20px 20px;
}

.section-bg-3 {
    /* Profile: Warm White */
    background: linear-gradient(-20deg, #fff1eb 0%, #ace0f9 100%);
    /* Or something clean */
    background: #ffffff;
}

.section-bg-4 {
    /* Menu: Abstract Shapes */
    background-color: #f3f4f6;
    background-image: radial-gradient(circle at 10% 20%, rgb(242, 246, 253) 0%, rgb(248, 252, 255) 90%);
}

.section-bg-5 {
    /* News: Light pattern */
    background: linear-gradient(to top, #cfd9df 0%, #e2ebf0 100%);
    background: #f8fafc;
}

.section-bg-6 {
    /* Philosophy: Nature Tint */
    background: linear-gradient(120deg, #d4fc79 0%, #96e6a1 100%);
    background: linear-gradient(to top, #e6b980 0%, #eacda3 100%);
    /* Let's go with a subtle green-orange mix for Soil/Agri vibe */
    background: linear-gradient(120deg, #f6d365 0%, #fda085 100%);
    /* Too strong? */
    background: linear-gradient(to top, #fff1eb 0%, #ace0f9 100%);
    /* Clean */
}

/* Utility to ensure text readability on gradients */
.section-title {
    position: relative;
    z-index: 2;
}


.nav-logo-img {
    height: 50px;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
    transition: transform 0.3s;
}

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

.text-orange {
    color: var(--color-orange);
}

.text-brown {
    color: #d2691e;
}

.text-yellow {
    color: #ffd700;
}


/* Dropdown Menu */
/* Dropdown Menu */
/* Dropdown Styles */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    /* Hidden by default */
    position: absolute;
    top: 100%;
    left: 0;
    /* Align left */
    /* Remove center transform which causes hover gaps */
    transform: none;
    margin-top: 5px;
    /* Reduced gap */
    background: rgba(15, 23, 42, 0.98);
    /* Less transparent for readability */
    /* Deep dark bg */
    min-width: 220px;
    /* Slightly wider */
    border-radius: 8px;
    /* Simpler radius */
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    padding: 10px 0;
    /* Vertical padding */
    z-index: 9999;
}

/* Add bridge to prevent menu closing when moving mouse */
.dropdown:hover::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 20px;
}

.dropdown:hover .dropdown-content {
    display: block;
    animation: fadeIn 0.2s ease forwards;
    /* Simpler fade in */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

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

.dropdown-content li {
    display: block;
    width: 100%;
}

.dropdown-content a {
    display: block;
    padding: 10px 15px;
    color: #cbd5e1 !important;
    border-radius: 8px;
    background: transparent;
    text-align: left;
    font-size: 0.9rem;
}

.dropdown-content a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff !important;
    transform: translateX(3px);
}


/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-white);
    /* Hero uses the same image but darker for text contrast */
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.75)), url('../images/bg-ai-agri.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-content {
    max-width: 900px;
    padding: 50px;
    /* Glass card backing */
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    animation: fadeIn 1s ease-out;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 5rem);
    color: var(--color-white);
    margin-bottom: var(--spacing-sm);
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
    line-height: 1.1;
    word-wrap: break-word;
    font-weight: 800;
}

/* Responsive Typography */
.hero-title-large {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: bold;
    line-height: 1.2;
}

.hero-title-medium {
    font-size: clamp(1.6rem, 4vw, 2.6rem);
    font-weight: bold;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    font-weight: bold;
    color: #f6f6f0ff;
    display: block;
    margin-bottom: 15px;
}

.hero-description {
    font-size: clamp(1rem, 3vw, 1.2rem);
    font-weight: bold;
    color: rgba(250, 203, 15, 0.8);
}

.hero-layout {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

.hero-text-col {
    flex: 1;
    min-width: 300px;
    text-align: left;
    padding-right: 20px;
}

.hero-img-col {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
}

/* Responsive Image Container */
.photo-cycler-responsive {
    width: clamp(200px, 40vw, 280px);
    height: clamp(200px, 40vw, 280px);
    /* Keep aspect ratio square */
    border-radius: 50%;
    border: 8px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
    /* Maintain aspect ratio if supported, or rely on width/height clamp matching */
    aspect-ratio: 1 / 1;
}

@media (max-width: 900px) {
    .hero-layout {
        flex-direction: column-reverse;
        /* Text bottom, image top? Or standard column */
        text-align: center;
    }

    .hero-text-col {
        padding-right: 0;
        text-align: center;
        margin-top: 30px;
    }

    .hero-buttons {
        justify-content: center;
    }
}


.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--color-secondary);
    color: var(--color-white);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.btn:hover {
    background-color: #0096c7;
    transform: translateY(-3px);
}

/* Hero Buttons Container */
.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    margin-top: 20px;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--color-orange);
    color: var(--color-orange);
    /* margin-left: 10px; Removed for flex gap */
}

.btn-outline:hover {
    background-color: var(--color-orange);
    color: var(--color-white);
}

.btn-donate {
    background-color: #f3722c;
    color: var(--color-white);
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-donate:hover {
    background-color: #d94e10;
    color: var(--color-white) !important;
    transform: translateY(-2px);
}

.btn-apps {
    background-color: var(--color-orange);
    color: var(--color-white) !important;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(255, 159, 28, 0.3);
    font-weight: 600;
}

.btn-apps:hover {
    background-color: #e88d0c;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(255, 159, 28, 0.4);
}

.btn-orange {
    background-color: var(--color-orange);
    color: var(--color-white);
    box-shadow: 0 4px 6px rgba(255, 159, 28, 0.3);
    /* margin-left: 10px; Removed for flex gap */
}

.btn-orange:hover {
    background-color: #e88d0c;
    color: var(--color-white);
    box-shadow: 0 6px 8px rgba(255, 159, 28, 0.4);
}

/* Sections */
section {
    padding: var(--spacing-lg) var(--spacing-md);
    max-width: 100%;
    /* Allow sections to span full width for background */
    margin: 0 auto;
}

/* Section Backgrounds */
.section-bg-light {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(5px);
}

.section-bg-white {
    background-color: rgba(255, 255, 255, 0.95);
}

.section-bg-pattern {
    background-color: rgba(241, 248, 233, 0.9);
    /* Light Green Tint */
    background-image: radial-gradient(#2d6a4f 0.5px, transparent 0.5px);
    background-size: 20px 20px;
}

.container-centered-lg,
.container-centered-md,
.tech-grid,
.benefits-grid {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: var(--spacing-lg);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--color-secondary);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* Technology Grid (Used for Services/Quick Access) */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.card {
    background: var(--color-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.card:hover {
    transform: translateY(-10px);
}

.card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.card-icon-wrapper {
    width: 100%;
    height: 200px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: var(--color-secondary);
}

.card-content {
    padding: var(--spacing-md);
}

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

/* Features/Benefits */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    text-align: center;
}

.benefit-item {
    padding: var(--spacing-md);
    background: var(--color-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.icon {
    font-size: 3rem;
    color: var(--color-secondary);
    margin-bottom: var(--spacing-sm);
}

/* Innovations Table/List (Used for News) */
.innovation-list {
    list-style: none;
}

.innovation-item {
    background: var(--color-white);
    margin-bottom: var(--spacing-sm);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    box-shadow: var(--shadow);
}

.innovation-icon {
    font-size: 2rem;
    color: var(--color-primary);
    min-width: 50px;
    text-align: center;
}

/* Footer */
footer {
    background-color: var(--color-dark);
    color: var(--color-white);
    padding: var(--spacing-md);
    text-align: center;
    margin-top: var(--spacing-lg);
}

.footer-credit {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 5px;
}

/* Hamburger Menu Styles */
.hamburger {
    display: none;
    cursor: pointer;
    z-index: 1002;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    -webkit-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
    background-color: var(--color-text);
}

/* Hamburger Animation */
.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Responsive Navigation */
@media (max-width: 900px) {
    nav {
        padding: 1rem;
    }

    .hamburger {
        display: block;
    }

    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.98);
        width: 70%;
        height: 100vh;
        /* Full Height */
        text-align: center;
        transition: 0.3s;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        padding-top: 80px;
        /* Space for close button area */
        z-index: 1000;
        gap: 0;
        align-items: flex-start;
        /* Left align items */
        overflow-y: auto;
        /* Scrollable if long */
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        width: 100%;
        margin: 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        /* Separator */
    }

    .nav-links a {
        display: block;
        padding: 15px 20px;
        font-size: 1.1rem;
        text-align: left;
    }

    .nav-links a:hover {
        background-color: #f8fafc;
        color: var(--color-primary);
    }

    /* Make Dropdowns Clickable/Expandable on Mobile */
    .dropdown {
        position: static;
        /* Stack naturally */
        display: block;
        width: 100%;
    }

    .dropdown:hover .dropdown-content {
        /* Disable hover on mobile, rely on layout or simple display */
        display: block;
        /* Always show submenus or use JS click */
    }

    .dropdown-content {
        position: static;
        display: block;
        /* Always show submenus indented */
        box-shadow: none;
        background: transparent;
        padding: 0 0 10px 0;
        min-width: 100%;
        animation: none;
    }

    .dropdown-content a {
        padding: 10px 40px;
        /* Indent submenus */
        font-size: 0.95rem;
        color: #666;
    }

    .dropdown i.fa-chevron-down {
        display: none;
        /* Hide arrow on mobile to simplify */
    }

    /* Adjust Hero Header Size on Mobile */
    .hero h1 {
        font-size: 2rem;
    }
}

/* Ensure nav-links are visible on desktop */
@media (min-width: 901px) {
    .nav-links {
        display: flex !important;
        align-items: center;
    }

    .hamburger {
        display: none;
    }
}

/* Utilities */
.container-centered-md {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.container-centered-lg {
    max-width: 900px;
    margin: 0 auto;
}

.text-content {
    font-size: 1.1rem;
    color: #555;
}

.bg-white {
    background-color: var(--color-white);
}

/* Floating Animation */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

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

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

.img-floating {
    animation: float 4s ease-in-out infinite;
}

/* Hero Image Positioning */
.hero-img-container {
    position: absolute;
    top: 50%;
    right: 10%;
    transform: translateY(-50%);
    z-index: 10;
}

@media (max-width: 900px) {
    .hero-img-container {
        position: relative;
        top: auto;
        right: auto;
        transform: none;
        margin: 20px auto;
    }
}

/* Schedule Table */
.schedule-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.schedule-table th,
.schedule-table td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.schedule-table th {
    background-color: var(--color-primary);
    color: var(--color-white);
    font-weight: 600;
}

.schedule-table tr:hover {
    background-color: #f9f9f9;
    color: var(--color-primary);
    font-weight: 500;
}