/* =========================================
   1. CORE VARIABLES & RESET
   ========================================= */
:root {
    /* Palette */
    --bg-rice: #F9F8F6;
    --bg-stone: #E8E6E1;
    --bg-sage: #DDE2DE;
    --bg-volcanic: #181818;
    --bg-color: var(--bg-rice);
    --accent-dark: #6f5b41;
    
    --text-main: #222222;
    --text-muted: #66605B;
    --text-light: #F9F8F6;
    --text-light-muted: rgba(249, 248, 246, 0.6);
    
    --accent: #9C8260;
    --accent-hover: #7D6649;
    
    /* Typography */
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Manrope', sans-serif;
    
    /* Spacing */
    --space-section: 140px;
    
    /* Shadows & Effects */
    --shadow-float: 0 20px 60px rgba(0,0,0,0.08);
    --shadow-card: 0 15px 40px -10px rgba(0,0,0,0.05);
    --shadow-hover: 0 30px 60px -12px rgba(0,0,0,0.1);
    
    --glass: rgba(255, 255, 255, 0.85);
    --glass-blur: blur(20px);
    
    --radius-lg: 12px;
    --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
}

@media (max-width: 768px) {
    :root { --space-section: 100px; }
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    background-color: var(--bg-rice);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.8;
    overflow-x: hidden;
    
    /* Safe Area tugi iPhone'ile */
    padding-bottom: calc(80px + env(safe-area-inset-bottom));
    
    /* Visuals */
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Noise overlay texture */
body::before {
    content:"";
    position:fixed; inset:0;
    pointer-events:none;
    opacity:.035;
    mix-blend-mode:multiply;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
    z-index: 9999;
}

@media (min-width: 1024px) { body { padding-bottom: 0; } }

h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 400; line-height: 1.15; }
a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
ul { list-style: none; }
img { display: block; max-width: 100%; height: auto; }
input, select, button { font-family: inherit; outline: none; }
:focus-visible { outline: 2px solid rgba(156,130,96,0.65); outline-offset: 3px; border-radius: 10px; }

/* =========================================
   2. LAYOUT UTILITIES & ANIMATIONS
   ========================================= */
.container { max-width: 1280px; margin: 0 auto; padding: 0 25px; }
@media (min-width: 768px) { .container { padding: 0 40px; } }

.section { padding: var(--space-section) 0; position: relative; }
.bg-stone { background-color: var(--bg-stone); }
.bg-sage { background-color: var(--bg-sage); }
.bg-dark { background-color: var(--bg-volcanic); color: var(--text-light); }
.bg-gradient-soft { background: linear-gradient(180deg, var(--bg-color) 0%, #F2EFE9 100%); }

.header-center { text-align: center; max-width: 800px; margin: 0 auto 60px; }
.header-center span, .header-left span, .section-tag { display: block; text-transform: uppercase; letter-spacing: 0.15em; font-size: 0.75rem; font-weight: 600; color: var(--accent); margin-bottom: 15px; }
.header-center h2, .header-left h2 { font-size: 2.5rem; letter-spacing: -0.015em; }
.header-left h2 { margin-bottom: 20px; }
@media (min-width: 768px) { .header-center h2, .header-left h2 { font-size: 3.5rem; } }

.text-muted { color: var(--text-muted); }
.text-light { color: var(--text-light); }
.text-light-muted { color: var(--text-light-muted); }
.text-center { text-align: center; }

/* Components */
.divider { display: flex; align-items: center; justify-content: center; margin: 0px 0; opacity: 0.4; }
.divider::before, .divider::after { content: ''; height: 1px; width: 60px; background: var(--accent); margin: 0 20px; }
.divider i { font-size: 1.5rem; color: var(--accent); }

.pattern-overlay {
    position: absolute; inset: 0; opacity: 0.05; pointer-events: none;
    background-image: radial-gradient(var(--accent) 0.8px, transparent 0.8px);
    background-size: 32px 32px;
}
.bg-dark .pattern-overlay { opacity: 0.08; background-image: radial-gradient(#fff 0.8px, transparent 0.8px); }

/* Animations */
.reveal { opacity: 0; transform: translateY(40px); transition: all 1s var(--ease-out); }
.reveal.active { opacity: 1; transform: translateY(0); }

@keyframes breathe {
    0% { transform: scale(1.05); }
    100% { transform: scale(1.15); }
}

@media (prefers-reduced-motion: reduce){
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* =========================================
   3. NAVIGATION
   ========================================= */
.nav-desktop {
    position: fixed; top: 0; width: 100%; padding: 25px 50px; z-index: 100;
    display: none; justify-content: space-between; align-items: center; transition: background 0.4s, padding 0.4s;
}
@media (min-width: 1024px) { .nav-desktop { display: flex; } }
.nav-desktop.scrolled { background: rgba(249, 248, 246, 0.95); backdrop-filter: blur(15px); padding: 15px 50px; border-bottom: 1px solid rgba(0,0,0,0.05); }

.logo { font-family: var(--font-serif); font-size: 1.6rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-main); font-weight: 600; }
.nav-menu { display: flex; gap: 40px; align-items: center; }
.nav-menu a { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 500; }
.nav-menu a:hover { color: var(--accent); }

/* Nav Dropdown (The Network) */
.nav-dropdown-group { position: relative; height: 100%; display: flex; align-items: center; }
.nav-link-trigger { display: flex; align-items: center; gap: 4px; cursor: pointer; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 500; padding: 10px 0; }
.nav-link-trigger i { font-size: 0.8rem; color: var(--text-muted); transition: transform 0.3s ease; }
.nav-dropdown-list {
    position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(15px);
    background: #fff; min-width: 220px; padding: 10px; border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08); border: 1px solid rgba(0,0,0,0.05);
    opacity: 0; visibility: hidden; transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1); z-index: 1000;
}
.nav-dropdown-list::before {
    content: ''; position: absolute; top: -6px; left: 50%; transform: translateX(-50%) rotate(45deg);
    width: 12px; height: 12px; background: #fff; border-top: 1px solid rgba(0,0,0,0.05); border-left: 1px solid rgba(0,0,0,0.05);
}
.nav-dropdown-list a { display: flex; align-items: center; gap: 12px; padding: 12px 15px; color: var(--text-main); font-size: 0.9rem; font-weight: 500; border-radius: 8px; transition: 0.2s; white-space: nowrap; }
.nav-dropdown-list i { font-size: 1.1rem; color: var(--accent); }
.nav-dropdown-group:hover .nav-dropdown-list { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.nav-dropdown-group:hover .nav-link-trigger i { transform: rotate(180deg); color: var(--accent); }
.nav-dropdown-list a:hover { background: var(--bg-rice); color: var(--accent); padding-left: 20px; }

/* Language Select */
.lang-select { position: relative; cursor: pointer; display: flex; align-items: center; gap: 5px; font-size: 0.85rem; font-weight: 600; }
.lang-dropdown {
    position: absolute; top: 100%; right: 0; margin-top: 15px;
    background: #fff; padding: 10px; border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1); width: 140px;
    opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: all 0.3s ease; pointer-events: none;
}
.lang-select.active .lang-dropdown { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }
.lang-dropdown li { padding: 8px 12px; font-size: 0.9rem; color: var(--text-main); border-radius: 6px; transition: 0.2s; cursor: pointer; }
.lang-dropdown li:hover { background: var(--bg-stone); color: var(--accent); }

/* Mobile Nav Top */
.nav-mobile-top {
    position: fixed; top: 0; width: 100%; padding: 15px 20px; z-index: 99;
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    background: rgba(249, 248, 246, 0.98); /* Performance Fallback */
}
@supports (backdrop-filter: blur(10px)) {
    .nav-mobile-top { background: rgba(249, 248, 246, 0.85); backdrop-filter: blur(10px); }
}
@media (min-width: 1024px) { .nav-mobile-top { display: none; } }

/* Mobile Nav Bottom */
.nav-mobile-bottom {
    position: fixed; bottom: 0; width: 100%; z-index: 100;
    background: #fff; border-top: 1px solid rgba(0,0,0,0.05);
    display: flex; justify-content: space-around; 
    padding: 12px 0 calc(25px + env(safe-area-inset-bottom)) 0; /* Safe Area Fix */
    box-shadow: 0 -5px 20px rgba(0,0,0,0.03);
}
@media (min-width: 1024px) { .nav-mobile-bottom { display: none; } }
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--text-muted); font-size: 0.7rem; font-weight: 500; }
.nav-item i { font-size: 1.4rem; }
.nav-item.active { color: var(--accent); }

/* Mobile Search Overlay */
.mobile-search-overlay {
    position: fixed; inset: 0; z-index: 9999;
    padding: 30px;
    display: flex; flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    background: rgba(249, 248, 246, 0.98);
}
@supports (backdrop-filter: blur(10px)) {
    .mobile-search-overlay { background: rgba(249, 248, 246, 0.95); backdrop-filter: blur(10px); }
}
.mobile-search-overlay.open { transform: translateY(0); }
.search-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; }
.search-header h2 { font-size: 1.8rem; margin: 0; }
.btn-close { width: 40px; height: 40px; border-radius: 50%; background: #fff; border: 1px solid rgba(0,0,0,0.1); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; cursor: pointer; }
.mobile-filter-group { margin-bottom: 30px; }
.mobile-filter-group label { display: block; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 10px; font-weight: 600; }
.mobile-select { width: 100%; padding: 15px; border: 1px solid rgba(0,0,0,0.1); border-radius: 12px; background: #fff; font-size: 1.1rem; color: var(--text-main); font-family: var(--font-sans); appearance: none; }
.btn-mobile-search { width: 100%; padding: 20px; background: var(--text-main); color: #fff; border: none; border-radius: 12px; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.1em; margin-top: auto; display: flex; justify-content: center; align-items: center; gap: 10px; }


/* =========================================
   4. HERO SECTION
   ========================================= */
.hero { height: 100vh; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; padding-top: 60px; }
.hero::before {
    content:""; position:absolute; inset:0; z-index:1;
    background: radial-gradient(1200px 800px at 50% 40%, rgba(0,0,0,.25), transparent 60%), linear-gradient(to bottom, rgba(0,0,0,.35), rgba(0,0,0,.55));
    pointer-events:none;
}
.hero-bg {
    position:absolute; inset:0; z-index:1;
    background:url('https://images.unsplash.com/photo-1537996194471-e657df975ab4?q=80&w=2838&auto=format&fit=crop') center/cover;
    filter: brightness(0.85); transform: scale(1.08); animation: breathe 25s infinite alternate ease-in-out;
}
.hero-content { position: relative; z-index: 2; text-align: center; color: #fff; width: 100%; max-width: 850px; padding: 0 20px; }
.hero h1 { font-size: 3rem; margin-bottom: 20px; text-shadow: 0 10px 30px rgba(0,0,0,0.3); letter-spacing: -0.02em; font-weight: 500; }
.hero p { font-size: 1.2rem; opacity: 0.95; margin-bottom: 40px; font-weight: 300; max-width: 40ch; margin: 0 auto 40px; }

/* Glass Panel (Performance Optimized) */
.glass-panel {
    border-radius: 20px; box-shadow: var(--shadow-float);
    border: 1px solid rgba(255,255,255,0.55);
    box-shadow: 0 20px 60px rgba(0,0,0,0.10), inset 0 1px 0 rgba(255,255,255,0.35);
    background: rgba(255,255,255,0.95); /* Fallback */
}
@supports (backdrop-filter: blur(24px)) {
    .glass-panel {
        background: rgba(255,255,255,0.78);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
    }
}

.search-dock { display: flex; flex-direction: column; padding: 15px; margin-bottom: 40px; }
@media (min-width: 768px) { .search-dock { flex-direction: row; border-radius: 99px; padding: 10px 10px 10px 40px; align-items: center; gap: 30px; } }

.search-field { flex: 1; border-bottom: 1px solid rgba(0,0,0,0.1); padding: 10px 0; text-align: left; }
@media (min-width: 768px) { .search-field { border-bottom: none; border-right: 1px solid rgba(0,0,0,0.1); padding-right: 20px; } }
.search-field:last-child { border: none; }
.search-field label { display: block; font-size: 0.7rem; text-transform: uppercase; font-weight: 700; color: var(--text-muted); letter-spacing: 0.1em; margin-bottom: 5px; }

.select-wrapper { position: relative; width: 100%; }
.select-wrapper select { width: 100%; border: none; background: transparent; font-size: 1rem; color: var(--text-main); font-weight: 600; appearance: none; cursor: pointer; padding-right: 20px; }
.select-wrapper i { position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 0.8rem; color: var(--text-muted); pointer-events: none; }

.btn-search { width: 100%; height: 50px; background: var(--text-main); color: #fff; border: none; border-radius: 12px; cursor: pointer; font-size: 1.2rem; display: flex; align-items: center; justify-content: center; transition: 0.3s; margin-top: 10px; }
@media (min-width: 768px) { .btn-search { width: 60px; height: 60px; border-radius: 50%; margin-top: 0; } }
.btn-search:hover { background: var(--accent); transform: translateY(-1px); }

/* Tooltip & Proof */
.hero-proof { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.avatars { display: flex; }
.avatars img { width: 45px; height: 45px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.3); margin-left: -12px; object-fit: cover; cursor: pointer; transition: transform 0.3s ease, border-color 0.3s ease; position: relative; z-index: 2; }
.avatars img:hover, .avatars img.active { transform: scale(1.15); border-color: var(--accent); z-index: 3; }
.proof-text { font-size: 0.9rem; color: rgba(255,255,255,0.9); }

.testimonial-tooltip {
    position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%) translateY(10px);
    width: 280px; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px);
    padding: 15px 20px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    text-align: center; opacity: 0; visibility: hidden; transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 10; pointer-events: none; margin-bottom: 15px;
}
.testimonial-tooltip.visible { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.testimonial-tooltip::after { content: ''; position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%) rotate(45deg); width: 12px; height: 12px; background: rgba(255, 255, 255, 0.95); }
.t-name { display: block; font-size: 0.85rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.t-quote { font-family: var(--font-serif); font-style: italic; font-size: 1.1rem; color: var(--text-main); line-height: 1.3; margin: 0; }


/* =========================================
   5. PHILOSOPHY & LIFESTYLE SCROLL
   ========================================= */
.philo-grid { display: grid; gap: 40px; }
@media (min-width: 768px) { .philo-grid { grid-template-columns: 1fr 1fr; align-items: center; gap: 80px; } }
.philo-img { width: 100%; height: 350px; object-fit: cover; border-radius: 12px; box-shadow: var(--shadow-card); }
@media (min-width: 768px) { .philo-img { height: 550px; } }
.quote-box { border-left: 2px solid var(--accent); padding-left: 25px; margin-top: 40px; font-style: italic; font-family: var(--font-serif); font-size: 1.4rem; }

/* HORIZONTAL SCROLL CARDS (General) */
.full-width-scroll { width: 100vw; margin-left: calc(-50vw + 50%); margin-right: calc(-50vw + 50%); position: relative; }
.scroll-controls { display: none; justify-content: flex-end; gap: 10px; margin-bottom: 20px; padding-right: 40px; }
@media (min-width: 1024px) { .scroll-controls { display: flex; } }
.scroll-btn { width: 45px; height: 45px; border-radius: 50%; border: 1px solid var(--text-main); background: transparent; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.2s; }
.scroll-btn:hover { background: var(--text-main); color: #fff; }

.cards-container { display: flex; gap: 20px; overflow-x: auto; padding: 20px 25px 60px; scroll-snap-type: x mandatory; }
@media (min-width: 768px) { .cards-container { gap: 40px; padding: 20px calc((100vw - 1240px) / 2) 80px; } }
.cards-container::-webkit-scrollbar { display: none; }

.card { min-width: 85vw; height: 450px; position: relative; border-radius: 12px; overflow: hidden; scroll-snap-align: center; flex-shrink: 0; box-shadow: var(--shadow-card); border: 1px solid rgba(0,0,0,0.04); }
@media (min-width: 768px) { .card { min-width: 380px; height: 550px; scroll-snap-align: start; } }

/* TÄHTIS: Siin on sinu puuduv klass taastatud! */
.card-img { width: 100%; height: 100%; object-fit: cover; transition: 0.8s; }

.card:hover .card-img { transform: scale(1.05); }
.card-overlay { position: absolute; bottom: 0; left: 0; width: 100%; padding: 30px; background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); color: #fff; }
.card-overlay h3 { font-size: 1.8rem; margin-bottom: 5px; }


/* =========================================
   6. HORIZONTAL PIN SECTION
   ========================================= */
.pin-section { position: relative; height: 450vh; background-color: var(--bg-stone); overflow: visible; }
.pin-wrap-sticky { position: sticky; top: 0; height: 100vh; width: 100%; overflow: hidden; display: flex; flex-direction: column; padding: 40px 0 60px 0; }
.pin-header-container { flex-shrink: 0; position: relative; z-index: 2; margin-bottom: 40px; }
.pin-content-track { display: flex; align-items: center; gap: 40px; padding-left: 8vw; width: max-content; flex-grow: 1; will-change: transform; transform: translate3d(0, 0, 0); }

/* Pin Card Overrides */
.pin-content-track .card { height: 55vh; aspect-ratio: 2 / 3; width: auto; min-width: auto; box-shadow: 0 20px 40px -10px rgba(0,0,0,0.03); }
.pin-content-track .card-img { height: 100%; width: 100%; object-fit: cover; }
.pin-content-track .card-overlay { padding: 25px; }
.pin-content-track .card-overlay h3 { font-size: 1.5rem; margin-bottom: 5px; }

/* Mobile Fix for Pin Section */
@media (max-width: 768px) {
    .pin-section { height: 400vh; }
    .pin-wrap-sticky { padding: 20px 0 40px 0; }
    .pin-header-container { margin-bottom: 20px; }
    
    .pin-content-track {
        gap: 15px; 
        padding-left: 20px; 
    }
    .pin-content-track .card {
        height: 50vh;
        width: 80vw; /* TÄHTIS: Laius, et scroll oleks arusaadav */
        flex-shrink: 0;
    }
}


/* =========================================
   7. ARCHITECTURE & BUTTONS
   ========================================= */
.arch-grid { display: grid; gap: 30px; }
@media (min-width: 768px) { .arch-grid { grid-template-columns: 1fr 1fr; gap: 50px; } }
.arch-card { position: relative; height: 450px; border-radius: 12px; overflow: hidden; cursor: pointer; border: 1px solid rgba(0,0,0,0.04); }
@media (min-width: 768px) { .arch-card { height: 650px; } }
.arch-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.3); color: #fff; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 20px; transition: 0.3s; }
.arch-card:hover .arch-overlay { background: rgba(0,0,0,0.1); }
.arch-sub { text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.8rem; display: block; margin-bottom: 10px; }
.arch-card h3 { font-size: 2.5rem; margin-bottom: 10px; }

.btn-primary, .btn-outline, .btn-connect, .btn-search { transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), background .25s ease, color .25s ease, border-color .25s ease; }
.btn-primary:hover, .btn-outline:hover, .btn-connect:hover { transform: translateY(-2px); box-shadow: 0 18px 35px rgba(0,0,0,0.12); }
.btn-outline { padding: 12px 30px; border: 1px solid var(--text-main); border-radius: 30px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; display: inline-block; }
.btn-outline.light { border-color: #fff; color: #fff; margin-top: 20px; }
.btn-outline:hover { background: #fff; color: var(--text-main); }
.btn-primary { display: block; width: 100%; padding: 18px; text-align: center; background: var(--text-main); color: #fff; border-radius: 12px; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.9rem; margin-top: 30px; }
.btn-primary:hover { background: var(--accent); }


/* =========================================
   8. SCOUT (TECH & HYBRID)
   ========================================= */
.scout-grid { display: grid; gap: 60px; align-items: center; }
@media (min-width: 768px) { .scout-grid { grid-template-columns: 1fr 1fr; gap: 100px; } }
.feature-list { margin-top: 30px; }
.feature-list li { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; font-size: 1rem; }
.feature-list i { color: var(--accent); font-size: 1.2rem; }
.scout-card { padding: 30px; border: 1px solid #fff; }
@media (min-width: 768px) { .scout-card { padding: 50px; } }
.scout-header { display: flex; justify-content: space-between; border-bottom: 1px solid rgba(0,0,0,0.1); padding-bottom: 20px; margin-bottom: 30px; }
.status-badge { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 600; color: green; }
.dot { width: 8px; height: 8px; background: green; border-radius: 50%; box-shadow: 0 0 8px green; animation: pulse 2s infinite; }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }

/* Hybrid Console Styles */
.hybrid-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(0,0,0,0.06); padding-bottom: 20px; margin-bottom: 25px; }
.window-dots { display: flex; gap: 6px; }
.window-dots span { width: 10px; height: 10px; border-radius: 50%; display: block; }
.dot-r { background: #FF5F56; }
.dot-y { background: #FFBD2E; }
.dot-g { background: #27C93F; }
.tech-console-light { display: flex; flex-direction: column; gap: 15px; min-height: 220px; font-family: var(--font-sans); }
.loading-bar-wrapper.light-theme { width: 100%; height: 4px; background: rgba(0,0,0,0.05); border-radius: 4px; overflow: hidden; }
.loading-bar-fill { width: 0%; height: 100%; background: var(--accent); border-radius: 4px; transition: width 3s cubic-bezier(0.22, 1, 0.36, 1); }
.loading-bar-fill.start-load { width: 100%; }
.log-line { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 8px; opacity: 0.5; transform: translateY(10px); transition: all 0.5s ease; display: flex; align-items: center; gap: 10px; }
.log-line.visible { opacity: 1; transform: translateY(0); }
.log-line.success { color: var(--accent); font-weight: 600; background: rgba(156, 130, 96, 0.1); padding: 10px 15px; border-radius: 8px; margin-top: 10px; }
.log-line::before { content: '→'; font-size: 0.8em; color: var(--accent); opacity: 0.6; }
.log-line.success::before { content: '✓'; }


/* =========================================
   9. LISTINGS (TÄIESTI KORRAS NÜÜD)
   ========================================= */
.listings-grid { display: grid; gap: 30px; }
@media (min-width: 768px) { .listings-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); } }

/* Siin on õige listing card stiil tagasi */
.listing-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-card); transition: 0.3s; border: 1px solid rgba(0,0,0,0.04); }
.listing-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-hover); }

/* Listing pildi kast */
.listing-img-box { height: 260px; position: relative; overflow: hidden; }

/* See tagab, et pilt listing-card sees käitub ilusti */
.listing-img-box .card-img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.badge { position: absolute; top: 15px; left: 15px; background: rgba(255,255,255,0.95); padding: 6px 12px; border-radius: 6px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; z-index: 2; }
.badge.gold { color: var(--accent-dark); }
.badge.dark { background: var(--text-main); color: #fff; }
.listing-body { padding: 30px; }
.listing-loc { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 5px; }
.listing-body h3 { font-size: 1.5rem; margin-bottom: 10px; }
.price { font-size: 1.2rem; color: var(--accent); font-weight: 600; display: block; margin-bottom: 15px; }
.specs { display: flex; gap: 20px; border-top: 1px solid rgba(0,0,0,0.05); padding-top: 15px; font-size: 0.9rem; color: var(--text-muted); }


/* =========================================
   10. ECOSYSTEM
   ========================================= */
.eco-grid { display: grid; gap: 30px; }
@media (min-width: 768px) { .eco-grid { grid-template-columns: 1fr 1fr 1fr; } }
.eco-card { background: #fff; padding: 40px 30px; border-radius: 12px; text-align: center; box-shadow: var(--shadow-card); transition: 0.3s; border: 1px solid rgba(0,0,0,0.04); }
.eco-card:hover { transform: translateY(-5px); border-bottom: 3px solid var(--accent); box-shadow: 0 28px 70px -25px rgba(0,0,0,0.22); }
.eco-icon { font-size: 2.5rem; color: var(--accent); margin-bottom: 20px; }
.link-arrow { color: var(--accent); font-weight: 600; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; }

.view-all-wrapper { margin-top: 60px; display: flex; justify-content: center; width: 100%; }
.btn-explore { display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 18px 45px; border: 1px solid var(--text-main); border-radius: 100px; background: transparent; color: var(--text-main); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 500; transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1); position: relative; overflow: hidden; }
.btn-explore i { font-size: 1.1rem; transition: transform 0.4s ease; }
.btn-explore:hover { background: var(--text-main); color: #fff; transform: translateY(-3px); box-shadow: 0 15px 30px -5px rgba(0,0,0,0.15); padding-right: 55px; padding-left: 35px; }
.btn-explore:hover i { transform: translateX(5px); }
@media (max-width: 768px) {
    .view-all-wrapper { margin-top: 40px; }
    .btn-explore { width: 100%; padding: 20px 0; }
    .btn-explore:hover { padding-right: 0; padding-left: 0; }
}


/* =========================================
   11. GUIDES & PARTNERS
   ========================================= */
.guide-filters { display: flex; justify-content: center; gap: 15px; margin-bottom: 60px; flex-wrap: wrap; }
.filter-pill { padding: 12px 30px; border-radius: 50px; border: 1px solid rgba(156, 130, 96, 0.2); background: rgba(255, 255, 255, 0.6); color: var(--text-muted); font-family: var(--font-sans); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; cursor: pointer; transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1); backdrop-filter: blur(5px); }
.filter-pill:hover, .filter-pill.active { background: var(--accent); color: #fff; border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 10px 20px rgba(156, 130, 96, 0.2); }
@media (max-width: 768px) { .guide-filters { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding-bottom: 15px; -webkit-overflow-scrolling: touch; scrollbar-width: none; } .guide-filters::-webkit-scrollbar { display: none; } .filter-pill { flex-shrink: 0; } }

.guides-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 40px; }
.guide-card { background: #fff; border-radius: 24px; overflow: hidden; transition: all 0.5s var(--ease-out); border: 1px solid rgba(0,0,0,0.03); position: relative; display: flex; flex-direction: column; }
.guide-card:hover { transform: translateY(-10px); box-shadow: 0 20px 50px -10px rgba(0,0,0,0.08); }
.guide-image { height: 280px; width: 100%; position: relative; overflow: hidden; }
.guide-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s ease; filter: sepia(10%); }
.guide-card:hover .guide-image img { transform: scale(1.05); filter: sepia(0%); }

.guide-socials { position: absolute; bottom: 20px; right: 20px; display: flex; gap: 10px; opacity: 0; transform: translateY(10px); transition: 0.4s ease; }
.guide-card:hover .guide-socials { opacity: 1; transform: translateY(0); }
.guide-socials a { width: 40px; height: 40px; background: rgba(255,255,255,0.9); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text-main); transition: 0.3s; }
.guide-socials a:hover { background: var(--accent); color: #fff; }

/* TÄIENDUS: Hover Fix mobiilile */
@media (hover: none) {
    .guide-socials {
        opacity: 1 !important; transform: translateY(0) !important;
        background: rgba(255,255,255,0.9); padding: 5px; border-radius: 50px;
    }
    .guide-image img { filter: sepia(0%); }
}

.guide-content { padding: 35px; flex-grow: 1; display: flex; flex-direction: column; text-align: center; }
.guide-identity h3 { font-family: var(--font-serif); font-size: 1.8rem; margin-bottom: 5px; color: var(--text-main); }
.guide-role { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--accent); display: block; margin-bottom: 20px; }
.guide-quote { font-family: var(--font-serif); font-style: italic; font-size: 1.15rem; line-height: 1.5; color: var(--text-muted); margin-bottom: 25px; }
.guide-tags { display: flex; justify-content: center; gap: 15px; margin-bottom: 30px; font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
.btn-connect { margin-top: auto; width: 100%; padding: 15px; background: transparent; border: 1px solid var(--text-main); color: var(--text-main); border-radius: 50px; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.1em; cursor: pointer; transition: 0.3s; }
.btn-connect:hover { background: var(--text-main); color: #fff; }

/* Guides Footer (Split) */
.guides-footer { margin-top: 60px; background: #fff; border-radius: 20px; border: 1px solid rgba(0,0,0,0.05); display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow-card); }
@media (min-width: 768px) { .guides-footer { flex-direction: row; align-items: stretch; } }
.guides-action { padding: 40px 30px; flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; position: relative; }
.guides-action h3 { font-size: 1.4rem; margin-bottom: 10px; font-family: var(--font-serif); }
.guides-action p { font-size: 0.95rem; margin-bottom: 25px; line-height: 1.6; max-width: 90%; }
.main-action { background: #fff; }
.vertical-divider { display: none; width: 1px; background: rgba(0,0,0,0.08); margin: 20px 0; }
@media (min-width: 768px) { .vertical-divider { display: block; } }
.alt-action { background: rgba(249, 248, 246, 0.5); }
.badge-new { position: absolute; top: 25px; right: 25px; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; color: var(--accent); border: 1px solid var(--accent); padding: 4px 10px; border-radius: 50px; }
.link-with-icon { font-size: 0.95rem; font-weight: 600; color: var(--text-main); display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--accent); padding-bottom: 2px; transition: 0.3s; }
.link-with-icon i { font-size: 1.2rem; color: var(--accent); }
.link-with-icon:hover { color: var(--accent); gap: 12px; }
@media (max-width: 768px) {
    .guides-footer { text-align: center; }
    .guides-action { align-items: center; padding: 40px 20px; border-bottom: 1px solid rgba(0,0,0,0.05); }
    .guides-action:last-child { border-bottom: none; }
    .badge-new { position: static; margin-bottom: 15px; display: inline-block; }
}

/* Partners (Dark Split) */
.partner-grid { display: flex; flex-direction: column; gap: 40px; text-align: center; }
@media (min-width: 900px) { .partner-grid { flex-direction: row; align-items: center; text-align: left; justify-content: space-between; } }
.partner-col { flex: 1; padding: 20px 0; }
@media (min-width: 900px) { .partner-col { padding: 40px; } }
.partner-tag { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--accent); margin-bottom: 15px; font-weight: 600; }
.partner-col h3 { font-size: 2rem; margin-bottom: 15px; font-family: var(--font-serif); }
.partner-col p { font-size: 1rem; line-height: 1.6; margin-bottom: 30px; max-width: 450px; }
@media (max-width: 900px) { .partner-col p { margin-left: auto; margin-right: auto; } }
.partner-divider { width: 100%; height: 1px; background: rgba(255, 255, 255, 0.15); }
@media (min-width: 900px) { .partner-divider { width: 1px; height: 200px; margin: 0 40px; } }


/* =========================================
   12. STATS, JOURNAL, LEGAL & FOOTER
   ========================================= */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; background: #fff; padding: 40px; border-radius: 12px; box-shadow: var(--shadow-card); }
@media (min-width: 768px) { .stats-grid { grid-template-columns: repeat(4, 1fr); padding: 60px; } }
.stat-item { text-align: center; border-right: none; }
@media (min-width: 768px) { .stat-item { border-right: 1px solid rgba(0,0,0,0.05); } .stat-item:last-child { border-right: none; } }
.stat-num { font-size: 2.5rem; font-family: var(--font-serif); color: var(--accent); display: block; margin-bottom: 5px; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; }

.journal-grid { display: grid; gap: 40px; }
@media (min-width: 768px) { .journal-grid { grid-template-columns: 1fr 1fr 1fr; } }
.journal-item { display: block; }
.journal-item:hover h3 { color: var(--accent); }
.journal-img { height: 240px; width: 100%; object-fit: cover; border-radius: 4px; margin-bottom: 20px; filter: grayscale(10%); transition: 0.5s; }
.journal-item:hover .journal-img { filter: grayscale(0%); transform: scale(1.02); }
.journal-meta { font-size: 0.75rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.1em; display: block; margin-bottom: 8px; }
.journal-item h3 { font-size: 1.4rem; line-height: 1.3; margin-bottom: 10px; transition: 0.3s; }
.journal-item p { font-size: 0.95rem; color: var(--text-muted); }

.legal-grid { display: grid; gap: 30px; }
@media (min-width: 768px) { .legal-grid { grid-template-columns: 1fr 1fr 1fr; gap: 60px; } }
.legal-item { padding: 30px; border: 1px solid rgba(0,0,0,0.05); transition: 0.3s; }
.legal-item:hover { border-color: var(--accent); background: #fff; }
.icon-box { font-size: 2rem; color: var(--accent); margin-bottom: 15px; font-family: var(--font-serif); }

footer { padding: 80px 0 40px; }
.footer-grid { display: grid; gap: 50px; margin-bottom: 60px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 60px; } }
.footer-logo { font-family: var(--font-serif); font-size: 1.8rem; color: #fff; margin-bottom: 15px; display: block; }
.social-icons { display: flex; gap: 15px; font-size: 1.5rem; color: #fff; }
.footer-heading { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); margin-bottom: 25px; font-weight: 700; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: rgba(255,255,255,0.7); font-size: 0.95rem; }
.footer-links a:hover { color: #fff; }
.footer-form { display: flex; gap: 10px; }
.footer-form input { flex: 1; background: transparent; border: none; border-bottom: 1px solid rgba(255,255,255,0.2); color: #fff; padding: 10px 0; }
.footer-form button { background: transparent; border: 1px solid rgba(255,255,255,0.3); color: #fff; padding: 8px 20px; border-radius: 20px; text-transform: uppercase; font-size: 0.75rem; cursor: pointer; }
.footer-form button:hover { background: var(--accent); border-color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 30px; text-align: center; font-size: 0.8rem; color: rgba(255,255,255,0.4); }


/* =========================================
   13. LAPTOP & SMALL SCREENS
   ========================================= */
@media screen and (max-width: 1440px) {
    :root { --space-section: 90px; }
    .container { max-width: 1100px; padding: 40px 20px; }
    h1, .hero h1 { font-size: 2.6rem; }
    .header-center h2, .header-left h2 { font-size: 2.2rem; }
    p, .text-muted { font-size: 1rem; }
    .hero { min-height: 650px; height: auto; padding-top: 100px; padding-bottom: 60px; }
    .hero-content { max-width: 700px; }
    .search-dock { padding: 8px 8px 8px 30px; gap: 15px; }
    .search-field label { margin-bottom: 2px; }
    .select-wrapper select { font-size: 0.9rem; }
    .btn-search { width: 50px; height: 50px; }
    .listing-img-box { height: 220px; }
    .listing-body { padding: 20px; }
    .arch-card { height: 450px; }
    .philo-img { height: 400px; }
    .stats-grid { padding: 30px; gap: 20px; }
    .stat-num { font-size: 2rem; }
}

@media screen and (max-height: 800px) {
    .hero { height: auto; min-height: 100vh; padding-top: 120px; }
    .hero h1 { margin-bottom: 10px; }
    .hero p { margin-bottom: 25px; }
    .search-dock { margin-bottom: 25px; }
}







.location-card {
    cursor: pointer;
    transition: transform 0.3s ease;
}

/* Väike hõljumise efekt ka */
.location-card:hover {
    transform: translateY(-5px);
}





/* =========================================
   14. DASHBOARD & BACK-OFFICE
   ========================================= */

/* Layout Grid */
.dashboard-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    padding-top: 140px; /* Navbar height + buffer */
    padding-bottom: 80px;
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

@media (min-width: 1024px) {
    .dashboard-wrapper {
        grid-template-columns: 280px 1fr; /* Sidebar | Content */
        align-items: start;
    }
}

/* Sidebar Navigation */
.dash-sidebar {
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    padding: 30px;
    position: sticky;
    top: 100px; /* Jääb kerides paigale */
    border: 1px solid rgba(0,0,0,0.04);
    z-index: 10;
}

.user-profile-box {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.user-avatar {
    width: 80px;
    height: 80px;
    background: var(--bg-rice);
    color: var(--accent);
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 15px;
    font-family: var(--font-serif);
    border: 2px solid var(--accent);
}

.dash-nav ul { list-style: none; padding: 0; }
.dash-nav li { margin-bottom: 8px; }

.dash-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 8px;
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.dash-nav a:hover, .dash-nav a.active {
    background: var(--bg-rice);
    color: var(--accent);
    transform: translateX(5px);
}

.dash-nav i { font-size: 1.2rem; }

.nav-divider {
    height: 1px;
    background: rgba(0,0,0,0.05);
    margin: 15px 0;
}

/* Dashboard Content Area */
.dash-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
    min-width: 0; /* Väldib gridi katkiminekut tabelitega */
}

.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 20px;
}
.dash-header h1 { margin: 0; font-size: 2.2rem; line-height: 1.1; color: var(--text-main); }
.dash-date { color: var(--text-muted); font-size: 0.9rem; margin-top: 5px; }

/* Statistics Cards */
.dash-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.stat-card {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(0,0,0,0.03);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: 0.3s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }

.stat-icon {
    width: 50px; height: 50px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}
.icon-blue { background: #e3f2fd; color: #1565c0; }
.icon-green { background: #e8f5e9; color: #2e7d32; }
.icon-gold { background: #fff8e1; color: #fbc02d; }

.stat-info h3 { margin: 0; font-size: 1.8rem; line-height: 1; font-family: var(--font-sans); font-weight: 700; color: var(--text-main); }
.stat-info span { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

/* Data Tables */
.table-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    overflow-x: auto; /* Mobiilis keritav */
    border: 1px solid rgba(0,0,0,0.03);
}

.dash-table { width: 100%; border-collapse: collapse; min-width: 600px; }
.dash-table th { 
    text-align: left; padding: 15px 20px; background: #f9f9f9; 
    font-size: 0.75rem; text-transform: uppercase; color: var(--text-muted); 
    font-weight: 700; border-bottom: 1px solid #eee; letter-spacing: 0.05em; 
}
.dash-table td { 
    padding: 15px 20px; border-bottom: 1px solid #eee; 
    font-size: 0.9rem; vertical-align: middle; color: var(--text-main); 
}
.dash-table tr:last-child td { border-bottom: none; }
.dash-table tr:hover { background: #fafafa; }

/* Status Badges */
.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-block;
}
.st-active { background: #e8f5e9; color: #2e7d32; }
.st-new { background: #e3f2fd; color: #1565c0; }
.st-sold { background: #ffebee; color: #c62828; }
.st-off-market { background: #fff3e0; color: #ef6c00; }

/* UI Helpers */
.mini-img { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; margin-right: 10px; vertical-align: middle; }
.btn-icon { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; transition: 0.2s; color: var(--text-muted); }
.btn-icon:hover { background: var(--bg-rice); color: var(--text-main); }

/* Forms (Profiili ja kinnisvara muutmine) */
.form-label { display: block; font-size: 0.75rem; text-transform: uppercase; color: var(--text-muted); font-weight: 700; margin-bottom: 8px; letter-spacing: 0.05em; }
.form-input, .form-select, .form-textarea { 
    width: 100%; padding: 12px 15px; 
    border: 1px solid #e0e0e0; border-radius: 8px; 
    font-family: var(--font-sans); font-size: 1rem; 
    transition: 0.3s; background: #fafafa; color: var(--text-main);
}
.form-input:focus, .form-select:focus, .form-textarea:focus { 
    background: #fff; border-color: var(--accent); outline: none; 
    box-shadow: 0 0 0 3px rgba(156,130,96,0.1); 
}