/* =============================================================================
   layout.css — Base layout, header, strip system, navigation, animations
   Sections:
     1. CSS Variables & Root
     2. Base Resets
     3. Container
     4. Site Header
     5. Strip System
     6. Buttons
     7. Mobile Navigation Panel
     8. Animations & Visual Effects
     9. Responsive Overrides
   ============================================================================= */


/* =============================================================================
   1. CSS VARIABLES & ROOT
   ============================================================================= */

:root {
  --site-max:    1200px;
  --header-h:    92px;
  --gold:        #d9b383;
  --gold-strong: #e6bd6d;
  --bg-dark:     #0b0f14;
  --text:        #efe6d5;
}

@media (max-width: 900px) {
  :root { --header-h: 78px; }
}


/* =============================================================================
   2. BASE RESETS
   ============================================================================= */

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; overflow-x: hidden; }

body.dobrodruhovia {
  background: var(--bg-dark);
  color: var(--text);
  font-family: Georgia, 'Cinzel', serif;
  margin: 0;
  padding-top: 0; /* header is position:absolute — overlays hero, no offset needed */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


/* =============================================================================
   3. CONTAINER
   ============================================================================= */

.container {
  max-width: var(--site-max);
  margin: 0 auto;
  padding: 0 20px;
}


/* =============================================================================
   4. SITE HEADER
   HTML: <header class="site-header">
           <div class="container header-inner">
             .logo | .top-right | .nav-toggle
           </div>
         </header>
   ============================================================================= */

/* Header shell — floats over hero image */
.site-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  width: 100%;
  height: var(--header-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  pointer-events: auto;
  /* subtle vignette so menu links stay readable over any hero photo */
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.55) 0%,
    rgba(0,0,0,0.25) 60%,
    rgba(0,0,0,0)   100%
  );
}

/* Inner row — .container and .header-inner are the same div in HTML,
   so we override .container's max-width/margin to span full viewport */
.header-inner {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding-left: 28px !important;
  padding-right: 48px !important;
  box-sizing: border-box !important;
  gap: 12px !important;
}

/* Logo — always left, never grows */
.header-inner .logo {
  order: 1;
  flex: 0 0 auto !important;
  margin-right: 12px !important;
  max-width: 280px;
  position: relative;
  z-index: 260;
  transition: transform .25s ease, opacity .25s ease;
}

.header-inner .logo img {
  display: block;
  height: 72px;
  width: auto;
}

/* Shrink logo on scroll (class added by init.js) */
.site-header.scrolled .logo     { transform: scale(0.78) translateY(-4px); opacity: 0.98; }
.site-header.scrolled .logo img { filter: drop-shadow(0 0 6px rgba(217,179,131,0.35)); }

/* Top-right group (desktop menu + language) — pinned right */
.header-inner .top-right {
  order: 2;
  margin-left: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 18px !important;
}

/* Horizontal nav menu */
.top-right .menu {
  display: flex !important;
  align-items: center !important;
  gap: 18px !important;
}

.top-right .menu ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  gap: 18px;
}

.top-right .menu li { margin: 0; }

.top-right .menu a {
  color: #e6d9c0;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.6px;
  padding: 6px 8px;
  transition: color .14s ease, transform .14s ease;
}

.top-right .menu a:hover {
  color: var(--gold);
  transform: translateY(-1px);
  text-shadow: 0 3px 12px rgba(0,0,0,0.45);
}

/* Language flags */
.top-right .mod-languageswitcher img,
.top-right .language-switcher img,
.top-right .lang-switch img {
  height: 18px; width: auto;
  display: inline-block; vertical-align: middle;
  border-radius: 2px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
}

.top-right .mod-languageswitcher ul,
.top-right .language-switcher ul,
.top-right .lang-switch ul {
  list-style: none !important;
  margin: 0 !important; padding: 0 !important;
  display: flex !important;
  gap: 10px !important;
  align-items: center !important;
}

.top-right .mod-languageswitcher,
.top-right .language-switcher,
.top-right .lang-switch {
  margin-right: 20px;
}

/* Hamburger toggle (visible only on mobile) */
.nav-toggle {
  order: 3;
  display: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
  margin-right: 8px;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: 6px;
  z-index: 2000;
  transition: background .14s ease;
}

.nav-toggle:focus { outline: 3px solid rgba(217,179,131,0.18); outline-offset: 2px; }

.nav-toggle-box { display: inline-block; width: 28px; height: 18px; position: relative; }

.nav-toggle-inner,
.nav-toggle-inner::before,
.nav-toggle-inner::after {
  display: block; position: absolute;
  left: 0; right: 0; height: 3px;
  background: #e6d9c0; border-radius: 3px;
  transition: transform .22s cubic-bezier(.2,.9,.3,1), opacity .18s linear;
}

.nav-toggle-inner          { top: 50%; transform: translateY(-50%); }
.nav-toggle-inner::before  { content: ""; top: -8px; }
.nav-toggle-inner::after   { content: ""; top:  8px; }

/* Animate to × when open (class toggled by menu-toggle.js) */
.menu-open .nav-toggle-inner         { transform: rotate(45deg); }
.menu-open .nav-toggle-inner::before { transform: rotate(90deg) translateX(-1px); top: 0; }
.menu-open .nav-toggle-inner::after  { opacity: 0; transform: translateX(-10px); }


/* =============================================================================
   5. STRIP SYSTEM
   HTML per strip:
     <section class="strip strip-[name]">
       <div class="strip-bg" style="background-image:url(...)"></div>
       <div class="strip-overlay"></div>
       <div class="container strip-inner"> ... </div>
     </section>
   ============================================================================= */

.strip {
  position: relative;
  overflow: visible;
  padding: 100px 0;
  min-height: 320px;
  display: block;
}

.strip .strip-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  z-index: 0;
  transform: translateZ(0);
}

.strip .strip-overlay {
  position: absolute; inset: 0;
  z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, rgba(11,15,20,0) 0%, rgba(11,15,20,0.65) 70%);
}

.strip .strip-inner {
  position: relative;
  z-index: 10;
  padding: 40px 20px;
}

/* Feather top / bottom fades */
.strip::before,
.strip::after {
  content: ''; position: absolute;
  left: 0; right: 0; height: 140px;
  pointer-events: none; z-index: 1;
}

.strip::before { top:    0; background: linear-gradient(to bottom, var(--bg-dark), rgba(11,15,20,0)); }
.strip::after  { bottom: 0; background: linear-gradient(to top,    var(--bg-dark), rgba(11,15,20,0)); }

/* Hero strip — starts at top:0, header floats over it */
.strip-hero,
#hero {
  position: relative !important;
  z-index: 100 !important;
  padding-top: calc(var(--header-h) + 0px) !important;
  padding-bottom: 20px !important;
  margin-top: 0 !important;
}

.strip-hero .strip-bg    { z-index: 0 !important; }
.strip-hero .strip-overlay,
#hero .strip-overlay     { z-index: 2 !important; }

.strip-hero .strip-inner,
#hero .strip-inner,
.hero-content {
  position: relative !important;
  z-index: 700 !important;
  opacity: 1 !important;
  transform: none !important;
}


/* =============================================================================
   6. BUTTONS
   ============================================================================= */

.btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 6px;
  text-decoration: none;
  color: #111;
  background: #fff;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(180deg, var(--gold), var(--gold-strong));
  color: #0b0f14;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(217,179,131,0.15);
  color: var(--gold);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0,0,0,0.5), 0 0 12px rgba(217,179,131,0.25);
}

.btn-outline:hover {
  border-color: var(--gold);
  background: rgba(217,179,131,0.08);
}


/* =============================================================================
   7. MOBILE NAVIGATION PANEL
   HTML: <div class="mobile-nav-panel" id="mobile-nav">
           <div class="mobile-nav-inner"> ... </div>
         </div>
   ============================================================================= */

.mobile-nav-panel {
  position: fixed;
  top: 0; right: 0;
  width: 320px; max-width: 86%;
  height: 100vh;
  z-index: 1500;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 22px 20px;
  transform: translateX(100%);
  transition: transform 320ms cubic-bezier(.2,.9,.3,1);
  background: linear-gradient(180deg, rgba(10,12,18,0.98), rgba(8,10,14,0.96));
  backdrop-filter: blur(6px);
  border-left: 1px solid rgba(217,179,131,0.15);
  box-shadow: -14px 0 40px rgba(0,0,0,0.6);
}

/* Gold top accent line */
.mobile-nav-panel::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: .7;
}

/* Slide in when open (class toggled by menu-toggle.js) */
html.menu-open .mobile-nav-panel,
body.menu-open  .mobile-nav-panel { transform: translateX(0) !important; }

.mobile-nav-inner { margin-top: 8px; display: block; }

.mobile-nav-inner .menu,
.mobile-nav-inner .menu ul,
.mobile-nav-inner ul {
  display: flex; flex-direction: column;
  gap: 12px; margin: 24px 0; padding: 0;
  list-style: none;
}

.mobile-nav-inner a,
.mobile-nav-inner .menu a {
  display: block;
  padding: 14px 12px;
  font-size: 18px; font-weight: 700; letter-spacing: .8px;
  text-decoration: none;
  color: var(--gold);
  text-align: left; border-radius: 8px;
  transition: all .18s ease;
}

.mobile-nav-inner a:hover,
.mobile-nav-inner a:focus {
  background: rgba(217,179,131,0.08);
  color: var(--gold-strong);
  transform: translateX(4px);
  outline: none;
}

.mobile-nav-inner a.active,
.mobile-nav-inner .current a {
  color: var(--gold-strong);
  text-shadow: 0 0 12px rgba(217,179,131,0.35);
}

/* Separator line + slide-in animation per item */
.mobile-nav-inner ul li {
  border-bottom: 1px solid rgba(255,255,255,0.04);
  padding-bottom: 6px;
  opacity: 0;
  transform: translateX(-8px);
  transition: all .25s ease;
}

.menu-open .mobile-nav-inner li              { opacity: 1; transform: none; }
.menu-open .mobile-nav-inner li:nth-child(1) { transition-delay: .05s; }
.menu-open .mobile-nav-inner li:nth-child(2) { transition-delay: .09s; }
.menu-open .mobile-nav-inner li:nth-child(3) { transition-delay: .13s; }
.menu-open .mobile-nav-inner li:nth-child(4) { transition-delay: .17s; }

/* Language flags inside mobile panel */
.mobile-nav-inner .mod-languageswitcher,
.mobile-nav-inner .language-switcher {
  margin-top: 12px; display: flex; gap: 10px; align-items: center;
}

.mobile-nav-inner .mod-languageswitcher img,
.mobile-nav-inner .language-switcher img {
  height: 20px; width: auto; border-radius: 3px;
}


/* =============================================================================
   8. ANIMATIONS & VISUAL EFFECTS
   ============================================================================= */

/* Gold separator between sections */
.gold-sep-wrap {
  display: flex; align-items: center; justify-content: center;
  gap: 14px; margin: 12px auto;
  pointer-events: none; line-height: 0;
}

.gold-sep-line {
  display: block; height: 1px; width: 120px;
  background: linear-gradient(90deg, transparent, rgba(217,179,131,0.85), transparent);
  border-radius: 2px; opacity: .95;
}

.gold-sep-dot {
  font-size: 18px; color: var(--gold);
  text-shadow: 0 2px 10px rgba(217,179,131,0.18);
  transform: translateY(0.5px); line-height: 1; display: inline-block;
}

/* Hero bg — mask + slow zoom */
.strip-hero .strip-bg {
  background-size: cover; background-position: center;
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0.65) 60%, rgba(0,0,0,0) 100%);
          mask-image: linear-gradient(180deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0.65) 60%, rgba(0,0,0,0) 100%);
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes heroSlowZoom {
    0%,100% { transform: scale(1)     translateZ(0); }
    50%     { transform: scale(1.035) translateZ(0); }
  }
  .strip-hero .strip-bg {
    will-change: transform; transform-origin: center;
    backface-visibility: hidden; -webkit-backface-visibility: hidden;
    animation: heroSlowZoom 12s ease-in-out infinite;
  }
}

/* Hero fog glow (::before) */
.strip-hero { overflow: visible; }

.strip-hero::before {
  content: ""; position: absolute;
  left: -10%; right: -10%; top: -15%; height: 140%;
  background: radial-gradient(ellipse at 50% 40%,
    rgba(255,245,210,0.18) 0%, rgba(255,235,180,0.08) 25%,
    rgba(255,230,160,0.03) 45%, transparent 70%);
  filter: blur(48px); transform: translateZ(0);
  z-index: 2; pointer-events: none;
  animation: fogSlowDrift 40s linear infinite;
  opacity: .95; mix-blend-mode: screen;
}

/* Hero moving cloud bands (::after) */
.strip-hero::after {
  content: ""; position: absolute;
  left: -40%; right: -40%; top: -10%; height: 120%;
  background: linear-gradient(90deg,
    rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 30%,
    rgba(255,255,255,0.06) 60%, rgba(255,255,255,0.01) 100%);
  filter: blur(30px); transform: translateZ(0);
  z-index: 3; pointer-events: none;
  animation: cloudBands 28s linear infinite;
  opacity: .95; mix-blend-mode: screen;
}

/* Hero cloud sprites */
.strip-hero .hero-clouds {
  position: absolute; inset: 0;
  z-index: 4; pointer-events: none; overflow: visible;
}

.strip-hero .hero-clouds .cloud {
  position: absolute;
  background: radial-gradient(circle at 35% 30%,
    rgba(255,255,255,0.9), rgba(255,255,255,0.45) 30%,
    rgba(255,255,255,0.08) 60%, transparent 100%);
  filter: blur(12px); opacity: .65;
  transform: translate3d(0,0,0); will-change: transform, opacity;
}

.strip-hero .hero-clouds .cloud.c1 { left:  6%; top: 14%; width: 280px; height: 120px; animation: cloudFloatA 36s linear infinite; }
.strip-hero .hero-clouds .cloud.c2 { left: 55%; top:  6%; width: 320px; height: 160px; animation: cloudFloatB 48s linear infinite; opacity: .5; }
.strip-hero .hero-clouds .cloud.c3 { left: 78%; top: 26%; width: 200px; height: 100px; animation: cloudFloatA 42s linear infinite; opacity: .45; }

/* Hero dust particles */
.hero-dust {
  pointer-events: none; position: absolute; inset: 0;
  z-index: 6; overflow: visible;
}

.hero-dust .d {
  position: absolute; width: 6px; height: 6px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%,
    rgba(255,255,255,0.88), rgba(217,179,131,0.25) 40%,
    rgba(217,179,131,0.06) 65%, transparent 100%);
  filter: blur(1px); opacity: 0;
  transform: translate3d(0,0,0) scale(0.9);
  will-change: transform, opacity;
}

.hero-dust .d:nth-child(1) { left: 10%; top: 20%; width: 5px; height: 5px; animation: dustFloat  9s infinite ease-in-out  0s; opacity: .70; }
.hero-dust .d:nth-child(2) { left: 30%; top: 10%; width: 6px; height: 6px; animation: dustFloat 12s infinite ease-in-out .8s; opacity: .55; }
.hero-dust .d:nth-child(3) { left: 50%; top: 25%; width: 4px; height: 4px; animation: dustFloat 11s infinite ease-in-out 1.4s; opacity: .60; }
.hero-dust .d:nth-child(4) { left: 70%; top: 18%; width: 7px; height: 7px; animation: dustFloat 14s infinite ease-in-out 2.2s; opacity: .50; }
.hero-dust .d:nth-child(5) { left: 85%; top: 40%; width: 4px; height: 4px; animation: dustFloat 10s infinite ease-in-out .4s; opacity: .45; }
.hero-dust .d:nth-child(6) { left: 22%; top: 46%; width: 5px; height: 5px; animation: dustFloat 13s infinite ease-in-out 1.9s; opacity: .42; }
.hero-dust .d:nth-child(7) { left: 62%; top: 58%; width: 6px; height: 6px; animation: dustFloat 16s infinite ease-in-out 3.3s; opacity: .38; }
.hero-dust .d:nth-child(8) { left: 40%; top: 68%; width: 5px; height: 5px; animation: dustFloat 15s infinite ease-in-out 2.8s; opacity: .33; }

@keyframes fogSlowDrift {
  0%,100% { transform: translateX(-2%) translateY(0)   scale(1);    }
  50%     { transform: translateX( 2%) translateY(-1%) scale(1.02); }
}

@keyframes cloudBands {
  0%   { background-position:   0 0; transform: translateX(-1%); }
  50%  { background-position: 50% 0; transform: translateX( 1%); }
  100% { background-position: 100% 0; transform: translateX(-1%); }
}

@keyframes cloudFloatA {
  0%   { transform: translate3d(  0,   0, 0) scale(1);    opacity: 0;  }
  8%   {                                                   opacity: .7; }
  50%  { transform: translate3d( 18, -22, 0) scale(1.05); opacity: .6; }
  100% { transform: translate3d(-12,   8, 0) scale(1);    opacity: 0;  }
}

@keyframes cloudFloatB {
  0%   { transform: translate3d(  0,   0, 0) scale(1);    opacity: 0;   }
  10%  {                                                   opacity: .6;  }
  50%  { transform: translate3d(-28, -16, 0) scale(1.06); opacity: .55; }
  100% { transform: translate3d( 10,  12, 0) scale(1);    opacity: 0;   }
}

@keyframes dustFloat {
  0%   { transform: translate3d( 0,   0, 0) scale(0.95); opacity: 0;  }
  8%   {                                                  opacity: .7; }
  50%  { transform: translate3d( 8, -18, 0) scale(1.05); opacity: .6; }
  100% { transform: translate3d(-6,   8, 0) scale(0.95); opacity: 0;  }
}


/* =============================================================================
   9. RESPONSIVE OVERRIDES
   ============================================================================= */

/* Tablet (≤ 1200px) */
@media (max-width: 1200px) {
  .strip-hero .hero-title { font-size: 40px; }
}

/* Mobile (≤ 900px) */
@media (max-width: 900px) {
  .site-header { top: 12px; }

  .header-inner {
    padding-left: 18px !important;
    padding-right: 18px !important;
  }

  /* Show hamburger, hide desktop nav */
  .nav-toggle { display: flex !important; }

  .header-inner .top-right,
  .site-header .top-right {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    height: 0 !important;
    overflow: hidden !important;
  }

  /* Hero tighter on mobile */
  .strip-hero,
  #hero { padding-top: calc(var(--header-h) + 12px) !important; box-sizing: border-box; }

  /* Strips */
  .strip { padding: 50px 0; }
  .strip::before, .strip::after { height: 80px; }
  .strip .strip-bg { background-attachment: scroll; }

  /* Disable heavy effects for perf */
  .strip-hero::before,
  .strip-hero::after,
  .strip-hero .hero-clouds      { display: none !important; }
  .strip-hero .strip-bg         { animation: none !important; transform: none !important; background-attachment: scroll !important; }
  .hero-dust, .hero-dust .d     { display: none !important; animation: none !important; opacity: 0 !important; }
}

/* Small mobile (≤ 480px) */
@media (max-width: 480px) {
  .logo img            { height: 30px; }
  .site-header         { padding: 10px 0; }
  .strip-hero .hero-title { font-size: 22px; }
}

/* Desktop (≥ 900px) */
@media (min-width: 900px) {
  .site-header { position: absolute; top: 0; left: 0; right: 0; }
  .header-inner { padding-left: 14px !important; padding-right: 14px !important; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .strip-hero::before,
  .strip-hero::after,
  .strip-hero .hero-clouds .cloud { animation: none !important; opacity: .85 !important; }
}

/* Footer */
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid rgba(217,179,131,0.12);
  margin-top: 8px;
}

.footer-contact a {
  color: #9a8e7a;
  text-decoration: none;
  font-size: 0.88rem;
  transition: color .14s ease;
}

.footer-contact a:hover { color: var(--gold); }

.footer-agents a,
.footer-agents a:visited {
  color: #9a8e7a;
  text-decoration: none;
  font-size: 0.82rem;
  opacity: 0.7;
  transition: color .14s ease, opacity .14s ease;
}

.footer-agents a:hover {
  color: var(--gold);
  opacity: 1;
}

@media (max-width: 480px) {
  .footer-bottom { flex-direction: column; gap: 6px; text-align: center; }
}
