/* =============================================
   CSS Variables & Reset
   ============================================= */
:root {
    --green-primary: #2D5016;
    --green-secondary: #4A7C2E;
    --green-hover: #1e3a0e;
    --brown: #8B6F47;
    --white: #FFFFFF;
    --black: #1A1A1A;
    --gray-light: #F5F5F5;
    --gray-medium: #E0E0E0;
    --gray-text: #555555;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s ease-in-out;
    --header-height: 90px;
    --font-family: 'Heebo', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    color: var(--black);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

ul {
    list-style: none;
}

/* =============================================
   Typography
   ============================================= */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--green-primary);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.125rem; }

p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--black);
}

/* =============================================
   Layout
   ============================================= */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 60px 0;
}

/* =============================================
   Buttons
   ============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 700;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    min-height: 48px;
    text-align: center;
}

.btn-primary {
    background-color: var(--green-secondary);
    color: var(--white);
    border-color: var(--green-secondary);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--green-hover);
    border-color: var(--green-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-white {
    background-color: var(--white);
    color: var(--green-primary);
    border-color: var(--white);
}

.btn-white:hover,
.btn-white:focus {
    background-color: var(--gray-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    color: var(--green-secondary);
    border-color: var(--green-secondary);
}

.btn-outline:hover,
.btn-outline:focus {
    background-color: var(--green-secondary);
    color: var(--white);
}

.btn-lg {
    padding: 16px 40px;
    font-size: 1.125rem;
}

/* =============================================
   Header
   ============================================= */
.header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    height: var(--header-height);
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

.header.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    border-bottom-color: var(--gray-medium);
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    z-index: 1001;
}

.logo-img {
    height: 70px;
    width: auto;
}

/* Home page: enlarge logo by 150% (override header height to fit) */
.home {
    --header-height: 130px;
}

.home .logo-img {
    height: 105px;
}

/* Home page: scale nav font to balance the larger logo */
.home .nav-link,
.home .nav-toggle {
    font-size: 1.125rem;
}

.home .nav-sublink {
    font-size: 1.0625rem;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    font-size: 0.9375rem;
    font-weight: 400;
    color: var(--black);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--green-secondary);
    background-color: rgba(74, 124, 46, 0.08);
}

.nav-link.active {
    font-weight: 700;
}

/* Dropdown navigation */
.nav-item.has-dropdown {
    position: relative;
}

.nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 0;
    cursor: pointer;
    color: var(--black);
    font-family: inherit;
}

.nav-submenu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background-color: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--radius-md, 10px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    padding: 6px;
    list-style: none;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
    z-index: 1100;
}

.nav-item.has-dropdown.open .nav-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-sublink {
    display: block;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--black);
    font-size: 0.9375rem;
    text-decoration: none;
    white-space: nowrap;
    transition: var(--transition);
}

.nav-sublink:hover,
.nav-sublink:focus-visible {
    background-color: rgba(74, 124, 46, 0.08);
    color: var(--green-secondary);
}

/* Offset anchor scroll for fixed header */
#kenes-1,
#kenes-2,
#webinars,
#articles,
#abstracts,
#links {
    scroll-margin-top: 100px;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 48px;
    height: 48px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    gap: 6px;
}

.hamburger-line {
    display: block;
    width: 28px;
    height: 2px;
    background-color: var(--black);
    border-radius: 2px;
    transition: var(--transition);
}

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

.hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

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

/* =============================================
   Hero Section
   ============================================= */
.hero {
    position: relative;
    width: 100%;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 60%;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 120px 20px 60px;
    max-width: 800px;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--white);
    margin-bottom: 24px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.125rem;
    font-weight: 400;
    color: var(--white);
    margin-bottom: 36px;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

.hero-text-bg {
    background-color: transparent;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.hero-scroll-indicator span {
    display: block;
    width: 28px;
    height: 44px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 14px;
    position: relative;
}

.hero-scroll-indicator span::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 2px;
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
    50% { transform: translateX(-50%) translateY(12px); opacity: 0.3; }
}

/* =============================================
   Section Title
   ============================================= */
.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 900;
    color: var(--green-primary);
    margin-bottom: 48px;
    position: relative;
}

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

/* =============================================
   Cards
   ============================================= */
.card {
    background-color: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 32px 24px;
    transition: var(--transition);
}

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

/* =============================================
   Goals Section
   ============================================= */
.goals-section {
    background-color: var(--gray-light);
}

.goals-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.goal-card {
    text-align: center;
}

.goal-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    color: var(--green-secondary);
}

.goal-icon svg {
    width: 100%;
    height: 100%;
}

.goal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--green-primary);
    margin-bottom: 12px;
}

.goal-text {
    font-size: 0.9375rem;
    color: var(--gray-text);
    line-height: 1.7;
}

/* =============================================
   Activities Section
   ============================================= */
.activities-section {
    background-color: var(--white);
}

.activities-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.activity-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 32px 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-medium);
    transition: var(--transition);
}

.activity-item:hover {
    border-color: var(--green-secondary);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.activity-icon {
    width: 48px;
    height: 48px;
    color: var(--green-secondary);
    margin-bottom: 16px;
}

.activity-icon svg {
    width: 100%;
    height: 100%;
}

.activity-item h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--green-primary);
    margin-bottom: 8px;
}

.activity-item p {
    font-size: 0.9375rem;
    color: var(--gray-text);
}

/* =============================================
   CTA Section
   ============================================= */
.cta-section {
    background-color: var(--green-primary);
    text-align: center;
    padding: 80px 0;
}

.cta-content {
    max-width: 700px;
}

.cta-title {
    color: var(--white);
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 16px;
}

.cta-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
    font-weight: 300;
    margin-bottom: 32px;
    line-height: 1.8;
}

/* =============================================
   Infinite Marquee Gallery
   ============================================= */

/*  How it works:
    - 8 original images (Set A) + 8 clones (Set B) = 16 total
    - Track uses display:flex + width:max-content
    - Animation slides exactly -50% (= one full set) for seamless loop
    - direction:ltr on .marquee overrides page RTL so track starts at left edge
    - will-change:transform → GPU-composited, no repaints                */

:root {
    --mq-w: 320px;       /* slide width — overridden per breakpoint */
    --mq-h: 240px;       /* slide height                            */
    --mq-gap: 16px;      /* gap between slides                      */
    --mq-speed: 45s;     /* full-loop duration                      */
}

.marquee-section {
    background-color: var(--gray-light);
    overflow: hidden;
    padding-bottom: 60px;
}

/* Outer mask — hides overflow, adds soft fade edges */
.marquee {
    position: relative;
    width: 100%;
    overflow: hidden;
    direction: ltr;   /* critical: override RTL so track starts from left edge */
}

.marquee::before,
.marquee::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 48px;
    z-index: 3;
    pointer-events: none;
}
.marquee::before {
    left: 0;
    background: linear-gradient(to right, var(--gray-light), transparent);
}
.marquee::after {
    right: 0;
    background: linear-gradient(to left, var(--gray-light), transparent);
}

/* The sliding track */
.marquee-track {
    display: flex;
    gap: var(--mq-gap);
    width: max-content;
    animation: marqueeScroll var(--mq-speed) linear infinite;
    will-change: transform;
    direction: ltr;    /* keep left-to-right flow regardless of page RTL */
}

.marquee-track:hover {
    animation-play-state: paused;
}

/* Each image card */
.marquee-item {
    flex: 0 0 var(--mq-w);
    width: var(--mq-w);
    height: var(--mq-h);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.marquee-item:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-md);
}

.marquee-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* The keyframe: slide left by exactly half (= one full set of 8) */
@keyframes marqueeScroll {
    from { transform: translateX(0); }
    to   { transform: translateX(calc(-50% - var(--mq-gap) / 2)); }
}

/* =============================================
   Lightbox
   ============================================= */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox[hidden] {
    display: none;
}

.lightbox-close {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
    z-index: 10000;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: var(--white);
    font-size: 1.75rem;
    cursor: pointer;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
    z-index: 10000;
}

.lightbox-prev {
    right: 16px;
}

.lightbox-next {
    left: 16px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-content {
    max-width: 92vw;
    max-height: 88vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-img {
    max-width: 100%;
    max-height: 88vh;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    font-family: var(--font-family);
    z-index: 10000;
}

/* =============================================
   Footer
   ============================================= */
.footer {
    background-color: var(--green-primary);
    color: var(--white);
    padding-top: 60px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-logo {
    height: 70px;
    width: auto;
    margin-bottom: 16px;
}

.footer-col h4 {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 16px;
    position: relative;
}

.footer-col h4::after {
    content: '';
    display: block;
    width: 30px;
    height: 2px;
    background-color: var(--green-secondary);
    margin-top: 8px;
    border-radius: 1px;
}

.footer-col p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9375rem;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9375rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--white);
    padding-right: 4px;
}

.footer-col ul li a svg {
    flex-shrink: 0;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding: 20px 0;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

/* =============================================
   Accessibility
   ============================================= */
:focus-visible {
    outline: 3px solid var(--green-secondary);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -100%;
    right: 0;
    background: var(--green-primary);
    color: var(--white);
    padding: 12px 24px;
    z-index: 10000;
    font-weight: 700;
}

.skip-link:focus {
    top: 0;
}
