/* === ROOT VARIABLES === */
:root {
    --main-green: #57583b;
    --accent: #d0b354;
    --beige: #fdfcf6;
    --off-white: #faf7ef;
    --white: #ffffff;
    --dark: #333333;
    --text: #111111;
    --olive-color: #656445;
}

/* === GLOBAL RESET === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Segoe UI', sans-serif;
    background-color: var(--beige);
    color: var(--text);
    line-height: 1.5;
    height: auto;
    overflow-x: hidden;
    position: relative;
}

iframe {
    border: none;
}

/* === HEADER === */

.header-container {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--main-green);
}

.site-header {
    background-color: var(--main-green);
    color: var(--white);
    justify-content: center;
    padding: 1rem;
}


.header-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--main-green);
    padding: 0.5rem 0;
    position: sticky;
    top: 70px;
}

.menu-btn {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    text-align: center;
}

.menu-btn:hover,
.menu-btn.active {
    background-color: var(--accent);
    color: var(--dark);
    border-color: var(--accent);
}

/* === TOGGLE SECTIONS === */
.toggle-section {
    padding: 1rem 1rem;
    display: none;
    position: static;
    opacity: 1;
    overflow: visible;
    width: 100vw;
    max-width: 100%;
    margin: 0 auto;
    backdrop-filter: blur(2px);
}

.toggle-section.active {
    display: block;
    padding: 2;
    opacity: 1;
    box-sizing: border-box;
}

.toggle-wrapper {
    width: 100vw;
    box-sizing: border-box;
    align-items: center;
    opacity: 1;
    transition: padding 0.4s ease, opacity 0.4s ease;
    background-color: rgba(249, 246, 237, 0.85);
    pointer-events: none;
    position: relative;
    overflow: visible;
    height: auto;
    max-height: none;
}

.toggle-wrapper.active {
    opacity: 1;
    pointer-events: auto;
    min-height: 700px;
}

.toggle-close {
    position: absolute;
    top: 0rem;
    right: 2rem;
    font-size: 2rem;
    background: transparent;
    border: none;
    color: var(--main-green);
    cursor: pointer;
    z-index: 100;
    transform-origin: center;
    transition: transform 0.3s ease-in-out;
}

.toggle-close:active {
    transform: rotate(180deg);
}

/* === DOCUMENTS LAYOUT === */
.doc-preview-layout,
.split-docs-layout,
.doc-switcher-columns {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 1rem;
    padding: 1rem 1rem;
}

.doc-button-column,
.doc-button-list,
.doc-buttons-vertical {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 85vw;
    margin: 0 auto;
}

.doc-button-list a img {
    width: 100%;
    max-width: 240px;
    height: auto;
    margin: 0 auto;
}

.doc-switch-btn,
.doc-button-list .doc-switch-btn,
.doc-button-column a {
    align-items: center;
    width: 100%;
    max-width: 280px;
    margin: 0.3rem auto;
    text-align: center;
    padding: 0.75rem 1.25rem;
    background-color: transparent;
    border: 2px solid var(--main-green);
    color: var(--main-green);
    border-radius: 6px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.doc-switch-btn:hover,
.doc-switch-btn.active {
    background-color: var(--accent);
    color: var(--dark);
    border-color: var(--accent);
}

.doc-btn,
.donate-logo-btn {
    background-color: #ffffffcc;
    border: 2px solid var(--main-green);
    padding: 1rem 1.5rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 500px;
    margin: 0.5rem auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    backdrop-filter: blur(2px);
    color: var(--dark);
    font-weight: bold;
    text-decoration: none;
    gap: 1rem;
}

.donate-logo-btn img {
    height: 40px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
    filter: grayscale(0.1) contrast(1.1) brightness(0.95);
    mix-blend-mode: multiply;
}

.doc-iframe-column {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.modal-frame {
    transform: none !important;
    margin: 0 auto;
    width: 100% !important;
    max-width: 100% !important;
    display: block;
    height: 500px;
    min-height: 500px;
    background-color: transparent;
    border-radius: 8px;
}

.modal-frame-reports {
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    max-height: 100vh !important;
    background-color: transparent;
    border: none;
    margin: 0 auto;
    display: block;
}

.modal-frame-projects {
    min-width: 110vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    max-height: 100vh !important;
    background-color: transparent;
    border: none;
    margin: 0 auto;
    display: block;
    transform: translateX(15%)
}

/* === LOADER === */
.iframe-container {
    position: relative;
    overflow-x: auto;
    width: 100%;
}

.iframe-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    height: 40px;
    width: 40px;
}

.iframe-loader::after {
    content: "";
    width: 40px;
    height: 40px;
    border: 4px solid var(--main-green);
    border-top: 4px solid transparent;
    border-radius: 50%;
    animation: spin 0.5s linear infinite;
    display: block;
    background-color: transparent;
    transform: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* === FUND SECTION === */
.fund-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: auto;
    width: 100%;
}

.fund-left {
    min-height: 320px;
    align-items: center;
    width: 100%;
    background: url('assets/SiteBackImg.png') no-repeat center center;
    background-size: cover;
    position: relative;
    overflow: hidden;
}

.fund-right {
    width: 100%;
    padding: 2rem 1rem;
    height: auto;
    text-align: center;
    background-color: var(--olive-color);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.fund-right .section-title,
.fund-right .section-subtitle,
.fund-right .section-description {
    text-align: center;
    margin: 0 auto;
    color: white;
    max-width: 600px;
}

.help-types {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 2rem 0;
}

.help-types ul {
    list-style: disc inside;
    padding-left: 0;
    margin: 0 auto;
    max-width: 280px;
    color: white;
    font-size: 1rem;
    line-height: 1.6;
}

.help-types ul.no-bullets {
    list-style: none;
    text-align: center;
}

/* === MEDIA EMBEDS === */
.media-embed-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
}

/* === CAROUSEL SECTION MOBILE === */
/* Carousel controls layout on mobile */
.carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

/* Prev / Next buttons – keep them small but aligned */
.carousel-prev,
.carousel-next {
    background-color: var(--main-green);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    line-height: 0;          /* fixes vertical misalignment */
    padding-bottom: 5px;     /* tiny tweak; adjust to taste */
}

/* Indicators row */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
}

/* Indicator dots, not default buttons */
.carousel-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--main-green);
    opacity: 0.4;
    border: none;
    padding: 0;
    cursor: pointer;
}

.carousel-indicator.active {
    opacity: 1;
    background-color: var(--accent);
}

/* Optional: nicer play/pause button on mobile */
.carousel-play-pause {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background-color: rgba(87, 88, 79, 0.9);
    color: #fff;
    margin: 1rem auto 0;             /* <- centers horizontally */
    cursor: pointer;
}

.presentation-carousel {
    padding: 1rem 0.5rem;
    margin: 1rem auto;
}

.carousel-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.carousel-container {
    height: 400px;
    border-radius: 6px;
}

.carousel-controls {
    margin-top: 1rem;
}

.carousel-prev,
.carousel-next {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
}

.carousel-indicator {
    width: 10px;
    height: 10px;
}

.carousel-play-pause {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
}

.media-item {
    width: 100%;
    max-width: 95vw;
}

.media-title {
    text-align: center;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.spotify-media-embed {
    width: 300px;
    height: 300px;
}

.youtube-media-embed {
    width: 300px;
    height: 300px;
}

/* === GOOGLE DRIVE EMBED === */
.google-drive-embed {
    display: block;
    text-align: center;
    padding: 2rem 0;
    transform: translateX(20%);
}

.google-drive-embed iframe {
    transform: translateX(-20%);
    width: 110%;
    max-width: none;
}

/* === FOOTER === */
.site-footer {
    text-align: center;
    background-color: var(--olive-color);
    color: white;
    padding: 2rem 1rem;
}

.footer-columns {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-left,
.footer-center,
.footer-right {
    text-align: center;
    align-items: center;
}

.footer-logo-wrapper,
.footer-contact {
    text-align: center;
}

.footer-logo {
    margin: 0 auto;
    max-width: 160px;
    height: auto;
}

.footer-email {
    color: var(--accent);
    font-weight: bold;
    font-size: 1rem;
    letter-spacing: 0.3px;
    text-decoration: none;
    transition: all 0.3s ease-in-out;
}

.footer-email:hover {
    color: var(--white);
    text-decoration: underline;
}

.social-icons {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
    margin: 0.5rem 0;
}

.social-icons a img {
    width: 32px;
    height: 32px;
    transition: opacity 0.3s ease, transform 0.2s ease;
}

.social-icons a img:hover {
    opacity: 0.7;
    transform: scale(1.1);
}

/* === PROJECTS SECTION === */
.projects-title {
    color: var(--main-green);
    font-size: 2rem;
    text-align: center;
    margin-top: 1rem;
}

.doc-preview-area {
    display: block;
    text-align: center;
    padding: 0;
    transform: translateX(20%);
    width: 100%;
    max-width: 100%;
}

.doc-preview-area iframe {
    max-width: none;
}

/* === UTILITY === */
.desktop-only {
    display: none;
}

.doc-links {
    list-style: none;
    padding-left: 0;
}

.doc-links li a {
    display: inline-block;
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
    padding: 0.5rem 1rem;
    margin: 0.5rem 0;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease-in-out;
}

.doc-links li a:hover {
    background-color: var(--accent);
    color: var(--dark);
    border-color: var(--accent);
}

.modal-gallery a {
    display: inline-block;
    margin: 0.5rem;
    color: var(--accent);
    text-decoration: underline;
}

.airtable-placeholder {
    background-color: rgba(255,255,255,0.1);
    padding: 1rem;
    border-radius: 6px;
    color: white;
    text-align: center;
    margin-top: 2rem;
}

.donate-options {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.donate-card img {
    height: 50px;
    object-fit: contain;
}

/* === Presentation Carousel Section === */
.presentation-carousel {
    background-color: var(--off-white);
    padding: 2rem 0;
    text-align: center;
    position: relative;
}

.carousel-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--main-green);
}

.carousel-container {
    display: flex;
    overflow: hidden;
    position: relative;
}

.carousel-slide {
    min-width: 100%;
    transition: transform 0.5s ease;
    display: none; /* Initially hide the slides using display: none */
    /* Remove visibility: hidden */
}

.carousel-slide.active {
    display: flex; /* Show active slide using display: flex */
    /* Remove visibility: visible */
    opacity: 1;
    transform: translateX(0); /* Ensure active slide is at 0 translation */
}

.carousel-slide img {
    max-width: 100%;
    border-radius: 8px;
}

.carousel-container iframe {
    width: 100%;
    height: 300px; /* Adjust height as needed */
    margin-top: 0.5rem;
}

.carousel-prev,
.carousel-next {
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--main-green);
    color: var(--white);
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 2rem;
    z-index: 10;
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}