/* --- ზოგადი პარამეტრები --- */
:root {
    --text-dark: #1A3C34;
    /* მუქი მწვანე ტექსტი */
    --accent-orange: #C86B46;
    /* სტაფილოსფერი ღილაკი */
    --bg-cream: #F9F7F2;
    /* ღია კრემისფერი ფონი */
    --footer-bg: #0F3D2E;
    /* ფუტერის ფონი */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Firago', sans-serif;
}

body {
    background-color: var(--bg-cream);
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
}

/* --- ჰედერი / ნავიგაცია --- */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    position: fixed;
    /* Fixed at the top */
    transition: transform 0.3s ease-in-out;
    /* Smooth transition for hiding */
    top: 0;
    width: 100%;
    z-index: 10;
    /* Animated Gradient Background */
    background: linear-gradient(45deg, #1A3C34, #0F3D2E, #2C5E50, #1A3C34);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.logo {
    display: flex;
    align-items: center;
}

.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: white;
}

.logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.nav-links i {
    display: none;
}

.btn-small {
    background-color: var(--accent-orange);
    color: white;
    padding: 8px 20px;
    border-radius: 5px;
    font-size: 0.9rem;
}

/* --- HERO SECTION --- */
.hero {
    height: 95vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    /* ვიდეო რომ არ გაცდეს სექციას */
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -1;
    /* ტექსტის უკან რომ იყოს */
}

.hero-overlay {
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    /* მკრთალი შავი ფენა ტექსტის უკეთ წასაკითხად */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero-text {
    /* padding-left: 8%; */
    /* აღარ არის საჭირო, რადგან ტექსტი ცენტრშია */
    color: white;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    /* ჩრდილი უკეთესი კითხვისთვის */
}

.hero-text h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 15px;
}

.hero-text p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 500px;
}

.btn-primary {
    display: inline-block;
    background-color: var(--accent-orange);
    color: white;
    padding: 15px 35px;
    border-radius: 8px;
    font-weight: bold;
    transition: 0.3s;
}

.btn-primary:hover {
    background-color: #b05634;
}

/* --- ABOUT SECTION --- */
.about {
    padding: 100px 0;
    background-color: var(--bg-cream);
    background-image: url('about-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.about-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 80px;
}

/* Blob Shape - ისეთივე ფორმა, როგორც დიზაინშია */
.about-img-wrapper img {
    width: 450px;
    height: 400px;
    object-fit: cover;
    /* ეს კოდი აკეთებს "ორგანულ" ფორმას */
    border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%;
    box-shadow: 20px 20px 0px rgba(230, 230, 230, 0.5);
    /* მსუბუქი ჩრდილი */
}

.about-text {
    max-width: 450px;
}

.about-text h2 {
    font-size: 2.5rem;
    color: var(--text-dark);
}

.divider {
    width: 80px;
    height: 3px;
    background-color: var(--accent-orange);
    margin: 15px 0 25px 0;
}

/* --- PRODUCTS SECTION (WOOD BG) --- */
/* --- PRODUCTS SECTION --- */
.products {
    /* ძველი ხის ფონი აქედან წავშალეთ და მივეცით მუქი ფონი */
    background-color: var(--footer-bg);
    padding: 120px 0;
    /* დაშორება ზემოდან და ქვემოდან */
    position: relative;
}

/* ახალი სტილი ხის "ყუთისთვის" */
.wood-wrapper {
    background-image: url('wood-texture.png');
    /* ხის ფოტო აქ გადმოვიდა */
    background-size: cover;
    background-position: center;

    border-radius: 80px;
    /* ეს ამრგვალებს კუთხეებს! */
    padding: 90px 30px;
    /* შიდა დაშორება */

    /* ლამაზი ჩრდილი, რომ 3D ეფექტი ქონდეს */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);

    /* ტექსტის გასწორება */
    text-align: center;
}

.section-title {
    text-align: center;
    color: white;
    font-size: 3.5rem;
    margin-bottom: 60px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.product-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

/* მობილურისთვის კუთხეები ცოტა შევამციროთ */
@media (max-width: 768px) {
    .wood-wrapper {
        border-radius: 25px;
        padding: 40px 15px;
    }
}

/* ბარათების დიზაინი */
.card {
    background: white;
    width: 300px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.card-img-box {
    position: relative;
    padding: 20px;
    background: white;
    display: flex;
    justify-content: center;
    height: 280px;
}

.card-img-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    /* მცენარე რომ არ გაიწელოს */
}

/* ფასი მარჯვენა კუთხეში */
.price-tag {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: var(--accent-orange);
    color: white;
    padding: 5px 12px;
    font-weight: bold;
    font-size: 0.9rem;
    border-radius: 4px;
}

.card-details {
    padding: 15px 25px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
}

.card-details h3 {
    font-size: 1.1rem;
    color: var(--text-dark);
}

.cart-btn {
    background-color: var(--accent-orange);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.3s;
}

.cart-btn:hover {
    background-color: #b05634;
}

/* --- FOOTER --- */
.footer {
    background-color: var(--footer-bg);
    color: white;
    text-align: center;
    padding: 60px 20px 20px;
}

.footer h3 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.social-icons {
    margin: 30px 0;
}

.social-icons i {
    font-size: 1.5rem;
    margin: 0 15px;
    color: var(--accent-orange);
    cursor: pointer;
}

.copyright {
    font-size: 0.8rem;
    opacity: 0.6;
    margin-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}


/* მობილური ადაპტაცია */
@media (max-width: 768px) {
    .header {
        padding: 20px;
        /* Keep header always on top */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        /* Ensure z-index is high enough */
        z-index: 1000;
        /* Flex adjustments for mobile header */
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .hamburger {
        display: block;
    }

    .nav-links {
        display: block;
        /* Default block, logic handled by height */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(15, 61, 46, 0.95);
        /* Semi-transparent dark green */
        backdrop-filter: blur(10px);

        /* Dropdown transition */
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease-in-out;

        flex-direction: column;
        align-items: center;
        padding: 0;
        box-shadow: none;
        gap: 0;
    }

    .nav-links.active {
        max-height: 500px;
        /* Arbitrary large height */
        padding: 20px 0;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        margin: 10px 0;
    }

    .nav-links i {
        display: inline-block;
        /* Reset icon display */
        margin-right: 10px;
        margin-bottom: 0;
        font-size: 1rem;
    }

    .nav-links a {
        display: inline-block;
        /* Reset link display */
        font-size: 1.1rem;
        padding: 10px;
        width: 100%;
    }

    .header .btn-small {
        display: none;
    }

    /* მობილურზე მენიუს დამალვა მარტივად */
    .hero-text h1 {
        font-size: 3rem;
    }

    .about-container {
        flex-direction: column;
        text-align: center;
    }

    .about-img-wrapper img {
        width: 100%;
        height: auto;
    }
}


/* --- 3D Background --- */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    /* სულ თავში, ყველაფრის ზევით */
    pointer-events: none;
    overflow: hidden;
}

/* --- SCROLL SNAP & ANIMATIONS --- */
html {
    scroll-behavior: smooth;
}

section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}


/* ანიმაციის საწყისი მდგომარეობა */
.reveal-item {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.reveal-item.active {
    opacity: 1;
    transform: translateY(0);
}

/* ბარათების ტალღოვანი ეფექტი */
.card {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease-out;
}

.card.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- DECORATIONS (ფონური ხაზოვანი ფოთლები) --- */

/* აუცილებელია, რომ სურათი სექციას არ გაცდეს */
section,
footer {
    position: relative;
    overflow: hidden;
}

.bg-decor {
    position: absolute;
    z-index: 0;
    /* ტექსტის უკან */
    pointer-events: none;
    /* მაუსის დაჭერა რომ არ შეუშალოს ხელი */
    opacity: 0.15;
    /* ძალიან მკრთალი */
    max-width: 350px;
    /* სურათის მაქსიმალური ზომა */
    transition: transform 0.5s ease;
}

/* ანიმაცია: მაუსის მიტანისას ოდნავ განძრევა */
section:hover .bg-decor,
footer:hover .bg-decor {
    transform: scale(1.05) rotate(5deg);
}

/* პოზიცია: About სექცია (მარჯვნივ) */
.decor-about {
    top: 50%;
    right: -80px;
    /* ეკრანიდან ოდნავ გასული */
    transform: translateY(-50%);
    width: 400px;
}

/* პოზიცია: Products სექცია (მარცხნივ, მწვანე ფონზე) */
.decor-products {
    top: 10%;
    left: -50px;
    width: 300px;
    filter: invert(1);
    /* ათეთრებს შავ ხაზებს (მუქ ფონზე რომ გამოჩნდეს) */
    opacity: 0.05;
    /* კიდევ უფრო მკრთალი */
}

/* პოზიცია: Footer (მარცხენა კუთხე) */
.decor-footer-left {
    bottom: -50px;
    left: -50px;
    width: 300px;
    transform: rotate(-15deg);
    filter: invert(1);
    /* გათეთრება */
    opacity: 0.1;
}

/* პოზიცია: Footer (მარჯვენა კუთხე) */
.decor-footer-right {
    bottom: -80px;
    right: -50px;
    width: 400px;
    transform: rotate(10deg);
    filter: invert(1);
    /* გათეთრება */
    opacity: 0.1;
}

/* მობილურზე ზომების დაპატარავება */
@media (max-width: 768px) {
    .bg-decor {
        max-width: 200px;
        opacity: 0.1;
    }
}
