/*
Theme Name: CaglarTur Theme
Theme URI: https://caglartur.com.tr
Author: CaglarTur
Author URI: https://caglartur.com.tr
Description: Custom premium dark theme for CaglarTur
Version: 1.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: caglartur-theme
*/

:root {
    --ct-gold: #d4af37;
    --ct-sand: #c2b280;
    --ct-desert-red: #8b4513;
    --ct-dark: #121212;
    --ct-dark-surface: #1e1e1e;
    --ct-text-main: #fcfcfc;
    --ct-text-muted: #bcbcbc;
}

.text-muted,
.text-white-50 {
    color: #bcbcbc !important;
}

::placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
}

body {
    background: radial-gradient(circle at top, #1a1a1a 0%, var(--ct-dark) 100%);
    color: var(--ct-text-main);
    font-family: 'Outfit', sans-serif;
    overflow-x: hidden;
    max-width: 100vw;
}

/* Modal Z-index Fix */
.modal {
    z-index: 10060 !important;
}

.modal-backdrop {
    z-index: 10050 !important;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--ct-dark);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

/* Tour Filter Tags */
.filter-btn {
    border-radius: 30px;
    padding: 6px 18px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    border-width: 2px;
}

.filter-btn.active {
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
    /* Using raw warning color since variable might not be available in CSS context as RGB */
}

.tour-item {
    transition: all 0.4s ease-in-out;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--ct-gold);
}

/* Navbar - Glassmorphism */
.navbar {
    background: rgba(18, 18, 18, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

/* Logo & Navbar Brand Restrictions */
.navbar-brand {
    max-height: 60px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
}

.navbar-brand img,
.navbar-brand svg,
.navbar-brand .custom-logo,
.navbar-brand .custom-logo-link img,
.custom-logo {
    max-height: 50px !important;
    height: 50px !important;
    width: auto !important;
    max-width: 200px !important;
    object-fit: contain !important;
    display: block !important;
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--ct-gold) !important;
}

/* Buttons */
.btn-kuga {
    background: linear-gradient(135deg, #ffdb57 0%, #d4af37 100%);
    /* Brighter Gold */
    color: #000;
    border: 1px solid rgba(255, 255, 255, 0.2);
    /* Slight border for definition */
    font-weight: 700;
    /* Bolder text */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    /* Stronger flow */
}

.btn-kuga:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(208, 172, 108, 0.4);
    color: #000;
}

.btn-outline-primary {
    color: var(--ct-gold);
    border-color: var(--ct-gold);
}

.btn-outline-primary:hover {
    background-color: var(--ct-gold);
    border-color: var(--ct-gold);
    color: #000;
}

/* Cards */
.card-tour {
    background-color: var(--ct-dark-surface);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-tour:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    border-color: var(--ct-gold);
}

.card-title {
    color: var(--ct-text-main);
}

.text-primary {
    color: var(--ct-gold) !important;
}

/* Hero Carousel */
.carousel-caption {
    background: transparent;
    width: 100%;
    left: 0;
    bottom: 0;
    padding-bottom: 5rem !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 10;
}

.carousel-caption h1 {
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.8);
    max-width: 800px;
    margin: 0 auto;
}

.italic-gold {
    font-style: italic;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 1.5px;
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

.hero-img-overlay {
    transition: transform 10s ease-in-out;
}

.carousel-item.active .hero-img-overlay {
    transform: scale(1.1);
}

.hero-static-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
    pointer-events: none;
    /* Let clicks pass to admin buttons if needed, but we'll put buttons inside */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.2) 50%, transparent 100%);
}

.hero-static-overlay>* {
    pointer-events: auto;
    /* Re-enable clicks for buttons/links */
}

/* Modals */
.modal-content.bg-dark {
    background-color: #222 !important;
    border: 1px solid #333;
}

/* Utils */
.text-warning {
    color: var(--ct-gold) !important;
}

.bg-warning {
    background-color: var(--ct-gold) !important;
}

.btn-warning {
    background-color: var(--ct-gold) !important;
    border-color: var(--ct-gold) !important;
    color: #000;
}

/* Container & Row Overflow Fixes */
.container,
.container-fluid {
    overflow-x: hidden;
    max-width: 100%;
}

.row {
    margin-left: 0;
    margin-right: 0;
}

.row>* {
    padding-left: calc(var(--bs-gutter-x) * 0.5);
    padding-right: calc(var(--bs-gutter-x) * 0.5);
}

/* Custom Animation Utils */
.flower-alive {
    display: inline-block;
    animation: flowerSway 3s infinite ease-in-out;
}

@keyframes flowerSway {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

/* Animated Border Button */
.btn-ani-border {
    position: relative;
    padding: 12px 30px;
    background: #000;
    color: var(--ct-gold);
    border: none;
    border-radius: 50px;
    font-weight: 600;
    z-index: 1;
    overflow: hidden;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 14px;
}

.btn-ani-border::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent,
            var(--ct-gold),
            transparent 30%);
    animation: rotateBorder 3s linear infinite;
    transform: translate(-50%, -50%);
    z-index: -1;
}

.btn-ani-border::after {
    content: '';
    position: absolute;
    inset: 2px;
    background: #121212;
    border-radius: inherit;
    z-index: -1;
    transition: background 0.3s;
}

.btn-ani-border:hover {
    color: #fff;
    transform: scale(1.05);
}

.btn-ani-border:hover::after {
    background: #000;
}

@keyframes rotateBorder {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Animations */
.slide-up {
    animation: slideUpFade 0.8s ease-out forwards;
}

.slide-up-delay-1 {
    opacity: 0;
    animation: slideUpFade 0.8s ease-out 0.2s forwards;
}

.slide-up-delay-2 {
    opacity: 0;
    animation: slideUpFade 0.8s ease-out 0.4s forwards;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Nav overrides */
.mobile-bottom-nav {
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-kuga-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--ct-gold);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    box-shadow: 0 0 10px rgba(208, 172, 108, 0.4);
}

/* Administrative Edit Buttons */
.admin-edit-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--ct-gold);
    color: #000;
    display: none;
    /* Hidden by default, shown for logged-in admins */
    align-items: center;
    justify-content: center;
    border: 2px solid #000;
    font-size: 14px;
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.2s;
}

body.admin-logged-in .admin-edit-btn {
    display: flex;
}

.admin-edit-btn:hover {
    transform: scale(1.1);
    background: #fff;
}

.position-relative-admin {
    position: relative !important;
}

/* Footer Polish */
.footer-section h5 {
    color: var(--ct-gold);
    letter-spacing: 1px;
}

.footer-section p {
    line-height: 1.6;
}

.social-links a {
    transition: transform 0.3s, color 0.3s;
}

.social-links a:hover {
    transform: translateY(-3px);
    color: var(--ct-gold) !important;
}

/* Chat UI Refinements */
.chat-wrapper {
    min-height: 500px;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-group-item.active {
    background: rgba(212, 175, 55, 0.1) !important;
    border-left: 3px solid var(--ct-gold);
}

.chat-messages::-webkit-scrollbar {
    width: 5px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

/* Mobile Chat Layout */
@media (max-width: 768px) {
    .chat-wrapper {
        position: relative;
        height: calc(100vh - 65px) !important;
        overflow: hidden;
    }

    .chat-sidebar {
        position: absolute;
        top: 0;
        right: 0;
        width: 100% !important;
        height: 100%;
        z-index: 1000;
        display: none !important;
        /* Managed by JS */
        background: var(--ct-dark);
    }

    .chat-sidebar.active {
        display: flex !important;
    }

    .chat-main {
        width: 100%;
        height: 100%;
    }

    /* Hide sidebar arrow on mobile if not in chat */
    #show-sidebar {
        display: none !important;
    }
}

/* Sidebar Right Alignment Desktop */
@media (min-width: 768px) {
    .chat-sidebar {
        order: 2;
    }

    .chat-main {
        order: 1;
    }

    #show-sidebar {
        display: none !important;
    }
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 65px;
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 9999;
}

.nav-item-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 10px;
    transition: all 0.3s ease;
}

.nav-item-btn i {
    font-size: 20px;
    margin-bottom: 4px;
}

.nav-item-btn:hover,
.nav-item-btn.active {
    color: var(--ct-gold);
}

.nav-item-btn.btn-center {
    background: var(--ct-gold);
    color: #000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-top: -30px;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    border: 3px solid #121212;
}

.nav-item-btn.btn-center i {
    margin-bottom: 0;
    font-size: 24px;
}

/* Standalone Chat Layout */
.standalone-chat {
    height: 100vh;
    /* Use vh for compatibility */
    height: 100dvh;
    /* Use dvh for mobile browsers */
    overflow: hidden;
    background: #0b141a;
    padding-bottom: 0 !important;
    display: flex;
    flex-direction: column;
}

.standalone-chat .chat-app-container {
    flex: 1;
    height: 100%;
    overflow: hidden;
}

.chat-wrapper {
    height: 100%;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    /* Ensure it scrolls */
    min-height: 0;
    /* Important flex fix */
}

/* Layout overlap fix */
body {
    padding-bottom: 65px;
}

@media (min-width: 768px) {
    body {
        padding-bottom: 0;
    }

    .mobile-bottom-nav {
        display: none;
    }
}

/* Tour Program & Planning Styles */
.program-item {
    transition: all 0.3s ease;
    padding: 10px;
    border-radius: 12px;
}

.program-item:hover {
    background: rgba(255, 255, 255, 0.03);
    transform: translateX(5px);
}

.step-num {
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
    font-size: 14px;
}

.admin-tour-edit-btn {
    border-radius: 30px;
    padding: 10px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
}

.admin-tour-edit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.3);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.02);
}

.modal {
    z-index: 10060;
}

.modal-backdrop {
    z-index: 10050;
}

/* Tour Hero Responsiveness */
@media (max-width: 768px) {
    .tour-hero .hero-image {
        height: 40vh !important;
    }

    .tour-hero .hero-overlay {
        padding: 2rem 1rem !important;
    }

    .admin-tour-edit-btn {
        padding: 8px 15px;
        font-size: 12px;
    }
}

/* Instagram-style Stories */
.stories-wrapper::-webkit-scrollbar {
    display: none;
}

.stories-wrapper {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.story-circle.gradient-border {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    padding: 3px !important;
}

.story-item:hover .story-circle {
    transform: scale(1.05);
}

.story-item:active .story-circle {
    transform: scale(0.95);
    opacity: 0.8;
}