/* ძირითადი ფერების ცვლადები */
:root {
    --primary: #2563eb;
    --bg-color: #f8fafc;
    --text-color: #0f172a;
    --card-bg: #ffffff;
    --header-bg: #0f172a;
    --header-text: #ffffff;
    --text-secondary: #64748b;
    --border-color: #cbd5e1;
    --viewer-bg: #f1f5f9;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, sans-serif;
}

body {
    background-image: url('imager/background.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--text-color);
    line-height: 1.6;
}

header {
    background: var(--header-bg);
    color: var(--header-text);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.5rem;
    color: #60a5fa;
}

/* ნავიგაცია და ღილაკების სტილი */
.nav-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

nav {
    display: flex;
    gap: 0.5rem;
}

nav a {
    color: var(--header-text);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease-in-out;
    font-size: 0.95rem;
    display: inline-block;
}

nav a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

nav a:active {
    transform: translateY(0);
    box-shadow: none;
}

.hero {
    text-align: center;
    padding: 6rem 5%;
    background-image: linear-gradient(rgba(15, 23, 42, 0.75), rgba(15, 23, 42, 0.75));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #ffffff;
    border-bottom: 1px solid var(--border-color);
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

.hero p {
    color: #e2e8f0;
    max-width: 600px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin: 3rem auto 1.5rem;
    font-size: 1.8rem;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 0.8rem 1.5rem;
    max-width: max-content;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 3D Viewer Section */
.viewer-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 5%;
}

model-viewer {
    width: 100%;
    height: 400px;
    background-image: url('https://images.unsplash.com/photo-1506703719100-a0f3a48c0f86?auto=format&fit=crop&w=1200&q=80');
    background-size: cover;
    background-position: center;
    border-radius: 12px;
}

/* Portfolio Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 0 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(6px);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: none;
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
    background: transparent;
}

.card-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.card-text {
    color: #f8fafc;
    font-size: 0.95rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* Card Link Styles */
.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-link:hover {
    transform: translateY(-5px);
}

.more-btn {
    display: inline-block;
    margin-top: 1rem;
    color: #60a5fa;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Contact & Order Form */
.form-container {
    max-width: 600px;
    margin: 3rem auto;
    padding: 2.5rem 2rem;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.form-container h2 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.form-container p.subtitle {
    text-align: center;
    color: #e2e8f0;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #ffffff;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
}

.form-hint {
    font-size: 0.85rem;
    color: #cbd5e1;
    margin-top: 0.3rem;
}

.btn {
    background: var(--primary);
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    font-weight: 600;
    transition: background 0.2s ease-in-out;
}

.btn:hover {
    background: #1d4ed8;
}

footer {
    text-align: center;
    padding: 2rem;
    background: var(--header-bg);
    color: var(--text-secondary);
    margin-top: 4rem;
}

/* =========================================================
   📱 Mobile & Tablet Responsive Styles (მობილურის ადაპტაცია)
   ========================================================= */

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        text-align: center;
    }

    .nav-container {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.4rem;
    }

    nav a {
        padding: 0.4rem 0.75rem;
        font-size: 0.85rem;
    }

    .hero {
        padding: 3rem 1.2rem;
    }

    .hero h2 {
        font-size: 1.75rem;
    }

    .hero p {
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 1.3rem;
        padding: 0.6rem 1rem;
        margin: 2rem auto 1rem;
        max-width: 90%;
    }

    model-viewer {
        height: 300px;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 4%;
    }

    .form-container {
        margin: 2rem 4%;
        padding: 1.5rem 1.2rem;
    }

    .form-container h2 {
        font-size: 1.4rem;
    }

    .form-group input,
    .form-group textarea {
        font-size: 16px;
    }
}

/* Language Switcher Button Styles */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
}

.lang-btn {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    transition: all 0.2s ease-in-out;
}

.lang-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.lang-btn.active {
    color: #ffffff;
    background: var(--primary);
}

/* =========================================================
   ეტაპი 1: დაამატე ეს ბლოკი style.css-ის ბოლოს (არაფერი წაშალო)
   ========================================================= */

/* ფონი: ფიქსირებული სურათი pseudo-ელემენტზე (მუშაობს iPhone-ზეც) */
body {
    background-image: none;
    background-color: #0f172a;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.7)),
                url('imager/background.jpeg') center / cover no-repeat;
}

/* ლოგო (h1-ის ნაცვლად) */
.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #60a5fa;
}

/* hero: h1 იგივე სტილით, რაც ადრე h2-ს ჰქონდა */
.hero h1 {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    margin-bottom: 1rem;
    color: #ffffff;
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center;
    margin-top: 1.8rem;
}
.btn-link {
    display: inline-block;
    padding: 0.85rem 1.6rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease-in-out;
}
.btn-primary { background: var(--primary); color: #ffffff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-ghost { border: 1px solid rgba(255, 255, 255, 0.5); color: #ffffff; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }

/* როგორ ვმუშაობთ */
.steps {
    list-style: none;
    counter-reset: step;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}
.steps li {
    counter-increment: step;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 1.4rem;
    color: #f8fafc;
}
.steps li::before {
    content: counter(step);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    margin-bottom: 0.7rem;
    border-radius: 50%;
    background: var(--primary);
    font-weight: 700;
}
.steps h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.steps p { font-size: 0.92rem; color: #e2e8f0; }

/* მასალები */
.materials {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}
.materials div {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 1.4rem;
    color: #f8fafc;
}
.materials h3 { color: #60a5fa; margin-bottom: 0.4rem; }
.materials p { font-size: 0.92rem; color: #e2e8f0; }

/* ხილული კონტაქტი */
.contact-info {
    max-width: 700px;
    margin: 3rem auto 0;
    padding: 1.8rem 2rem;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #ffffff;
}
.contact-info h2 { font-size: 1.4rem; margin-bottom: 1rem; text-align: center; }
.contact-info ul { list-style: none; }
.contact-info li {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.3rem 1rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.contact-info li:last-child { border-bottom: none; }
.contact-info a { color: #93c5fd; text-decoration: none; }
.contact-info a:hover { text-decoration: underline; }

/* ფორმა: select იგივე სტილით, რაც input */
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}
.form-group select option { color: #0f172a; }

/* ფოკუსის ხილვადობა კლავიატურისთვის */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}

footer a { color: #93c5fd; text-decoration: none; }

/* მობილურის მუდმივი საკონტაქტო ღილაკები */
.contact-bar { display: none; }

@media (max-width: 768px) {
    .contact-bar {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 50;
        background: #0f172a;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }
    .contact-bar a {
        flex: 1;
        padding: 0.9rem 0.5rem;
        text-align: center;
        font-weight: 600;
        text-decoration: none;
        color: #ffffff;
    }
    .contact-bar a:first-child { background: var(--primary); }
    body { padding-bottom: 3.4rem; }
    .contact-info { margin: 2rem 4% 0; padding: 1.4rem 1.2rem; }
}
/* პროდუქტის ბარათი: დაამატე style.css-ის ბოლოს */
.tag {
    display: inline-block;
    margin-bottom: 0.6rem;
    padding: 0.15rem 0.6rem;
    border: 1px solid rgba(147, 197, 253, 0.6);
    border-radius: 999px;
    color: #93c5fd;
    font-size: 0.8rem;
    font-weight: 600;
}
.btn-sm {
    margin-top: 1rem;
    padding: 0.55rem 1.1rem;
    font-size: 0.9rem;
}

/* ფოტოს გახსნა დაჭერით: დაამატე style.css-ის ბოლოს */
.card img { cursor: zoom-in; }

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1rem;
    background: rgba(2, 6, 23, 0.92);
}
.lightbox.open { display: flex; }
.lightbox img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    object-fit: contain;
}
.lightbox-caption { color: #ffffff; font-weight: 600; text-align: center; }
.lightbox-close {
    position: absolute;
    top: 0.8rem;
    right: 1rem;
    width: 2.6rem;
    height: 2.6rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.8);
    color: #ffffff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}
/* კომპაქტური ჰედერი მობილურზე: დაამატე style.css-ის ბოლოს */
@media (max-width: 768px) {
    header {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "logo lang"
            "nav  nav";
        align-items: center;
        gap: 0.6rem 1rem;
        padding: 0.7rem 4%;
        text-align: left;
    }

    /* კონტეინერი "ქრება", რომ ლოგო, ენა და მენიუ ერთ ბადეში მოხვდეს */
    .nav-container { display: contents; }

    .logo { grid-area: logo; font-size: 1.25rem; }
    .lang-switch { grid-area: lang; }

    nav {
        grid-area: nav;
        display: flex;
        flex-wrap: wrap;
        justify-content: stretch;
        gap: 0.4rem;
    }
    nav a {
        flex: 1 1 auto;
        text-align: center;
        padding: 0.45rem 0.5rem;
        font-size: 0.82rem;
        white-space: nowrap;
    }
}

/* ბარათის მთავარი ფოტო + ბეჯი */
.card-photo { position: relative; }
.photo-count {
    position: absolute;
    right: 0.6rem;
    bottom: 0.6rem;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.8);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 600;
    pointer-events: none;
}

/* ლაიტბოქსის ისრები */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 3rem;
    height: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.8);
    color: #ffffff;
    font-size: 1.3rem;
    cursor: pointer;
    transition: background 0.2s ease-in-out;
}
.lightbox-nav:hover { background: var(--primary); }
.lightbox-nav.prev { left: 0.8rem; }
.lightbox-nav.next { right: 0.8rem; }
.lightbox-nav[hidden] { display: none; }
