/* Universal Styles & Base Reset */
:root {
    --primary-color: #4CAF50; 
    --secondary-color: #FFC107; 
    --accent-color: #2196F3; 
    --dark-blue: #1A237E;
    --light-blue: #E3F2FD; 
    --text-dark: #333;
    --text-light: #f4f4f4; 
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #fff;
    overflow-x: hidden; /* Prevent horizontal scroll from animations */
    padding-top: 100px; 
}

html, body {
    overflow-x: hidden !important; /* Force hiding horizontal overflow, overriding anything else */
    width: 100% !important;       /* Ensure they are exactly 100% of the viewport width */
    position: relative;            /* Helps contain fixed elements, if any are positioned outside */
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--dark-blue);
}

/* Bootstrap's list-unstyled handles ul reset */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--dark-blue);
    margin-bottom: 1rem;
    line-height: 1.2;
}

h2.section-title {
    font-size: 2.5rem;
    margin-bottom: 2.5rem;
    position: relative;
    padding-bottom: 10px;
    display: inline-block;
    color: var(--dark-blue);
}

h2.section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.text-white .section-title {
    color: var(--text-light);
}

.text-white .section-title::after {
    background-color: var(--secondary-color);
}

/* Sections */
section {
    padding: 80px 0;
    position: relative; /* For reveal animations */
}

.bg-light-blue {
    background-color: var(--light-blue);
}

.bg-dark-blue {
    background-color: var(--dark-blue);
    color: var(--text-light);
}

/* Buttons - using Bootstrap's btn classes but with custom colors */
.primary-btn {
    background-color: var(--primary-color) !important; 
    color: #fff !important; 
    border: none;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.primary-btn:hover {
    background-color: #388E3C !important; /* Slightly darker green */
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
    color: #fff !important;
}

.secondary-btn {
    background-color: var(--secondary-color) !important; 
    color: var(--dark-blue) !important;
    border: none;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.secondary-btn:hover {
    background-color: #FFD740 !important; /* Slightly darker amber */
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
    color: var(--dark-blue) !important;
}

/* Back to Top Button */
.back-to-top-btn {
    display: none;      /* Hidden by default */
    position: fixed;    /* Fixed position on the screen */
    bottom: 20px;       
    right: 20px;        
    z-index: 99;        /* High z-index to keep it above other content */
    border: none;       
    outline: none;      /* Remove outline on focus */
    background-color: var(--primary-color); 
    color: white;       
    cursor: pointer;    /* Change cursor to pointer on hover */
    padding: 15px;      
    border-radius: 50%; /* Make it a perfect circle */
    font-size: 24px;    
    line-height: 0;     /* Adjust line height for icon centering */
    text-decoration: none; /* Remove underline for anchor tag */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Subtle shadow for depth */
    transition: background-color 0.3s ease, transform 0.3s ease, opacity 0.3s ease; /* Smooth transitions for hover and show/hide */
    opacity: 0; /* For fade-in effect */
}

.back-to-top-btn:hover {
    background-color: var(--dark-blue); /* Darker background on hover */
    transform: scale(1.1); /* Slightly enlarge on hover */
}

/* Mobile adjustments for the button */
@media (max-width: 767.98px) {
    .back-to-top-btn {
        bottom: 15px;
        right: 15px;
        padding: 12px;
        font-size: 20px;
    }
}

/* Header Navbar Customization */
.fixed-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/*Styles for the fixed header banner */
header.fixed-top {
    background-color: #fff; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1030; 
    padding: 10px 0; 
    left: 0;      
    right: 0;     
    width: 100% !important;
}

/* Mobile Menu Toggle Button (Initially hidden by default, visible on mobile) */
.menu-toggle {
    display: none; /* Hidden by default (desktop) */
    border: none;
    background-color: transparent;
    padding: 0.25rem 0.75rem;
    font-size: 1.25rem;
    line-height: 1;
    border-radius: 0.25rem;
    transition: box-shadow 0.15s ease-in-out;
}

.navbar-toggler-icon {
    display: inline-block;
    width: 1.5em;
    height: 1.5em;
    vertical-align: middle;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%234CAF50' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100%;
}

/* Base style for the collapsible navbar content */
.navbar-collapse {
    transition: height 0.35s ease;
}

/* --- DESKTOP NAVIGATION STYLES (Applies to screens 992px and wider) --- */
@media (min-width: 992px) { /* Bootstrap's 'lg' breakpoint start */
    header nav { /* Targets the <nav id="navbarNav"> */
        display: block !important; /* Ensure nav is visible and acts as a block */
        position: static !important; /* Remove absolute positioning */
        width: auto !important; /* Remove 100% width */
        background-color: transparent !important; 
        box-shadow: none !important; /* No box shadow on desktop */
        padding: 0 !important;
    }

    header nav ul.navbar-nav { /* Targets the <ul class="navbar-nav"> */
        flex-direction: row !important; /* Force horizontal layout */
        flex-wrap: nowrap !important; /* Prevent wrapping */
        justify-content: flex-end !important; /* Align to the right */
        align-items: center !important;
        width: auto !important; /* Allow content to dictate width */
    }

    header nav ul li { /* Targets the <li class="nav-item"> */
        margin-left: 20px !important; /* Space between navigation items */
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        width: auto !important;
    }

    header nav ul li a { /* Targets the <a class="nav-link"> */
        color: #212770 !important;
        font-size: 1.1rem !important;
        padding: 5px 0 !important;
        display: inline-block !important; 
    }

    header nav ul li a::after {
        left: 0 !important; /* Resets underline position */
        transform: none !important; /* Removes mobile transform */
        background-color: var(--primary-color) !important; /* Default desktop underline color */
    }

    .menu-toggle {
        display: none !important; /* Explicitly hide hamburger on desktop */
    }
}

/* General Desktop Navigation (Applies below 992px too, overridden by mobile media query) */
header nav ul { /* Targets the <ul class="navbar-nav"> */
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex; /* Horizontal display on desktop */
    justify-content: flex-end;
    align-items: center;
    flex-wrap: nowrap; /* Prevent wrapping on desktop */
}

header nav ul li { /* Targets the <li class="nav-item"> */
    margin-left: 20px; /* Space between navigation items on desktop */
}

header nav ul li a { /* Targets the <a class="nav-link"> */
    color: #212770;
    font-size: 1.1rem;
    font-family: var(--font-heading);
    padding: 5px 0; /* Vertical padding */
    position: relative;
    text-decoration: none;
    transition: color 0.3s ease;
}

header nav ul li a:hover {
    color: var(--secondary-color); /* Hover color for nav links */
}

/* Nav link underline effect (from your original CSS) */
header nav ul li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

header nav ul li a:hover::after,
header nav ul li a.active::after {
    width: 100%;
}


/* Header Logo and Text Combination Styling */
.navbar-brand-neo {
    padding: 0;
    margin: 0;
    text-decoration: none;
}

.logo-image {
    height: 80px; 
    width: auto; /* Maintains the image's aspect ratio */
    vertical-align: middle;
}

.site-logo-text-beside-logo {
    font-family: 'Merriweather', serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: #212770;
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
    text-transform: uppercase;
}


/* Responsive adjustments for combined logo and text on smaller screens */
@media (max-width: 768px) {
    .logo-image {
        height: 50px; /* Smaller logo height on tablets/medium screens */
    }
    .site-logo-text-beside-logo {
        font-size: 1.8rem; /* Smaller company name text on tablets/medium screens */
    }
}

@media (max-width: 480px) {
    .logo-image {
        height: 50px; /* Even smaller logo height on small mobile screens */
    }
    .site-logo-text-beside-logo {
        font-size: 1.3rem; /* Even smaller company name text on small mobile screens */
    }
}

/* Hero Sections */
#hero-neo {
    background: linear-gradient(rgba(26, 35, 126, 0.7), rgba(26, 35, 126, 0.7)), url('../images/hero-agri.png') no-repeat center center/cover;
    min-height: 70vh;
    background-attachment: fixed; /* Parallax effect */
    padding-top: 100px;
}

#hero-neo h2 {
    font-size: 3.8rem;
    color: #fff;
    line-height: 1.1;
}

#hero-neo p {
    font-size: 1.3rem;
    opacity: 0.9;
}

/* General Page Hero Section */
.page-hero-neo {
    background: linear-gradient(rgba(26, 35, 126, 0.8), rgba(26, 35, 126, 0.8)), url('../images/page-hero-bg.jpg') no-repeat center center/cover;
    min-height: 40vh; /* Shorter for sub-pages */
    padding: 120px 20px 80px;
    position: relative;
    background-attachment: fixed; /* Parallax effect */
    padding-top: 100px;
}

.page-hero-neo h2 {
    font-size: 3.5rem;
    color: #fff;
}

.page-hero-neo .lead-text {
    font-size: 1.25rem;
    opacity: 0.9;
}


/* Intro Mission Section */
#intro-mission .lead {
    font-size: 1.4rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-dark);
}

/* Custom Card Styles (Bootstrap's card provides base, these add to it) */
.feature-card-neo, .value-item-neo, .product-item-neo, .service-card-container .card {
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    border-radius: 8px;
}

.feature-card-neo:hover, .value-item-neo:hover, .product-item-neo:hover, .service-card-container .card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.feature-card-neo img, .value-item-neo img {
    height: 70px;
    margin-bottom: 20px;
    display: inline-block;
}

.feature-card-neo h4 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.value-item-neo h4 {
    color: var(--accent-color);
}

.product-item-neo img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    border-top-left-radius: 8px; /* Matches card radius */
    border-top-right-radius: 8px;
}

.product-item-neo h4 {
    font-size: 1.4rem;
    color: var(--primary-color);
}

.product-item-neo p {
    font-size: 0.95rem;
    color: #666;
}

.col-image img { /* Targets images in these layout columns */
    border-radius: 8px;
    box-shadow: var(--box-shadow);
}

.col-text h3 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.col-text p {
    margin-bottom: 1rem;
    font-size: 1.05rem;
    line-height: 1.7;
}

/* Services Page Grid - Card Overrides */
.service-card-container {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
}

.service-card-number {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

.service-card-number span {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    font-size: 1.8rem;
    font-weight: 700;
    font-family: var(--font-heading);
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.service-card-image-wrapper {
    width: 100%;
    height: 300px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 20px;
    position: relative;
    color: white;
    border-radius: 8px; /* Match card radius */
}

/* Services Page Grid */
.services-grid-neo {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

/* Projects Highlight Section */
.projects-background-section {
    background: linear-gradient(rgba(26, 35, 126, 0.85), rgba(26, 35, 126, 0.85)), url('../images/projects-bg.jpg') no-repeat center center/cover;
    color: #fff;
    background-attachment: fixed; /* Parallax effect */
}

.projects-background-section p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 15px;
    opacity: 0.9;
}
.projects-background-section p strong {
    color: var(--secondary-color);
}

/* Contact Page Sections */
.contact-info-list-neo p {
    display: flex;
    align-items: flex-start; /* Align text to top if icon is taller */
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.contact-info-list-neo p img {
    height: 24px;
    width: 24px;
    margin-right: 15px;
    flex-shrink: 0; /* Prevent icon from shrinking */
    margin-top: 4px; /* Adjusts vertical alignment with text */
}

/* Contact Form */
.contact-form-neo {
    max-width: 700px;
    margin: 40px auto; /* Centered on larger screens */
    padding: 40px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
}

.contact-form-neo label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark-blue);
}

/* Google Map Container */
.map-container {
    height: 450px;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
}
.map-container iframe {
    width: 100%;
    height: 100%;
}

/* Footer Customization */
.footer-grid h3 {
    color: var(--text-light); 
    font-size: 1.3rem;
}

.footer-col p,
.footer-col ul li {
    color: var(--text-light); /*full white for better visibility */
}

.footer-col a {
    color: var(--text-light); 
}

.footer-col a:hover {
    color: var(--secondary-color);
}

.social-icons img {
    height: 30px;
    width: 30px;
    transition: transform 0.3s ease;
}

.social-icons img:hover {
    transform: scale(1.1);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    margin-top: 20px;
    color: var(--text-light); 
}

/* Animations (Reveal Effect) */
.reveal-bottom, .reveal-left, .reveal-right {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal-left {
    transform: translateX(-20px);
}

.reveal-right {
    transform: translateX(20px);
}

.reveal-bottom.active, .reveal-left.active, .reveal-right.active {
    opacity: 1;
    transform: translateY(0) translateX(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; } /* Added for services page */
.delay-6 { transition-delay: 0.6s; }


/* Mobile Responsiveness for Navbar (Using Bootstrap's 'lg' breakpoint for collapse) */
@media (max-width: 991.98px) { /* This breakpoint (lg) is where Bootstrap's navbars typically collapse */
    .fixed-top .container {
        flex-wrap: nowrap; /* Keep logo and toggler on one line */
    }

    /* Show the hamburger toggle button */
    .menu-toggle {
        display: block !important; /* Explicitly show on mobile */
    }

    /* Style for the collapsed mobile menu */
    .navbar-collapse {
        position: absolute; /* Position it below the header */
        top: 100%; /* Ensures it starts right below the fixed header */
        left: 0;
        width: 100%;
        background-color: var(--dark-blue); /* Dark background for mobile menu */
        box-shadow: 0 5px 15px rgba(0,0,0,0.2);
        padding: 15px 0; 
        z-index: 1000; /* Ensure it appears above other content */
        text-align: center;
    }

    /* Override Bootstrap's default collapsing behavior if needed) */
    .navbar-collapse.collapsing {
        height: 0 !important;
        overflow: hidden;
    }

    .navbar-collapse.show {
        height: auto;
        max-height: calc(100vh - 70px); /* Adjust max-height based on your header's actual height */
        overflow-y: auto; /* Enable scrolling if menu content is too long */
    }

    /* Mobile Navigation List Styling */
    header nav ul.navbar-nav { /* Target the ul with Bootstrap's navbar-nav class */
        flex-direction: column !important; /* Force vertical layout */
        width: 100%;
        align-items: center; /* Center links horizontally within the menu */
    }

    header nav ul.navbar-nav li { /* Target li with Bootstrap's nav-item class */
        margin: 10px 0 !important; /* More vertical spacing for mobile links */
        width: 100%; /* Make list item full width */
    }

    header nav ul.navbar-nav li a { /* Target a with Bootstrap's nav-link class */
        font-size: 1.1rem !important; /* Adjust mobile nav link size */
        padding: 10px 0 !important;
        display: block !important; /* Make links block to fill the list item width */
        color: var(--text-light) !important; 
    }

    header nav ul.navbar-nav li a:hover {
        background-color: rgba(255, 255, 255, 0.1);
        color: var(--secondary-color);
    }

    header nav ul.navbar-nav li a::after { /* Adjust underline for mobile */
        left: 50%;
        transform: translateX(-50%);
        background-color: var(--secondary-color); /* Amber underline for mobile menu links */
    }

    /* Hide the non-expanded navbar (Bootstrap handles this, but explicit is fine) */
    .navbar-collapse:not(.show) {
        display: none !important;
    }
}


/* Existing Mobile Responsiveness */
@media (max-width: 767.98px) { /* Bootstrap's 'md' breakpoint is 768px */
    body {
        padding-top: 70px;
    }

    .navbar-nav .nav-link { 
        text-align: center;
        padding: 10px 0;
    }

    header nav ul li a::after { /* Adjust underline for mobile */
        left: 50%;
        transform: translateX(-50%);
    }

     #hero-neo, .page-hero-neo {
        min-height: 50vh;
        padding-top: 90px;
        padding-bottom: 50px; 
        /*background-attachment: scroll !important; Uncomment this line if you want the hero-agri photo to show in mobile devices*/
    }

    #hero-neo h2 {
        font-size: 2.5rem;
    }

    .page-hero-neo h2 {
        font-size: 2.2rem;
    }

    h2.section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    /* Footer adjustments for mobile */
    .footer-col {
       display: flex !important;           
        flex-direction: column;            
        align-items: center;               
        justify-content: center;           
        text-align: initial;              
        
        /* For safety against Bootstrap defaults */
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: auto !important;
        margin-right: auto !important;
        float: none !important;
        width: 100% !important;
    }
    
   .social-icons {
        display: inline-flex; 
        justify-content: center;
       
    }

    .contact-info-list-neo p {
        justify-content: center; /* Center icons and text */
        text-align: left; /* Align text within its container */
    }
}

@media (max-width: 575.98px) { /* Bootstrap's 'sm' breakpoint is 576px */
    #hero-neo h2 {
        font-size: 2rem;
    }

    #hero-neo p {
        font-size: 1rem;
    }

    .page-hero-neo h2 {
        font-size: 1.8rem;
    }

    .btn {
        font-size: 0.9rem;
        padding: 10px 20px;
    }

    .contact-form-neo {
        padding: 25px; /* Reduce padding on smaller screens */
        margin: 20px auto; /* Adjust margin */
    }

    .map-container {
        height: 300px; /* Shorter map on very small screens */
    }
}

/* Project List Section Styling */
.project-list-item-neo {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center; /* Vertically align number and text */
    margin-bottom: 25px; /* Space between items */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-list-item-neo:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.project-list-item-neo:last-child {
    margin-bottom: 0; /* No margin after the last item */
}

.project-number-circle {
    min-width: 60px; /* Fixed width for the circle */
    height: 60px; /* Fixed height for the circle */
    background-color: var(--primary-color); /* Green background, as seen in Capture3.jpg */
    border-radius: 20%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font-heading);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    flex-shrink: 0; /* Prevent the circle from shrinking */
}

.project-list-item-neo h3 {
    color: var(--dark-blue);
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.project-list-item-neo p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-dark);
    margin-bottom: 0; /* Removes default paragraph margin */
}

/* Responsive adjustments for Project List */
@media (max-width: 768px) {
    .project-list-item-neo {
        flex-direction: column; /* Stack number and text vertically */
        text-align: center;
        align-items: center;
        padding: 20px; /* Adjust padding for smaller screens */
    }
    .project-number-circle {
        margin-bottom: 20px; /* Space between number and stacked text */
        margin-right: 0 !important; /* Override Bootstrap me-4 */
    }
    .project-list-item-neo h3 {
        font-size: 1.5rem;
    }
    .project-list-item-neo p {
        font-size: 1.0rem;
    }
}

