/* ============================================
   NextTime - Shared Theme CSS
   Real Estate Developer Website
   ============================================ */

/* ----- CSS Variables ----- */
:root {
    --gold: #C9A227;
    --gold-light: #E8C547;
    --gold-dark: #9A7B1A;
    --gold-glow: rgba(201, 162, 39, 0.3);
    --black: #0D0D0D;
    --dark: #141414;
    --dark-gray: #1E1E1E;
    --gray: #2D2D2D;
    --light-gray: #888;
    --white: #FFFFFF;
    --cream: #FDF8E8;
    --accent-blue: #4A90D9;
    --accent-green: #34C759;
}

/* ----- Reset & Base ----- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Noto Sans Georgian', 'Noto Sans', sans-serif;
    background: var(--black);
    color: var(--white);
    overflow-x: hidden;
}

::selection { background: var(--gold); color: var(--black); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--dark); }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--gold), var(--gold-dark)); border-radius: 5px; }

/* ----- Container ----- */
.container { max-width: 1400px; margin: 0 auto; padding: 0 50px; }

/* ----- Navigation ----- */
nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    padding: 20px 50px; display: flex; justify-content: space-between; align-items: center;
    transition: all 0.4s ease; background: transparent;
}
nav.scrolled { background: rgba(13, 13, 13, 0.95); backdrop-filter: blur(20px); padding: 15px 50px; }

.logo { text-decoration: none; display: flex; align-items: center; }
.logo img { height: clamp(35px, 5vw, 40px); transition: all 0.3s ease; }
nav.scrolled .logo img { height: 30px; }

.nav-links { display: flex; gap: 40px; list-style: none; }

.lang-switcher { display: flex; gap: 4px; margin-left: 10px; }
.lang-btn {
    padding: 6px 12px; font-size: 12px; font-weight: 700; letter-spacing: 0.5px;
    color: var(--light-gray); background: transparent; border: 1.5px solid var(--gray);
    border-radius: 6px; cursor: pointer; transition: all 0.3s ease;
    font-family: 'Space Grotesk', sans-serif; text-decoration: none;
}
.lang-btn:hover { color: var(--white); border-color: var(--gold); }
.lang-btn.active { color: var(--black); background: var(--gold); border-color: var(--gold); }

.nav-links a {
    color: var(--white); text-decoration: none; font-size: 15px; font-weight: 500;
    position: relative; padding: 8px 0; transition: all 0.3s ease;
}
.nav-links a::before {
    content: ''; position: absolute; bottom: 0; left: 50%; width: 0; height: 3px;
    background: var(--gold); transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); transform: translateX(-50%); border-radius: 2px;
}
.nav-links a:hover { color: var(--gold); }
.nav-links a:hover::before { width: 100%; }
.nav-links a.active-link { color: var(--gold); }
.nav-links a.active-link::before { width: 100%; }

.scroll-progress {
    position: fixed; top: 0; left: 0; height: 3px; z-index: 1001;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    width: 0%; transition: width 0.1s linear;
    box-shadow: 0 0 10px var(--gold-glow);
}

.section-glow {
    position: relative;
}
.section-glow::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(ellipse at 50% 0%, rgba(201, 162, 39, 0.12) 0%, transparent 60%);
    opacity: 0; pointer-events: none; z-index: 0;
    animation: sectionGlowPulse 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes sectionGlowPulse {
    0% { opacity: 0; }
    30% { opacity: 1; }
    100% { opacity: 0; }
}

.nav-landed .reveal.active {
    animation: navLandReveal 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes navLandReveal {
    0% { opacity: 0.6; transform: translateY(12px); }
    100% { opacity: 1; transform: translateY(0); }
}

.nav-cta { display: flex; align-items: center; gap: 25px; }
.nav-phone { color: var(--gold); text-decoration: none; font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.nav-phone svg { width: 18px; height: 18px; }

.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; z-index: 1001; padding: 5px; }
.hamburger span { width: 28px; height: 3px; background: var(--white); border-radius: 2px; transition: all 0.3s ease; }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

.mobile-menu {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100dvh;
    background: rgba(13, 13, 13, 0.98); z-index: 999; flex-direction: column;
    align-items: center; justify-content: center; gap: 30px;
    overflow-y: auto; padding: 80px 20px 30px;
}
.mobile-menu.active { display: flex; }
.mobile-menu a { color: var(--white); text-decoration: none; font-size: 24px; font-weight: 600; transition: color 0.3s; }
.mobile-menu a:hover { color: var(--gold); }

/* ----- Buttons ----- */
.btn {
    padding: 14px 32px; font-size: 14px; font-weight: 600; text-decoration: none;
    border: none; cursor: pointer; font-family: 'Noto Sans Georgian', sans-serif; transition: all 0.3s ease;
    display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%); color: var(--black);
    clip-path: polygon(0 0, 100% 0, 100% 70%, 90% 100%, 0 100%);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 10px 30px var(--gold-glow); }
.btn-outline { background: transparent; color: var(--white); border: 2px solid var(--gold); border-radius: 8px; }
.btn-outline:hover { background: var(--gold); color: var(--black); }

/* ----- Section Label ----- */
.section-label {
    display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600;
    color: var(--gold); text-transform: uppercase; letter-spacing: 3px; margin-bottom: 20px;
}
.section-label::before { content: ''; width: 30px; height: 2px; background: var(--gold); }

/* ----- Footer ----- */
footer { background: var(--black); padding: 80px 0 40px; border-top: 1px solid var(--gray); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 60px; margin-bottom: 60px; }
.footer-brand .logo { margin-bottom: 20px; }
.footer-brand p { font-size: 15px; color: var(--light-gray); line-height: 1.8; margin-bottom: 25px; }
.footer-social { display: flex; gap: 12px; }
.footer-social a {
    width: 45px; height: 45px; background: var(--dark-gray); border: 1px solid var(--gray);
    border-radius: 12px; display: flex; align-items: center; justify-content: center;
    color: var(--white); text-decoration: none; transition: all 0.3s ease;
}
.footer-social a:hover { background: var(--gold); border-color: var(--gold); color: var(--black); }
.footer-social a svg { width: 20px; height: 20px; }
.footer-column h4 { font-size: 18px; font-weight: 600; margin-bottom: 25px; color: var(--gold); }
.footer-column ul { list-style: none; }
.footer-column li { margin-bottom: 15px; }
.footer-column a { color: var(--light-gray); text-decoration: none; font-size: 15px; transition: all 0.3s ease; }
.footer-column a:hover { color: var(--gold); padding-left: 5px; }
.footer-bottom {
    padding-top: 40px; border-top: 1px solid var(--gray);
    display: flex; justify-content: space-between; align-items: center;
    color: var(--light-gray); font-size: 14px;
}

/* ----- Chat Widget ----- */
.chat-widget {
    position: fixed; bottom: 30px; right: 30px; z-index: 900;
}
.chat-toggle {
    width: 65px; height: 65px; border-radius: 50%;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    border: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 30px var(--gold-glow);
    transition: all 0.3s ease; position: relative;
}
.chat-toggle:hover { transform: scale(1.1); box-shadow: 0 12px 40px var(--gold-glow); }
.chat-toggle svg { width: 28px; height: 28px; color: var(--black); transition: all 0.3s ease; }
.chat-toggle.active svg.chat-icon { display: none; }
.chat-toggle svg.close-icon { display: none; }
.chat-toggle.active svg.close-icon { display: block; }

.chat-badge {
    position: absolute; top: -2px; right: -2px; width: 18px; height: 18px;
    background: var(--accent-green); border-radius: 50%; border: 3px solid var(--black);
}

.chat-window {
    position: absolute; bottom: 80px; right: 0; width: 370px;
    background: var(--dark); border: 1px solid var(--gray); border-radius: 25px;
    overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    display: none; flex-direction: column;
    animation: chatSlideUp 0.3s ease;
}
.chat-window.active { display: flex; }
@keyframes chatSlideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.chat-header {
    padding: 20px 25px; background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    display: flex; align-items: center; gap: 15px;
}
.chat-header-avatar {
    width: 45px; height: 45px; border-radius: 50%; background: var(--black);
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.chat-header-avatar img { height: 30px; }
.chat-header-info h4 { font-size: 16px; font-weight: 700; color: var(--black); }
.chat-header-info span { font-size: 12px; color: rgba(0,0,0,0.6); }

.chat-body { padding: 25px; min-height: 200px; max-height: 300px; overflow-y: auto; }
.chat-message {
    background: var(--dark-gray); border: 1px solid var(--gray); padding: 15px 18px;
    border-radius: 18px 18px 18px 4px; font-size: 14px; line-height: 1.6;
    color: rgba(255,255,255,0.9); margin-bottom: 10px;
}
.chat-message-time { font-size: 11px; color: var(--light-gray); }

.chat-platforms { padding: 0 25px 20px; }
.chat-platforms p { font-size: 12px; color: var(--light-gray); margin-bottom: 10px; }
.chat-platform-links { display: flex; gap: 10px; }
.chat-platform-btn {
    flex: 1; padding: 12px; border-radius: 12px; border: 1px solid var(--gray);
    background: var(--dark-gray); color: var(--white); font-size: 13px; font-weight: 600;
    cursor: pointer; transition: all 0.3s ease; text-decoration: none;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    font-family: 'Noto Sans Georgian', sans-serif;
}
.chat-platform-btn:hover { border-color: var(--gold); color: var(--gold); }
.chat-platform-btn svg { width: 18px; height: 18px; }

/* ----- Utility: Reveal Animation ----- */
.reveal { opacity: 0; transform: translateY(50px); transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* ============================================
   Responsive Breakpoints
   ============================================ */

@media (max-width: 1200px) {
    .container { padding: 0 30px; }
    nav { padding: 20px 30px; }
}

@media (max-width: 900px) {
    .nav-links { display: none; }
    .hamburger { display: flex; }
    .nav-phone { display: none; }
    .nav-cta .btn-primary { display: none; }
    .nav-cta .lang-switcher { display: none; }
    .nav-cta { gap: 10px; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .container { padding: 0 16px; }
    nav { padding: 12px 16px; }
    .lang-btn { padding: 5px 9px; font-size: 10px; border-radius: 5px; }
    .logo img { height: 28px; }
    nav.scrolled .logo img { height: 24px; }
    .chat-widget { bottom: 16px; right: 16px; }
    .chat-toggle { width: 52px; height: 52px; }
    .chat-toggle svg { width: 22px; height: 22px; }
    .chat-badge { width: 14px; height: 14px; border-width: 2px; }
    .chat-window { width: calc(100vw - 32px); right: -8px; bottom: 65px; border-radius: 20px; }
    .chat-header { padding: 15px 18px; }
    .chat-header-avatar { width: 38px; height: 38px; }
    .chat-header-avatar img { height: 24px; }
    .chat-header-info h4 { font-size: 14px; }
    .chat-header-info span { font-size: 11px; }
    .chat-body { padding: 16px; min-height: 120px; max-height: 200px; }
    .chat-message { padding: 12px 14px; font-size: 13px; border-radius: 14px 14px 14px 4px; }
    .chat-platforms { padding: 0 16px 14px; }
    .chat-platform-btn { padding: 10px; font-size: 12px; border-radius: 10px; }
    footer { padding: 50px 0 25px; }
    .footer-brand p { font-size: 13px; }
    .footer-social a { width: 40px; height: 40px; border-radius: 10px; }
    .footer-social a svg { width: 18px; height: 18px; }
    .footer-column h4 { font-size: 15px; margin-bottom: 15px; }
    .footer-column a { font-size: 13px; }
    .footer-column li { margin-bottom: 12px; }
    .footer-bottom { font-size: 12px; padding-top: 25px; }
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-height: 500px) and (orientation: landscape) {
    nav { padding: 8px 16px; }
    .logo img { height: 22px; }
    nav.scrolled .logo img { height: 20px; }
    .lang-btn { padding: 3px 7px; font-size: 9px; }
    .hamburger span { width: 22px; height: 2px; }
    .hamburger { gap: 4px; }
    .chat-toggle { width: 42px; height: 42px; }
    .chat-toggle svg { width: 18px; height: 18px; }
    .chat-widget { bottom: 10px; right: 10px; }
    .chat-badge { width: 12px; height: 12px; border-width: 2px; }
    /* Mobile menu in landscape: smaller text, compact, scrollable */
    .mobile-menu {
        gap: 14px;
        padding: 55px 20px 20px;
        justify-content: flex-start;
    }
    .mobile-menu a { font-size: 16px; }
}
