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

:root {
    --primary-green: #25413d;  /* Original site green RGB(37, 65, 61) */
    --secondary-green: #2d5548;  /* Slightly lighter for hover states */
    --nav-green: #25413d;  /* Same green for navigation bar */
    --light-bg: #f5f5f0;
    --white: #ffffff;
    --text-dark: #333333;
    --text-light: #666666;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--light-bg);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

/* Add proper spacing for content headings */
.content-container h2 {
    margin-top: 2rem;
}

a {
    color: var(--primary-green);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-green);
}

/* Header and Navigation */
.site-header {
    background-color: var(--nav-green);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s ease;
}

.site-header.scrolled {
    background-color: #000000;
}

/* Keep mobile menu background consistent */
@media (max-width: 768px) {
    .nav-wrapper {
        background-color: var(--nav-green) !important;
    }
}

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

.site-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
    white-space: nowrap;
    padding: 0 0 8px 0;  /* Visual adjustment to align with nav menu items */
}

.site-logo:hover {
    color: var(--white);
    opacity: 0.9;
}

.nav-wrapper {
    display: flex;
    align-items: center;
}

.nav-menu {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60px;
    flex-wrap: nowrap;  /* Prevent wrapping */
    margin: 0;
    padding: 0;
}

.nav-item {
    margin: 0 1.5rem;
}

.nav-link {
    color: var(--white);
    font-weight: 600;
    padding: 0.5rem 0;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
    opacity: 0.9;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--white);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    position: relative;
    z-index: 1001;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--white);
    margin: 5px 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

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

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

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

/* Mobile Overlay */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 999;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

.current-language {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--primary-green);
    color: var(--white);
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.current-language:hover {
    background-color: var(--secondary-green);
}

.language-list {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background-color: var(--white);
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    min-width: 120px;
}

.language-switcher:hover .language-list {
    opacity: 1;
    visibility: visible;
}

.language-list li {
    margin: 0;
}

.language-link {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-dark);
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.language-link:hover {
    background-color: var(--light-bg);
    color: var(--primary-green);
}

/* Hero Section - Original full-width style (kept for gallery) */
.hero-image {
    position: relative;
    height: 400px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-overlay {
    background-color: rgba(37, 65, 61, 0.9);  /* Using exact RGB values with opacity */
    color: var(--white);
    padding: 3rem;
    text-align: center;
    border-radius: 8px;
}

/* New contained layout styles */
.hero-section {
    background-color: var(--primary-green);
    padding: 2rem 0;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    gap: 3rem;
}

.hero-image-contained {
    flex: 0 0 480px;
    max-width: 100%;
}

.hero-image-contained img {
    width: 100%;
    height: auto;
    display: block;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-radius: 8px;
}

.hero-content {
    flex: 1;
    padding: 2rem;
}

.hero-title-box {
    background-color: var(--primary-green);
    color: var(--white);
    padding: 3rem;
    text-align: center;
    border-radius: 8px;
}

/* Page with contained image */
.page-with-image {
    background-color: var(--primary-green);
    padding: 2rem 0;
}

.page-image-container {
    max-width: 1200px;
    height: 400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-image {
    flex: 1;
    height: 100%;
    margin-bottom: 0;
    margin-right: 3rem;
    overflow: hidden;
    position: relative;
}

.page-image img {
    width: 100%;
    height: 100%;
    display: block;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    object-fit: cover;
    object-position: center;
    border-radius: 8px;
}

.site-title {
    font-size: 3rem;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.page-title {
    font-size: 3rem;
    color: var(--white);
    margin-bottom: 0.5rem;
}

/* Override for pages with contained images */
.page-with-image .page-title {
    color: var(--white);
    flex: 2;
    text-align: center;
}

.site-subtitle {
    font-size: 1.25rem;
    font-weight: 400;
}

/* Content */
.content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.main-content {
    min-height: calc(100vh - 60px - 120px);
}

/* Green highlight box for important text */
.highlight-box {
    background-color: white;
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 8px;
}

.highlight-box p {
    color: #2d5016;
    font-size: 1.1rem;
    line-height: 1.8;
    margin: 0;
}

/* PDF display styles */
.pdf-container {
    margin: 2rem 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.5rem;
    background-color: #fafafa;
}

.pdf-container h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--primary-green);
}

.pdf-viewer {
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: white;
}

.pdf-download-link {
    margin-top: 1rem;
    text-align: center;
}

.pdf-download-link a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--primary-green);
    color: white;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.pdf-download-link a:hover {
    background-color: var(--secondary-green);
}

.pdf-link {
    display: inline-block;
    margin: 0.5rem 0;
}

.page-header {
    background-color: var(--primary-green);
    color: var(--white);
    padding: 3rem 2rem;
    text-align: center;
}

.page-header .page-title {
    margin-bottom: 0;
}

/* Homepage specific */
.homepage h2 {
    color: var(--primary-green);
    font-size: 2rem;
    margin-top: 0; /* We only have one h2 element and it's displayed in a box with proper padding -> remove top margin */
    margin-bottom: 1rem;
}

/* Homepage featured image */
.homepage-featured-image {
    width: 100%;
    /*max-width: 1000px;*/ /* Let it span over the full width of its container */
    height: auto;
    margin: 0 auto;
    display: block;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-radius: 8px;
}

.image-caption {
    text-align: center;
    margin-top: 1rem;
    font-style: italic;
    color: #4a5d4a;
}

.quote-section {
    background-color: var(--white);
    padding: 2rem;
    margin: 3rem 0;
    border-left: 4px solid var(--primary-green);
}

.quote-section blockquote {
    font-style: italic;
    font-size: 1.25rem;
    color: var(--text-dark);
}

.quote-section cite {
    display: block;
    text-align: right;
    margin-top: 1rem;
    color: var(--text-light);
    font-style: normal;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.gallery-item {
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    aspect-ratio: 1/1;
}

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

/* Footer */
.site-footer {
    background-color: var(--primary-green);
    color: var(--white);
    text-align: center;
    padding: 2rem;
}

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

.site-footer a {
    color: var(--white);
    text-decoration: underline;
}

.site-footer a:hover {
    color: #ddd;
}

/* Lists */
ul, ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        padding: 1rem;
    }
    
    /* Show hamburger on mobile */
    .hamburger {
        display: block;
    }
    
    /* Mobile navigation wrapper */
    .nav-wrapper {
        position: fixed;
        top: 60px;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: calc(100vh - 60px);
        background-color: var(--nav-green);
        transition: right 0.3s ease;
        overflow-y: auto;
        z-index: 1000;
    }
    
    .nav-wrapper.mobile-open {
        right: 0;
    }
    
    .nav-menu {
        flex-direction: column;
        padding: 2rem 0;
        width: 100%;
        align-items: stretch;
    }
    
    .nav-item {
        margin: 0;
        width: 100%;
    }
    
    .nav-link {
        display: block;
        padding: 1rem 2rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    
    .site-title,
    .page-title {
        font-size: 2rem;
    }
    
    .hero-overlay {
        padding: 2rem;
    }
    
    .content-container {
        padding: 2rem 1rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .gallery-item {
        aspect-ratio: 1/1;
    }
    
    .homepage-featured-image {
        max-width: 100%;
    }
    
    /* Responsive styles for new hero layouts */
    .hero-container {
        flex-direction: column;
        gap: 2rem;
    }
    
    .hero-image-contained {
        flex: 0 0 auto;
        max-width: 100%;
    }
    
    .hero-content {
        padding: 1rem;
    }
    
    .hero-title-box {
        padding: 2rem;
    }
    
    .page-image {
        max-width: 100%;
        height: 250px;  /* Smaller height on mobile */
        margin-right: 0;
        margin-bottom: 2rem;
    }
    
    .page-image-container {
        flex-direction: column;
        height: auto;  /* Auto height for mobile */
    }
    
    /* PDF responsive styles */
    .pdf-container {
        padding: 1rem;
    }
    
    .pdf-viewer {
        height: 400px !important; /* Smaller height on mobile */
    }
}

/* Footer Language Links */
.language-links {
    margin-top: 1rem;
    text-align: center;
}

.language-links .lang-link {
    color: #cccccc;  /* Light gray for default state */
    text-decoration: none;
    padding: 0 0.5rem;
    transition: color 0.3s ease;
}

.language-links .lang-link:hover {
    color: var(--white);
    text-decoration: underline;
}

.language-links .current-lang {
    font-weight: 600;
    color: var(--white);
    padding: 0 0.5rem;
}

.language-links .lang-separator {
    color: var(--medium-gray);
}

/* Opener Section - Association objectives */
/* .opener-section styles removed - no longer used */

/* Reduce top margin when objectives box is first element in content */
.content-container > .opener-objectives-box:first-child {
    margin-top: 0;
}

.opener-title {
    color: #2d5016;
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    font-family: 'Playfair Display', serif;
}

.opener-subtitle {
    color: #4a5d4a;
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 2rem;
}

.opener-objectives-box {
    background: linear-gradient(to bottom, #ffffff, #fafff5);
    padding: 2.5rem;
    border-radius: 8px;
    text-align: left;
    margin: 2rem auto;
    box-shadow: 0 4px 6px rgba(45, 80, 22, 0.1);
    border: 1px solid rgba(74, 93, 74, 0.1);
}

.opener-objectives-title {
    color: #2d5016;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.opener-objectives-title::before {
    content: "🌿";
    font-size: 1.3rem;
}

.opener-objectives-list {
    color: #333;
    line-height: 2;
    list-style-type: none;
    padding-left: 0;
    margin-left: 0;
    margin-bottom: 0;
    font-weight: normal;
    display: grid;
    gap: 1rem;
}

.opener-objectives-list li {
    padding: 1rem;
    position: relative;
    background-color: rgba(74, 93, 74, 0.03);
    border-radius: 8px;
}


.opener-objectives-list li::before {
    display: none;
}

/* Quote box styling */
.quote-box {
    text-align: center;
    margin: 3rem 0;
    padding: 2rem;
    background-color: white;
    border-radius: 8px;
}

.quote-box blockquote {
    font-style: italic;
    font-size: 1.2rem;
    color: #4a5d4a;
    margin: 0;
}

.quote-author {
    margin-top: 1rem;
    color: #666;
}

/* Responsive adjustments for objectives box */
@media (max-width: 768px) {
    /* .opener-section, .opener-title, .opener-subtitle styles removed - no longer used */
    
    .opener-objectives-box {
        padding: 1.5rem;
        margin: 1.5rem auto;
    }
    
    .opener-objectives-title {
        font-size: 1.3rem;
        flex-wrap: wrap;
    }
    
    .opener-objectives-title::before {
        font-size: 1.1rem;
    }
    
    .opener-objectives-list {
        font-size: 0.95rem;
        gap: 0.75rem;
    }
    
    .opener-objectives-list li {
        padding: 0.75rem;
    }
}
