:root {
    --bg-color: #f4f1ed;      /* Kreminis fonas */
    --text-color: #1a1a1a;    /* Tekstas */
    --accent-color: #2d3e30;  /* Gili žalia (Years of Solitude) */
    --soft-green: #e8eee9;    /* Šviesiai žalia sekcijoms */
    --white: #ffffff;
    --header-font: 'Playfair Display', serif;
    --body-font: 'Inter', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--body-font);
    line-height: 1.6;
}

/* --- Navigacija --- */
header {
    background-color: var(--bg-color);
    padding: 1.5rem 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(45, 62, 48, 0.1);
}

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

.logo {
    font-family: var(--header-font);
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--accent-color);
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent-color);
}

/* Hamburgerio ikona */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    border: none;
    background: none;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--accent-color);
}

/* --- Sekcijos --- */
#hero {
    background-color: var(--accent-color);
    color: var(--bg-color);
    padding: 100px 10%;
    text-align: center;
}

#hero h1 {
    font-family: var(--header-font);
    font-size: clamp(2rem, 8vw, 4rem);
    margin-bottom: 1rem;
}

.content-section {
    padding: 5rem 10%;
    max-width: 1200px;
    margin: 0 auto;
}

h2 {
    font-family: var(--header-font);
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--accent-color);
    display: inline-block;
}

#medis {
    background-color: var(--soft-green);
    max-width: 100%;
}

#tree {
    width: 100%;
    height: 600px;
    background-color: var(--white);
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.gallery-placeholder {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.photo-box {
    background: #ddd;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: italic;
    color: #666;
}

/* --- Footeris --- */
footer {
    background-color: var(--accent-color);
    color: var(--bg-color);
    padding: 4rem 5%;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: var(--bg-color);
    text-decoration: none;
    font-weight: bold;
    width: 45px;
    height: 45px;
    border: 1px solid var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.social-links a:hover {
    background-color: var(--bg-color);
    color: var(--accent-color);
}

/* --- Navigacija Bendras --- */
.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

/* --- MOBILUS MENIU (Numatytasis nustatymas mažiems ekranams) --- */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex; /* Parodome hamburgerį */
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--bg-color);
        flex-direction: column;
        text-align: center;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        z-index: 100;
        
        /* Paslėpimas ir Animacija */
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 0; 
    }

    /* Aktyvus meniu būsena paspaudus */
    .nav-links.active {
        max-height: 500px; /* Pakankamas aukštis visiems punktams */
        opacity: 1;
        padding: 2rem 0;
    }

    .content-section{
        padding: 5rem 5% !important;
    }

    .nav-links li {
        margin: 15px 0;
        opacity: 0;
        transform: translateY(-10px);
        transition: all 0.3s ease 0.2s;
    }

    .nav-links.active li {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- STALINIS KOMPIUTERIS (Grąžiname matomumą dideliems ekranams) --- */
@media (min-width: 769px) {
    .mobile-menu-btn {
        display: none; /* Paslepiame hamburgerį */
    }

    .nav-links {
        /* Perrašome mobilias taisykles, kad meniu būtų matomas */
        position: static;
        max-height: none;
        opacity: 1;
        flex-direction: row;
        box-shadow: none;
        padding: 0;
        overflow: visible;
    }
}

/* Socialinių ikonų stilius */
.social-links a {
    font-size: 1.2rem; /* Ikonos dydis */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border: 1px solid var(--bg-color);
    border-radius: 50%;
    color: var(--bg-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--bg-color);
    color: var(--accent-color);
    transform: translateY(-3px); /* Lengvas pakilimo efektas */
}

/* Jei ikonos atrodo šiek tiek ne centre, šis pataisymas padės */
.social-links i {
    line-height: 0;
}

.read-more-btn {
    display: inline-block;
    padding: 12px 25px;
    background-color: var(--accent-color);
    color: var(--bg-color);
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    transition: opacity 0.3s;
}

.read-more-btn:hover {
    opacity: 0.9;
}

/* Back to top mygtukas */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--accent-color);
    color: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none; /* Pradžioje paslėptas */
    align-items: center;
    justify-content: center;
    text-decoration: none;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border: none;
    cursor: pointer;
}

#back-to-top:hover {
    transform: translateY(-5px);
    background-color: #3e5241; /* Šiek tiek šviesesnė žalia už akcentinę */
}

/* Užtikriname, kad ikona būtų centre */
#back-to-top i {
    font-size: 1.2rem;
}

html {
    scroll-behavior: smooth;
}

.logo {
    display: flex;
    align-items: center;
    gap: 6px; /* Padidinau tarpą geresniam vaizdui */
    text-decoration: none;
    line-height: 1; /* Neleidžia tekstui stumti konteinerio aukščio */
}

.logo-icon {
    width: 35px;
    height: 35px;
    object-fit: contain; /* Užtikrina, kad PNG nebūtų iškraipytas */
    flex-shrink: 0;
    transition: transform 0.3s ease;
    will-change: transform; /* Panaikina "šokinėjimo" efektą */
}

.logo:hover .logo-icon {
    transform: scale(1.1); /* Šiek tiek padidinau, kad efektas būtų aiškesnis */
}

.gallery-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    padding: 40px 0;
}

.polaroid {
    background: white;
    padding: 15px 15px 40px 15px; /* Daugiau vietos apačioje kaip tikrame Polaroide */
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border-radius: 2px;
    transition: transform 0.3s ease, z-index 0s;
    cursor: pointer;
    position: relative;
    max-width: 250px;
}

.polaroid img {
    width: 100%;
    height: 200px;
    object-fit: cover; /* Nukerpa nuotrauką, kad visos būtų vienodo dydžio */
    border: 1px solid #eee;
}

/* Užvedus pelę, nuotrauka išsitiesina ir pakyla virš kitų */
.polaroid:hover {
    transform: rotate(0deg) scale(1.1) !important;
    z-index: 10;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
}


@media (max-width: 600px) {
    .gallery-wrapper {
        position: relative;
        height: 500px; /* Užtikriname pakankamai vietos vertikaliai */
        width: 100%;
        overflow: hidden;
    }

    .polaroid {
        position: absolute !important;
        /* Pašaliname left: 50%, kad JS galėtų laisvai valdyti poziciją */
        max-width: 160px; 
        padding: 10px 10px 25px 10px;
    }
}

.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 72.5vh;
    text-align: center;
    padding: 20px;
}

.error-code {
    font-family: var(--header-font);
    font-size: 8rem;
    color: var(--accent-color);
    margin: 0;
    opacity: 0.2;
}

.error-message {
    margin-top: -40px;
}

.error-btn {
    margin-top: 2rem;
    padding: 12px 30px;
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    transition: 0.3s;
}

.error-btn:hover {
    opacity: 0.8;
    transform: translateY(-3px);
}
.tree-icon {
    font-size: 4rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}