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

/* Scroll to top */
html {
  scroll-behavior: smooth; /* enables smooth scroll */
}

body {
    font-family: 'Arial', 'Helvetica', sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation Styles */
.navbar {
    background-color: #e9eee7;
    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    height: 50px;
    transition: transform 0.3s ease;
}

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

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
}

.nav-item {
    margin-left: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #4a7c59;
}

/* Mobile Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
}

:root{
  --scroll-size: 56px;    /* button size for touch */
  --scroll-gap: 16px;     /* distance from screen edges */
  --scroll-bg: #1f5b3a;   /* background color */
  --scroll-fg: #fff;      /* text/icon color */
  --scroll-shadow: 0 6px 18px rgba(0,0,0,0.2);
}

.scroll-top {
  position: fixed;
  right: var(--scroll-gap);    /* moved to right side */
  bottom: var(--scroll-gap);
  width: var(--scroll-size);
  height: var(--scroll-size);
  border-radius: 14px;
  background: var(--scroll-bg);
  color: var(--scroll-fg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--scroll-shadow);
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: bold;
  opacity: 0.6; /* less opacity */
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.2s ease;
}

/* Hover/tap feedback */
.scroll-top:hover,
.scroll-top:active {
  opacity: 0.85;
  transform: scale(0.96);
}

/* Optional: hide on desktop */
@media (min-width: 900px) {
  .scroll-top {
    display: none;
  }
}

/* Hero Section - Carousel */
.hero {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    margin-top: 70px;
}

.carousel-container {
    position: relative;
    height: 100vh;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.hero-logo {
    width: 150px;
    height: auto;
    margin-bottom: 2rem;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
    transition: transform 0.3s ease;
}

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

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

.hero p {
    font-size: 1.2rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

/* Carousel Navigation */
.carousel-nav {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 3;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background-color: white;
    transform: scale(1.2);
}

.carousel-dot:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

/* Carousel Arrows */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.0);
    border: none;
    color: rgb(255, 255, 255);
    font-size: 2rem;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 3;
    border-radius: 5px;
}

.carousel-arrow:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-50%) scale(1.1);
}

.carousel-arrow.prev {
    left: 20px;
}

.carousel-arrow.next {
    right: 20px;
}

/* Background image for all slides */
.slide-1 { 
    background-image: url('images/Hero_bg-OpenFieldSteviafarm.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}
.slide-2 { 
    background-image: url('images/Hero_bg-GrowpipesRack.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}
.slide-3 { 
    background-image: url('images/Hero_bg-Hydroponics.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}
.slide-4 { 
    background-image: url('images/Hero_bg-RotaryAeroponics.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Program Section */
.program {
    background-color: #e9eee7;
    padding: 5rem 0;
}

.program h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

.program-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
    align-items: center;
}

.program-row.reverse {
    grid-template-columns: 1fr 1fr;
}

.program-row.reverse .program-image {
    order: -1;
}

.program-text {
    text-align: left;
}

.program-text h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #4a7c59;
}

.program-text p {
    font-size: 1rem;
    line-height: 1.8;
    color: #555;
}

.program-image {
    text-align: center;
}

.program-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.program-image img:hover {
    transform: scale(1.02);
}

/* Consortium Section */
.consortium {
    background-color: #e1e8de;
    padding: 5rem 0;
}

.consortium h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.consortium-intro {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 3rem;
    color: #555;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.consortium-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.consortium-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 200px;
}

.consortium-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

.consortium-logo {
    width: 150px;
    height: 150px;
    object-fit: contain;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.consortium-logo:hover {
    transform: scale(1.1);
}

.consortium-content {
    flex: 1;
}

.consortium-content h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #4a7c59;
    text-decoration: none;
}

.consortium-content h3 a {
    color: #4a7c59;
    text-decoration: none;
    transition: color 0.3s ease;
}

.consortium-content h3 a:hover {
    color: #2d5233;
}

.consortium-content p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #666;
}

/* Community Section */
.community {
    background-color: white;
    padding: 4rem 0;
    text-align: center;
}

.community h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.community p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #555;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.social-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 10px;
}

.social-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.social-icon:hover {
    transform: scale(1.1);
}

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

/* Contact Section */
.contact {
    background-color: #e9eee7;
    padding: 5rem 0;
}

.contact h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4a7c59;
}

.form-group textarea {
    height: 120px;
    resize: vertical;
}

.submit-btn {
    background-color: #4a7c59;
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
    width: 100%;
}

.submit-btn:hover {
    background-color: #2d5233;
}

/* Footer */
.footer {
    background-color: #111828;
    color: white;
    padding: 3rem 0 2rem;
    text-align: center;
}

.footer-logo {
    width: 100px;
    height: auto;
    margin-bottom: 2rem;
}

.footer-links {
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    margin: 0 1rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.copyright {
    color: #888;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: #e9eee7;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 0;
        width: 100%;
    }

    .nav-link {
        display: block;
        padding: 1rem 2rem;
        width: 100%;
        text-align: center;
        transition: background-color 0.3s ease, color 0.3s ease;
    }

    .nav-link:hover {
        background-color: rgba(74, 124, 89, 0.1);
        color: #4a7c59;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-logo {
        width: 100px;
        height: auto;
    }

    .program-row,
    .program-row.reverse {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .program-row.reverse .program-image {
        order: 0;
    }

    .consortium-grid {
        grid-template-columns: 1fr;
    }

    .consortium-card {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .consortium-logo {
        width: 150px;
        height: 150px;
        align-self: center;
        margin-bottom: 1rem;
    }

    .consortium-content {
        text-align: center;
    }

    .social-icons {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }

    .social-icon {
        width: 40px;
        height: 40px;
    }
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #2d2d2d;
    color: white;
    padding: 1rem;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
    z-index: 10000;
    display: none;
}

.cookie-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    gap: 2rem;
}

.cookie-text h4 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.cookie-text p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #ccc;
}

.cookie-buttons {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cookie-decline {
    background-color: transparent;
    color: #ccc;
    border: 1px solid #555;
}

.cookie-decline:hover {
    background-color: #555;
    color: white;
}

.cookie-settings {
    background-color: #4a7c59;
    color: white;
}

.cookie-settings:hover {
    background-color: #2d5233;
}

.cookie-accept {
    background-color: #007bff;
    color: white;
}

.cookie-accept:hover {
    background-color: #0056b3;
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .cookie-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
}