/* ========================================
   Theme Variables
======================================== */
html {
    font-size: 13px;
    scroll-behavior: smooth;
}
:root {
    --bg: #eae6e3;
    --text: #2c2222;
    --primary: #537662;
    --secondary: #4f3d3d;
    --card: #f2f5f7;
    --border: #e0e6ed;

    --font: "Nunito", system-ui, -apple-system, sans-serif;

    --transition-speed: 0.3s;
    --transition-bounce: cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

body.dark {
    /* --bg: #6d4d34; */
    --bg: #7c929f;
    --text: #2c2222;
    --primary: #537662;
    --secondary: #4f3d3d;
    --card: #1f1f1f;
    --border: #4f3d3d;
}

img.dark {
    display: none;
}

body.dark img.light {
    display: none;
}

body.dark img.dark {
    display: inline;
}

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@500;700&display=swap');

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    transition:  color 0.3s ease; /*background 0.3s ease,*/
}

a { text-decoration: none; color: inherit; }

h1{
    text-align: center;
    padding: 0rem;
}

p{
    text-align: justify;
    font-size:1.4rem;
}

.padded_wrapper{
    padding: 0 2rem;
}

/* map */

#map_wrapper{
    height: 75vh;
    width: auto;
    padding: 1%;
}

#map { /*use wrapper for other changes like padding*/
    height: 100%;
    width: 100%;
}
@media (max-width: 650px) {
    #map_wrapper{
        height: 55vh;
    }
}

.popupCustom .leaflet-popup-tip,
.popupCustom .leaflet-popup-content-wrapper {
    background: var(--bg);
    color: var(--text);
}

.download_wrapper {
    padding: 1rem 0;
    display: flex;
    justify-content: center;
    text-align: center;
}

.download {
    text-align: center;
    color: #e1cbcb;
    background-color: #6d4d34;
    border: #6d4d34;
}

.download p{
    padding: 0 1rem;
    font-size: medium;
}

.download:hover{
    cursor: pointer;
    background-color: #8d6445;
}

/* monopati */

.about-us-pc{
    display: grid;
    padding: 2rem;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    justify-items: center;
    align-items: center;
    margin: 0 auto;
    font-weight:500;
}
.about-us-pc img{
    max-width: 80%;
    height: auto;
    /* margin: 20px; */
    border-radius: 5px;
}

.about-us-pc p,
.about-us-mobile p {
    scroll-margin-top: 40vh;
}

.about-us-mobile{
    display: none;
}
@media (max-width: 650px) {
    .about-us-pc{
        display: none;
    }
    .about-us-mobile {
        display: block;
        font-size: 90%;
        font-weight:500;
        text-align: center;
    }
    .about-us-mobile p {
        position: relative;
        /* margin: -3rem 0 2rem 1rem; */
        margin-top: -2rem;
        padding: 1.5rem;
        /* background: rgba(0, 0, 0, 0.3); */
    }
    .about-us-mobile img{
        padding-bottom: 2rem;
        max-width: 90%;
        height: auto;
        border-radius: 5px;
    }
}

/* gallery */
.gallery {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  padding: 0 4px;
}

/* Create four equal columns that sits next to each other */
.gallery_column {
  display: flex;
  flex-direction: column;
  flex: 25%;
  max-width: 25%;
  padding: 0 4px;
}

.gallery_column img:hover {
  opacity: 0.6;
}

/* Responsive layout - makes a two column-layout instead of four columns */
@media screen and (max-width: 800px) {
  .gallery_column {
    flex: 50%;
    max-width: 50%;
  }
}

/* Responsive layout - makes the two columns stack on top of each other instead of next to each other */
@media screen and (max-width: 600px) {
  .gallery_column {
    flex: 100%;
    max-width: 100%;
  }
}

.gallery_item {
    position: relative;
    overflow: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
    padding-top: 4px;
}

.gallery_item img {
    width: 100%;
    display: block;
}

/* Caption styling */
.gallery_item figcaption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    
    background: rgba(0, 0, 0, 0.6);
    color: white;
    text-align: center;
    padding: 10px;

    opacity: 0;
    transform: translateY(100%);
    transition: all 0.2s ease;
}

/* Hover effect */
.gallery_item:hover figcaption {
    opacity: 1;
    transform: translateY(0);
}

.image-and-audio{
    display: flex;
    flex-direction: column;
    align-items: center;
}
audio{
    max-width: 80%;
}

/* FAQ */
.faq {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid #ddd;
    margin-bottom: 10px;
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    outline: none;
    text-align: left;
    font-size: 18px;
    padding: 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question i {
    transition: transform 0.3s ease;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 15px;
}

.faq-answer p {
    margin: 10px 0;
}

/* Active state */
.faq-item.active .faq-answer {
    max-height: 200px;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

/* Nature */
.nature-group{
    padding: 1.5rem;
}

.nature-group-expand {
    width: 100%;
    background: none;
    border-color: #00000046;
    border-radius: 5px;
    text-align: left;
    padding-left: 2rem;
    cursor: pointer;
    display: flex;
}

.nature-group-contents{
    background-color: #8d644534;
}

.nature-group-contents ul {
    list-style:square
}

.nature-group-contents {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease;
    padding: 0 15px;
}

/* Active state */
.nature-group.active .nature-group-contents {
    max-height: 100%;
}

/* HEADER */

/* ========================================
   Header Layout
======================================== */
header {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    align-items: center;
    padding: 0 2rem;
    border-bottom: 2px solid var(--border);
    background: var(--bg);
    position: sticky;
    top: 0;
    z-index: 100000;
}

/* Left */
.logo {
    display: flex;
    justify-self: start;
    width: 10rem;
}

.logo img {
    width: 100%;
    height: auto;
}

/* Center */
.nav-container {
    display: flex;
    justify-content: center;
}

/* Right */
.right-controls {
    justify-self: end;
    display: flex;
    align-items: center;
}

nav {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.nav-title {
    font-size: larger;
}

/* ========================================
   Top Level Links
======================================== */
.nav-item {
    position: relative;
    padding: 0.5rem 0;
}

.nav-title {
    font-weight: 700;
    cursor: pointer;
    padding-bottom: 5px;
    position: relative;
}

/* Animated underline */
.nav-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--secondary);
    transform: translateX(-50%);
    transition: width var(--transition-speed) ease;
}

.nav-item::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 15px; /* invisible bridge */
}

.nav-item:hover .nav-title::after {
    width: 100%;
}

/* ========================================
   Mega Dropdown (Desktop Default)
======================================== */
/* Desktop Dropdown */
.dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) scale(0.98);
    transform-origin: top center;

    background: var(--bg);
    padding: 1rem 1.5rem;
    border-radius: 14px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
    min-width: 200px;

    opacity: 0;
    pointer-events: none;

    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}

/* Desktop hover ONLY on real hover devices */
@media (min-width: 1001px) and (hover: hover) {
    .nav-item:hover .dropdown {
        opacity: 1;
        pointer-events: auto;
        transform: translateX(-50%) scale(1);
    }

    .nav-item:hover .nav-title::after {
        width: 100%;
    }
}

.dropdown a {
    display: block;
    padding: 0.5rem 0;
    font-weight: 600;
}

.dropdown a:hover {
    color: var(--primary);
}

/* ========================================
   Right Controls
======================================== */
.right-controls {
    display: flex;
    align-items: center;
    padding: 1rem;
}
.right-controls i {
    padding: 0.3rem;
}

.dark-toggle {
    border: 2px solid var(--border);
    background: none;
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    /* transition: all var(--transition-speed) var(--transition-bounce); */
}

body.dark .dark-toggle {
    color: #eae6e3; /* force white icon */
    border-color: #eae6e3;
}

.dark-toggle:hover {
    transform: scale(1.1);
    border-color: var(--primary);
}

/* ========================================
   Mobile Layout
======================================== */

.hamburger {
    display: none;
    font-size: 1.8rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text);
}

@media (max-width: 1000px) {

    header {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .hamburger {
        display: block;
        justify-self: start;
    }

    .logo {
        justify-self: center;
        margin: 0;
        width: 8rem;
    }

    .right-controls {
        justify-self: end;
        margin: 0;
    }

    .nav-container {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        display: none;
        padding: 1rem 0;
    }

    .nav-container.open {
        display: block;
    }

    nav {
        flex-direction: column;
        gap: 0;
        align-items: stretch;
    }

    .nav-item {
        width: 100%;
        padding: 1rem 2rem;
        border-bottom: 1px solid var(--border);
    }

    /* Dropdown becomes static below item */
    .dropdown {
        position: static;
        transform: none;
        box-shadow: none;
        padding: 0.5rem 0 0 1rem;
        background: none;

        opacity: 1;
        pointer-events: auto;

        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-item.open .dropdown {
        max-height: 500px; /* big enough to fit content */
    }

    .nav-title::after {
        display: none; /* remove underline animation on mobile */
    }

    .right-controls i {
    padding: 0.1rem;
}
}

@media (max-width: 900px) and (hover: none) {

    .dropdown {
        position: static;
        transform: none;
        box-shadow: none;
        padding: 0.5rem 0 0 1rem;
        background: none;

        opacity: 1;
        pointer-events: auto;

        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-item.open .dropdown {
        max-height: 500px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}

:root {
    --footer-bg: #4f3d3d;
    --footer-text: #e1cbcb;
    --footer-border: #c7a9a9;
}

/* ===============================
   WAVE DIVIDER
================================ */
.footer-divider {
    line-height: 0;
    background: var(--bg)
}
.footer-divider svg {
    display: block;
    width: 100%;
    height: 80px;
    fill: var(--footer-bg);
    margin-bottom: -1px;
}

/* ===============================
   FOOTER MAIN
================================ */
.footer-wave {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 3rem 0 2rem 0;
    text-align: center;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

/* ===============================
   TOP LINK BOXES
================================ */
.footer-box-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    justify-items: center;
    margin-bottom: 3rem;
}

.footer-box {
    /* border: 1.5px solid var(--footer-border); */
    padding: 1.5rem 2rem;
    min-width: 240px;
}

.footer-box h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    text-transform: uppercase;
}

.footer-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-box li {
    margin-bottom: 0.6rem;
}

.footer-box a {
    text-decoration: none;
    color: var(--footer-text);
    font-weight: 600;
}

.footer-box a:hover {
    text-decoration: underline;
}

/* ===============================
   SUPPORT SECTION
================================ */
.footer-support {
    margin: 2rem 0 1rem 0;
    font-weight: 600;
}

.footer-logos {
    margin: 1.5rem 0;
}

.footer-logos img {
    max-width: 600px;
    width: 100%;
    height: auto;
}

/* ===============================
   POWERED BY
================================ */
.footer-powered {
    margin-top: 1.5rem;
    font-size: 0.8rem;
    font-style: italic;
    font-weight: 700;
}

/* ===============================
   RESPONSIVE
================================ */
@media (min-width: 768px) {
    .footer-box-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 650px) {

    .footer-wave {
        padding: 1.5rem 0 1rem 0;
    }

    .footer-box-grid {
        gap: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .footer-box {
        padding: 0.5rem 1rem; 
        min-width: unset;
    }

    .footer-box h3 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .footer-box li {
        margin-bottom: 0.4rem;
    }

    .footer-support {
        margin: 1rem 0 0.5rem 0;
        font-size: 0.9rem;
    }

    .footer-logos img {
        max-width: 90%; /* prevent oversized logos */
    }

    .footer-powered {
        margin-top: 1rem;
        font-size: 0.7rem;
    }

    .footer-divider svg {
        height: 50px; /* smaller wave */
    }
}

/* ===============================
   DONATE PAGE
================================ */

.donate-wrapper {
    display: flex;
    flex-direction: column;
    padding: 0 20%;
}

.bank-info {
    margin: 1.5rem 0;
    text-align: left;
    font-size: 1.1rem;
}

/* PayPal Button */
.button_wrapper{
    display: inline-flex;
    justify-content: center;
    text-align: center;
}

.paypal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;

    margin-top: 1rem;
    padding: 0.8rem 1.4rem;

    background: #ffc439;
    color: #111;
    font-weight: 700;
    border-radius: 50px;

    transition: all var(--transition-speed);
}

.paypal-btn:hover {
    background: #ffb347;
    transform: scale(1.05);
}

