/* ============================================
   VÝHLEDY BEROUN – Custom Styles & Animations
   Normal Scroll Edition
   ============================================ */

/* === ORIGINAL COLORS (backup) ===
   Primary (green): #203327 / rgba(32, 51, 39)
   Accent (gold):   #c8a96e / rgba(200, 169, 110)
   === CURRENT COLORS ===
   Primary (green): #8DC63F / rgba(141, 198, 63)
   Accent (grey):   #64686b / rgba(100, 104, 107)
   === END BACKUP === */

/* === BASE === */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

html, body {
    font-family: 'Outfit', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection { background: #64686b; color: #8DC63F; }

/* === LOGO === */
.logo-svg { width: 100%; height: 100%; display: block; }

/* === PRELOADER === */
#preloader { transition: opacity 0.7s ease, visibility 0.7s ease; }
#preloader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-logo svg { width: 80px; height: 80px; }

@keyframes preloaderBar { 0% { width: 0; } 100% { width: 100%; } }
.animate-preloader-bar { animation: preloaderBar 1.5s ease-in-out forwards; }

/* === NAVBAR === */
#navbar {
    background: #ffffff;
    backdrop-filter: none;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#navbar.scrolled {
    background: #ffffff;
    backdrop-filter: none;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

#navbar.scrolled .navbar-text-color { color: #333 !important; }
#navbar.scrolled .hamburger-line { background-color: #333 !important; }

.navbar-text-color { color: #333; }
.navbar-text-bg { background-color: #333; }

/* Hamburger */
#hamburger.active .hamburger-line:nth-child(1) { transform: translateY(8px) rotate(45deg); }
#hamburger.active .hamburger-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
#hamburger.active .hamburger-line:nth-child(3) { width: 1.75rem; transform: translateY(-8px) rotate(-45deg); }

/* ==========================================
   PHOTO COLLAGE
   ========================================== */
.photo-collage {
    perspective: 1000px;
}

.collage-photo {
    transform: scale(0);
    opacity: 0;
    transition: transform 1.4s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 1s ease;
}

.collage-photo-1.visible {
    transform: scale(1);
    opacity: 1;
    transition-delay: 0.3s;
}

.collage-photo-2.visible {
    transform: scale(1);
    opacity: 1;
    transition-delay: 0.8s;
}

.collage-photo-3.visible {
    transform: scale(1);
    opacity: 1;
    transition-delay: 1.3s;
}

@media (max-width: 768px) {
    .collage-photo-1 { width: 60% !important; height: 70% !important; }
    .collage-photo-2 { width: 45% !important; height: 35% !important; }
    .collage-photo-3 { width: 55% !important; height: 55% !important; right: 0 !important; }
}

/* === HERO === */
#hero {
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.hero-slider { position: absolute; inset: 0; }

.hero-slide {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    opacity: 0; transform: scale(1.1);
    transition: opacity 1.5s ease, transform 8s ease;
}

.hero-slide.active { opacity: 1; transform: scale(1); }

.hero-reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.hero-reveal.visible { opacity: 1; transform: translateY(0); }

.hero-dot.active { background: #64686b; width: 3rem; }

/* === VISUAL CURTAIN SECTION === */
#visual {
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.visual-curtain {
    position: absolute;
    inset: 0;
    clip-path: inset(0 50%);
    transition: clip-path 1.4s cubic-bezier(0.76, 0, 0.24, 1);
}

.visual-curtain.visible {
    clip-path: inset(0 0);
}

/* Visual Slides */
.visual-slides {
    position: absolute;
    inset: 0;
}

.visual-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1);
    transition: opacity 1.5s ease;
}

.visual-slide.active {
    opacity: 1;
    animation: visualKenBurns 8s ease forwards;
}

@keyframes visualKenBurns {
    0% { transform: scale(1); }
    100% { transform: scale(1.15); }
}

/* Visual Pagination */
.visual-pagination {
    display: flex;
    gap: 6px;
}

.visual-pag-dot {
    position: relative;
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.25);
    border: none;
    border-radius: 2px;
    cursor: pointer;
    overflow: hidden;
    padding: 0;
    transition: background 0.3s ease;
}

.visual-pag-dot:hover {
    background: rgba(255, 255, 255, 0.4);
}

.visual-pag-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: #64686b;
    border-radius: 2px;
    transition: width 0.1s linear;
}

.visual-pag-dot.active .visual-pag-progress {
    animation: visualProgress 6s linear forwards;
}

@keyframes visualProgress {
    0% { width: 0; }
    100% { width: 100%; }
}

.visual-pag-dot.done .visual-pag-progress {
    width: 100%;
    animation: none;
}

/* === SCROLL ANIMATIONS === */
.reveal-up, .reveal-left, .reveal-right {
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal-up { transform: translateY(60px); }
.reveal-left { transform: translateX(-60px); }
.reveal-right { transform: translateX(60px); }
.reveal-up.visible, .reveal-left.visible, .reveal-right.visible { opacity: 1; transform: translate(0); }

/* === MARQUEE === */
.marquee-container { overflow: hidden; white-space: nowrap; }
.marquee-content { display: inline-block; animation: marquee 30s linear infinite; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* === HOUSE CARDS === */
.house-card { transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1); }

/* === GALLERY === */
.gallery-item { transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1); }

/* === LIGHTBOX === */
#lightbox.active { opacity: 1; pointer-events: auto; }
#lightbox-img { transition: transform 0.3s ease; }

/* === SCROLL INDICATOR === */
@keyframes scrollLine {
    0% { transform: scaleY(0); transform-origin: top; }
    50% { transform: scaleY(1); transform-origin: top; }
    50.1% { transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}
.animate-scroll-line { animation: scrollLine 2s ease-in-out infinite; }

/* === FORM === */
.form-group { position: relative; }
input:focus, textarea:focus {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(100, 104, 107, 0.15);
}

/* === CURSOR FOLLOWER === */
.cursor-follower {
    position: fixed; width: 40px; height: 40px;
    border: 2px solid #64686b; border-radius: 50%;
    pointer-events: none; z-index: 9998;
    transition: transform 0.15s ease, width 0.3s ease, height 0.3s ease;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
}
.cursor-follower.hovering { width: 60px; height: 60px; background: rgba(100, 104, 107, 0.1); }

/* === TIMELINE === */
.timeline-item {
    opacity: 0; transform: translateX(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.timeline-item.visible { opacity: 1; transform: translateX(0); }

/* Timeline active/hover state */
.timeline-item.tl-active .tl-card,
.timeline-item:hover .tl-card {
    background: #64686b;
    transform: scale(1.03);
    box-shadow: 0 10px 40px rgba(100, 104, 107, 0.25);
}

.timeline-item.tl-active .tl-card span,
.timeline-item:hover .tl-card span {
    color: rgba(255, 255, 255, 0.8);
}

.timeline-item.tl-active .tl-card h4,
.timeline-item:hover .tl-card h4 {
    color: white;
}

.timeline-item.tl-active .tl-card p,
.timeline-item:hover .tl-card p {
    color: rgba(255, 255, 255, 0.7);
}

.timeline-item.tl-active .tl-card .bg-accent\/10,
.timeline-item:hover .tl-card .bg-accent\/10 {
    background: rgba(255, 255, 255, 0.15);
}

.timeline-item.tl-active .tl-card i,
.timeline-item:hover .tl-card i {
    color: white;
}

.timeline-item.tl-active .tl-dot,
.timeline-item:hover .tl-dot {
    border-color: #64686b;
    box-shadow: 0 0 0 4px rgba(100, 104, 107, 0.3);
}

/* === BENEFIT CARDS === */
.benefit-card { position: relative; }
.benefit-card::after {
    content: ''; position: absolute; inset: 0; border-radius: 0.75rem;
    opacity: 0; transition: opacity 0.5s ease;
    box-shadow: 0 20px 60px rgba(100, 104, 107, 0.15); pointer-events: none;
}
.benefit-card:hover::after { opacity: 1; }

/* === GALLERY FILTER === */
.gallery-filter {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.gallery-filter:hover {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
}
.gallery-filter.active {
    background: #64686b;
    color: #8DC63F;
    border-color: #64686b;
}
.gallery-item { transition: opacity 0.4s ease, transform 0.4s ease; }
.gallery-item.gallery-hidden { display: none; }

/* Gallery load-more reveal animation */
.gallery-item.gallery-reveal {
    animation: galleryFadeIn 0.5s ease forwards;
}
@keyframes galleryFadeIn {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 5-column grid for koupelny when filter active */
@media (min-width: 768px) {
    #gallery-grid.grid-cols-5-active {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* === LEGAL POPUPS === */
.legal-popup.active { opacity: 1; pointer-events: auto; }
.legal-popup.active .legal-popup-content { transform: scale(1); }

/* === CONTACT FORM === */
.contact-input {
    background: transparent;
    border: none;
    border-bottom: 3px solid #64686b;
    padding: 0.85rem 0;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    color: #64686b;
    outline: none;
    transition: border-color 0.3s ease;
    border-radius: 0;
}
.contact-input::placeholder { color: #9ca3af; font-weight: 400; }
.contact-input:focus { border-bottom-color: #8DC63F; }

/* === MORTGAGE CALCULATOR === */
.calc-input::-webkit-outer-spin-button,
.calc-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.calc-slider {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.calc-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #64686b;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.calc-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.calc-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #64686b;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

/* === LOKALITA === */

/* === DECORATIVE LEAF IMAGES === */
.leaf-deco {
    opacity: 0;
    z-index: 0;
    transition: opacity 0.8s ease-out;
}
.leaf-deco-projekt {
    width: 380px;
    top: -40px;
    right: -60px;
    transform: translateY(0) rotate(-12deg);
}
.leaf-deco-cenik {
    width: 340px;
    top: -30px;
    left: -40px;
    transform: translateY(0) rotate(15deg) scaleX(-1);
}
.leaf-deco-financovani {
    width: 360px;
    bottom: -20px;
    right: -40px;
    transform: translateY(0) rotate(-8deg);
}
.leaf-deco-lokalita {
    width: 350px;
    top: 30px;
    right: -50px;
    transform: translateY(0) rotate(10deg);
}
.leaf-deco-kontakt {
    width: 320px;
    bottom: 40px;
    left: -30px;
    transform: translateY(0) rotate(18deg) scaleX(-1);
}

/* === LOCATION CAROUSEL === */
.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

.location-card-h {
    height: clamp(200px, 25vh, 320px);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .cursor-follower { display: none; }
}

/* === HERO RESPONSIVE CLASSES === */
.hero-bottom-pad { padding-bottom: 7rem; }
.hero-heading { font-size: 3rem; }
.hero-spacer { margin-top: 2rem; }
.hero-metrics-gap { gap: 1.5rem; }
.hero-desc { font-size: 1.125rem; }
.hero-cta { padding: 1rem 2rem; }
.hero-label { margin-bottom: 1rem; }

@media (min-width: 640px) {
    .hero-heading { font-size: 3.75rem; }
    .hero-metrics-gap { gap: 1.5rem; }
}
@media (min-width: 1024px) {
    .hero-heading { font-size: 4.5rem; }
    .hero-metrics-gap { gap: 2.5rem; }
}
@media (min-width: 1280px) {
    .hero-heading { font-size: 6rem; }
}

/* === SECTIONS: relative for leaf decos === */
section {
    position: relative;
    overflow: hidden;
}
