:root {
    --navy-blue: #0a192f;
    --gold: #d4af37;
    --white: #ffffff;
    --red: #ff4d4d;
}

html { scroll-behavior: smooth; }
* { margin: 0; padding: 0; box-sizing: border-box; font-family: Arial, sans-serif; }
body { background: #fff; }

/* HEADER */
header {
    background: var(--navy-blue); padding: 15px 40px;
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--gold); position: relative; z-index: 1000;
}
.brand-name { color: var(--gold); font-size: 1.8rem; font-weight: bold; text-decoration: none; cursor: pointer; white-space: nowrap; }

/* SEARCH */
.header-search { display: flex; gap: 10px; flex: 2; max-width: 650px; margin: 0 20px; }
.header-search input { padding: 10px 15px; border: none; border-radius: 30px; flex: 1; min-width: 120px; outline: none; }
.header-search button {
    background: var(--gold); color: var(--navy-blue); border: none; padding: 10px 25px;
    border-radius: 30px; cursor: pointer; font-weight: bold; transition: 0.3s;
}
.header-search button:hover { background: #bfa030; }

.header-right { display: flex; align-items: center; gap: 20px; }

/* MENU */
.menu-wrapper { position: relative; padding-bottom: 0; }
.menu-icon {
    color: var(--gold); border: 2px solid var(--gold); padding: 8px 20px;
    border-radius: 30px; cursor: pointer; font-weight: bold; text-transform: uppercase;
    position: relative; overflow: hidden; white-space: nowrap; transition: 0.3s;
}
.menu-icon:hover { background: var(--gold); color: var(--navy-blue); }

.dropdown-menu {
    display: none; position: absolute; top: 120%; right: 0; background: var(--navy-blue);
    border: 1px solid var(--gold); min-width: 180px; border-radius: 10px;
    overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.5); z-index: 1001;
}
.menu-wrapper.active .dropdown-menu { display: block; }
.dropdown-menu ul { list-style: none; }
.dropdown-menu a { color: white; text-decoration: none; display: block; padding: 12px 20px; transition: 0.2s; }
.dropdown-menu a:hover { background: rgba(212, 175, 55, 0.15); color: var(--gold); padding-left: 25px; }

/* LANG SWITCH & ANIMATION */
.lang-switch { display: flex; align-items: center; gap: 8px; color: white; font-weight: bold; }
.lang-switch button { 
    background: none; border: none; color: white; cursor: pointer; 
    font-weight: bold; font-size: 1rem; transition: transform 0.15s ease, color 0.3s; 
}
.lang-switch button:active { transform: scale(0.7); }
.active-lang { color: var(--gold) !important; transform: scale(1.1); }

/* HERO */
.hero {
    min-height: 90vh; display: flex; flex-direction: column; justify-content: center;
    align-items: center; text-align: center;
    background: linear-gradient(rgba(10,25,47,.6), rgba(10,25,47,.8)), url("https://images.unsplash.com/photo-1499856871958-5b9627545d1a?w=1600");
    background-size: cover; background-position: center;
}
.hero-logo { width: 320px; margin-bottom: 30px; filter: drop-shadow(0 10px 25px rgba(0,0,0,0.8)); }
.hero h1 { color: var(--gold); font-size: 3.5rem; margin-bottom: 15px; }
.hero p { color: white; font-size: 1.3rem; }

/* TOURS */
.tours-section { padding: 80px 40px; background: #f5f5f5; min-height: 400px; }
.section-title { text-align: center; font-size: 2.5rem; color: var(--navy-blue); margin-bottom: 50px; }
.tours-container { display: flex; justify-content: center; flex-wrap: wrap; gap: 30px; }
.tour-card { width: 340px; background: white; border-radius: 20px; overflow: hidden; box-shadow: 0 8px 25px rgba(0,0,0,.1); transition: .3s; }
.tour-card:hover { transform: translateY(-8px); box-shadow: 0 15px 35px rgba(0,0,0,.2); }
.tour-card img { width: 100%; height: 230px; object-fit: cover; cursor: pointer; transition: 0.3s; }
.tour-card img:hover { opacity: 0.8; }
.tour-content { padding: 20px; }
.tour-content h3 { color: var(--navy-blue); margin-bottom: 15px; }
.price { margin-bottom: 20px; }
.old-price { text-decoration: line-through; color: #888; margin-right: 10px; }
.new-price { color: var(--red); font-size: 1.6rem; font-weight: bold; }
.details-btn {
    background: var(--gold); color: var(--navy-blue); border: none; padding: 12px 20px;
    border-radius: 30px; cursor: pointer; font-weight: bold; width: 100%; transition: 0.3s;
}
.details-btn:hover { background: var(--navy-blue); color: var(--gold); }

#no-tours-msg { margin-top: 40px; text-align: center; font-size: 1.8rem; color: var(--red); font-weight: bold; }

/* CTA */
.cta-section { background: var(--navy-blue); color: white; text-align: center; padding: 80px 20px; }
.cta-section h2 { color: var(--gold); margin-bottom: 15px; font-size: 2.2rem; }
.contact-btn { display: inline-block; margin-top: 25px; background: var(--gold); color: var(--navy-blue); text-decoration: none; font-weight: bold; padding: 15px 40px; border-radius: 30px; transition: 0.3s; cursor: pointer; border: none; }
.contact-btn:hover { transform: scale(1.05); box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4); }

/* FOOTER */
footer { background: #050d1a; color: white; padding: 50px 30px 20px; }
.footer-content { display: flex; justify-content: space-around; gap: 30px; flex-wrap: wrap; max-width: 1200px; margin: 0 auto; }
.footer-column { min-width: 250px; }
.footer-column h3 { margin-bottom: 15px; color: var(--gold); }
.footer-column ul { list-style: none; }
.footer-column li { margin-bottom: 10px; cursor: pointer; transition: 0.2s; }
.footer-column li:hover a { color: var(--gold) !important; }
.social-icons { display: flex; gap: 10px; }
.social-icons img { width: 40px; height: 40px; border-radius: 50%; transition: transform 0.3s; }
.social-icons img:hover { transform: scale(1.1); }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid #333; text-align: center; color: #888; }

/* INNER PAGES */
.inner-page { background: var(--navy-blue); min-height: 100vh; }
.centered-header { 
    background: var(--navy-blue); 
    padding: 20px 40px; 
    display: flex; 
    flex-direction: row; 
    align-items: center; 
    justify-content: flex-start; /* მარცხნივ გასწორება */
    border-bottom: 1px solid var(--gold); 
    gap: 20px; 
    flex-wrap: wrap;
}
.brand-center { display: flex; align-items: center; gap: 15px; }
.brand-center .small-logo { height: 50px; filter: drop-shadow(0 2px 5px rgba(0,0,0,0.5)); }

.back-arrow { 
    color: var(--gold); 
    text-decoration: none; 
    font-size: 1.2rem; 
    font-weight: bold; 
    display: flex; 
    align-items: center; 
    transition: 0.3s; 
    white-space: nowrap; 
}
.back-arrow:hover { color: var(--white); transform: translateX(-5px); }

.header-controls { width: 100%; display: flex; margin-top: 10px; }

.tour-details-container { max-width: 1100px; margin: 50px auto; padding: 30px; background: var(--white); border-radius: 20px; display: flex; gap: 40px; flex-wrap: wrap; box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.tour-details-image { flex: 1; min-width: 300px; max-width: 100%; height: 400px; object-fit: cover; border-radius: 15px; border: 2px solid var(--gold); }
.tour-details-info { flex: 1; min-width: 300px; }
.tour-details-info h1 { color: var(--navy-blue); margin-bottom: 25px; font-size: 2.2rem; border-bottom: 2px solid var(--gold); padding-bottom: 10px; }
.tour-details-list { list-style: none; margin-bottom: 30px; }
.tour-details-list li { font-size: 1.1rem; color: #333; padding: 12px 0; border-bottom: 1px solid #ddd; }
.tour-details-list strong { color: var(--navy-blue); display: inline-block; width: 120px; }

.tour-extra-info { background: rgba(212, 175, 55, 0.1); border-left: 4px solid var(--gold); padding: 15px 20px; margin-bottom: 25px; border-radius: 5px; }
.tour-extra-info h4 { color: var(--navy-blue); margin-bottom: 8px; font-size: 1.1rem; }
.tour-extra-info p { color: #444; font-size: 0.95rem; line-height: 1.6; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; max-width: 1200px; margin: 0 auto; padding: 20px; }
.gallery-grid img { width: 100%; height: 250px; object-fit: cover; border-radius: 15px; border: 2px solid var(--gold); transition: transform 0.3s; cursor: pointer; }
.gallery-grid img:hover { transform: scale(1.05); box-shadow: 0 10px 20px rgba(212, 175, 55, 0.3); }

.inner-page .section-title { color: var(--gold); }
.inner-page .tours-section { background: transparent; }

/* MODALS */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(10, 25, 47, 0.8); z-index: 2000; justify-content: center; align-items: center; backdrop-filter: blur(5px); }
.modal-content { background: var(--white); padding: 40px; border-radius: 20px; width: 90%; max-width: 400px; text-align: center; position: relative; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.close-btn { position: absolute; top: 15px; right: 20px; font-size: 1.8rem; color: var(--navy-blue); cursor: pointer; font-weight: bold; transition: 0.2s; }
.close-btn:hover { color: var(--red); }

#contact-form { display: flex; flex-direction: column; gap: 15px; margin-top: 15px; }
#contact-form input { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 8px; font-size: 1rem; outline: none; transition: 0.3s; }
#contact-form input:focus { border-color: var(--gold); box-shadow: 0 0 5px rgba(212, 175, 55, 0.5); }
#contact-form button { background: var(--gold); color: var(--navy-blue); border: none; padding: 12px; border-radius: 8px; font-weight: bold; cursor: pointer; font-size: 1.1rem; transition: 0.3s; }
#contact-form button:hover { background: var(--navy-blue); color: var(--gold); }

.booking-content p { font-size: 1.2rem; color: var(--navy-blue); margin-bottom: 10px; font-weight: bold; }
.booking-socials { display: flex; justify-content: center; gap: 20px; margin-top: 25px; }
.booking-socials img { width: 50px; height: 50px; border-radius: 50%; transition: transform 0.3s, box-shadow 0.3s; }
.booking-socials img:hover { transform: scale(1.15); box-shadow: 0 5px 15px rgba(212, 175, 55, 0.5); }

/* ================================= */
/* RESPONSIVE DESIGN */
/* ================================= */

@media (max-width: 992px) {
    .tours-container { gap: 20px; }
    .hero h1 { font-size: 2.5rem; }
}

@media (max-width: 768px) {
    /* ჰიდერი და საძიებო ველი მობილურზე */
    header { 
        flex-wrap: wrap; 
        padding: 15px 20px; 
    }
    .header-left { order: 1; flex: 0 0 auto; }
    .header-right { order: 2; flex: 0 0 auto; }
    
    .header-search { 
        display: flex !important; 
        order: 3; 
        flex: 0 0 100%; /* სრული სიგანე, ახალ ხაზზე */
        margin: 20px 0 0 0; 
        flex-wrap: wrap; 
        gap: 10px; 
    }
    /* ინფუთების ლამაზად გადანაწილება ერთ ხაზზე/სივრცეში */
    .header-search input[type="text"] { flex: 1 1 100%; width: 100%; }
    .header-search input[type="date"] { flex: 1 1 calc(50% - 5px); }
    .header-search button { flex: 1 1 100%; width: 100%; }

    .menu-icon { font-size: 0.85rem; padding: 8px 15px; border-radius: 25px; }
    .lang-switch { font-size: 0.85rem; }

    .hero { min-height: 70vh; }
    .hero h1 { font-size: 2rem; }
    .hero-logo { width: 220px; }
    
    .tours-section { padding: 40px 20px; }
    .tour-card { width: 100%; max-width: 400px; }
    
    .footer-content { flex-direction: column; text-align: center; gap: 40px; }
    .social-icons { justify-content: center; }
    .modal-content { width: 95%; padding: 25px; }
    
    /* შიდა გვერდების რესპონსივი (გვერდი-გვერდ დალაგება) */
    .centered-header { 
        padding: 15px 20px; 
        gap: 15px; 
    }
    .back-arrow { font-size: 1.1rem; }
    .brand-center .brand-name { font-size: 1.4rem; }
    .brand-center .small-logo { height: 35px; }

    .tour-details-container { padding: 15px; }
    .tour-details-image { height: 250px; }
}

@media (max-width: 576px) {
    .menu-icon { padding: 6px 14px; }
    .brand-name { font-size: 1.5rem; }
    .hero p { font-size: 1rem; }
}


/* ტურის ბარათების ფოტოების სწორი პროპორცია */
.tour-card img, .clickable-img {
    width: 100%;
    height: 250px;       /* შეგიძლია შეცვალო სასურველ სიმაღლეზე */
    object-fit: cover;   /* ეს კრძალავს გაწელვას და ინარჩუნებს პროპორციას */
    object-position: center; /* ფოკუსი იქნება ცენტრში */
}

/* დეტალური გვერდის ფოტოს გასწორება */
#detail-image {
    width: 100%;
    max-height: 500px;   /* მაქსიმალური სიმაღლე, რომ ეკრანი არ წაიღოს */
    object-fit: cover;
    border-radius: 8px;  /* ოდნავ დაუმრგვალებს კუთხეებს */
}

/* გალერეის/ფოტოკოლაჟის ფოტოების გასწორება */
#gallery-container img, .gallery-admin-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
}


/* ტურის ბარათების ფოტოები 1:1 ფორმატში */
.tour-card img, .clickable-img {
    width: 100%;
    aspect-ratio: 1 / 1; 
    object-fit: cover;   
    object-position: center;
}

/* დეტალური გვერდის მთავარი ფოტო */
#detail-image {
    width: 100%;
    aspect-ratio: 1 / 1; 
    max-height: 500px;   
    object-fit: cover;
    border-radius: 8px;
}

/* გალერეის/ფოტოკოლაჟის ფოტოები 1:1 ფორმატში */
#gallery-container img, .gallery-admin-item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 6px;
}