/* Google Fonts with font-display: swap */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700;900&display=swap');

/* CSS Variables */
:root {
  --primary: #845537;
  --text: #333;
  --bg: #f5f5f5;
  --white: #fff;
}

/* Font loading optimization */
html {
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html.fonts-loaded {
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  font-display: swap;
}

/* Typography with font-display: swap */
.text-center { text-align: center; }
.font-normal { font-weight: 400; }
.font-bold { font-weight: 700; }

/* Heading elements with explicit font sizes to prevent deprecation warnings */
h1 { 
  font-size: 1.2rem !important; 
  font-display: swap;
}
h2 { 
  font-size: 1.5rem; 
  font-display: swap;
}
h3 { 
  font-size: 1.25rem; 
  font-display: swap;
}

/* Specific font-size for h1 within sections using parent selectors */
.hero h1 { 
  font-size: 1.2rem !important; 
}
.section h1 { font-size: 1.875rem !important; }
article h1 { font-size: 1.2rem !important; }
aside h1 { font-size: 1.2rem !important; }
nav h1 { font-size: 1.2rem !important; }

.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }

/* Colors */
.text-primary { color: var(--primary); }
.text-white { color: var(--white); }
.bg-primary { background: var(--primary); }
.bg-white { background: var(--white); }

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  width: 100%;
  box-sizing: border-box;
}

.section {
  padding: 2rem 0;
}

/* Grid */
.grid-2 { 
  display: grid; 
  grid-template-columns: repeat(2, 1fr); 
  gap: 1rem; 
}

/* Flexbox */
.flex { display: flex; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

/* Spacing */
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }
.mt-16 { margin-top: 4rem; }
.mt-20 { margin-top: 5rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }

/* Components */
.card {
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  padding: 2rem;
}

/* Accommodation section */
.accommodation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: stretch;
  min-height: 500px;
}

.accommodation-image {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.accommodation-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.accommodation-image:hover img {
  transform: scale(1.05);
}

.accommodation-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.button-group {
  gap: 2rem;
}

.map-frame {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.static-map {
  display: block;
  position: relative;
  text-decoration: none;
  color: inherit;
}

.static-map img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.map-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: white;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.static-map:hover .map-overlay {
  opacity: 1;
}

/* Pricing page */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.pricing-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.pricing-table {
  margin-bottom: 1rem;
}

.pricing-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e5e5e5;
}

.pricing-date {
  flex: 1;
}

.pricing-price {
  flex: 0 0 auto;
  font-weight: 600;
}

.easter-section {
  margin: 1.5rem 0;
}

.easter-section p {
  margin-bottom: 0.5rem;
}

.rules-section p {
  margin-bottom: 0.5rem;
}

/* Image container improvements */
.image-container {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  position: relative;
  min-height: 400px;
  width: 100%;
}

.image-container img {
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

.image-container picture {
  width: 100%;
  height: auto;
  display: block;
}

.image-container picture img {
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center;
}

.desktop-image {
  display: block;
}

.mobile-image {
  display: none;
}

.desktop-title {
  display: none;
}

.mobile-title {
  display: block;
}

.image-container:hover img {
  transform: scale(1.05);
}

.pricing-image {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.pricing-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

@media (max-width: 768px) {
  .pricing-image {
    aspect-ratio: 2/1;
  }
}

.pricing-image:hover img {
  transform: scale(1.05);
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  text-align: center;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background: #6b4530;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(132, 85, 55, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(132, 85, 55, 0.3);
}

/* Navigation */
.navbar {
  overflow: hidden;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 999;
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: background 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease;
  height: 80px;
  min-height: 80px;
}

.navbar-solid {
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.r-transparentnavba {
  background: transparent;
  backdrop-filter: blur(10px);
  box-shadow: none;
}

.navbar-mobile-open {
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.navbar-nav {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 400;
  transition: color 0.3s ease;
}

/* Hamburger menu */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 30px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 10;
}

/* Desktop navigation - hide hamburger on larger screens */
@media (min-width: 601px) {
  .hamburger {
    display: none !important;
  }
  
  .navbar-nav {
    display: flex !important;
    position: static !important;
    background: none !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    gap: 2rem !important;
    flex-direction: row !important;
  }
}

.hamburger-line {
  width: 100%;
  height: 3px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.hamburger.active .hamburger-line:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}

.hamburger.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

/* Hero section - CLEAN VERSION */
.hero {
  position: relative;
  color: var(--white);
  text-align: center;
  padding: 3rem 0;
  height: 500px;
  min-height: 500px;
  max-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  padding-top: 80px;
  overflow: hidden;
  box-sizing: border-box;
}

.hero picture {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

.hero picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}



.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(132, 85, 55, 0.7), rgba(132, 85, 55, 0.7));
  z-index: -1;
}

.hero h1 {
  font-size: 1.2rem;
  font-weight: 900;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-logo {
  margin-bottom: 2rem;
  text-align: center;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-logo-animation {
  max-width: 300px;
  width: 300px;
  height: 200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  max-height: 200px;
  box-sizing: border-box;
}

.hero-subtitle {
  font-size: 1.2rem;
  font-weight: 300;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-phone {
  color: var(--white);
  text-decoration: none;
  font-weight: 900;
  font-size: 1.2rem;
  line-height: 1.2;
}

.hero-phone:hover {
  text-decoration: underline;
}

/* Gallery improvements */
.gallery {
  background: var(--white);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.gallery-item {
  aspect-ratio: 1;
  background: var(--bg);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 2rem;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-height: 150px;
}

.gallery-item:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

.gallery-item picture {
  width: 100%;
  height: 100%;
  display: block;
}

.gallery-item picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item.large {
  grid-column: span 2;
  aspect-ratio: 2/1;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  text-align: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  color: var(--white);
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
  z-index: 10000;
}

.lightbox-close:hover {
  color: var(--primary);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  pointer-events: none;
}

.lightbox-prev,
.lightbox-next {
  background: rgba(132, 85, 55, 0.8);
  color: var(--white);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  pointer-events: auto;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--primary);
  transform: scale(1.1);
}

/* Footer */
.footer {
  background: linear-gradient(rgba(132, 85, 55, 0.8), rgba(132, 85, 55, 0.8)), url('../images/backgrounds/bg-form.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--white);
  padding: 2rem 0;
}

.reservation-card {
  max-width: 600px;
  margin: 0 auto;
  background: var(--white);
  color: var(--text);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.contact-link {
  color: var(--primary);
  text-decoration: underline;
  transition: color 0.3s ease;
}

.contact-link:hover {
  color: #6b4530;
}

.separator {
  border: none;
  height: 1px;
  background: var(--primary);
  margin: 2rem 0;
  opacity: 0.3;
}

/* Map placeholder */
.map-placeholder {
  width: 100%;
  height: 300px;
  background: var(--bg);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 1.125rem;
}

/* Map frame improvements */
.map-frame {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.static-map {
  display: block;
  position: relative;
  text-decoration: none;
  color: inherit;
}

.static-map img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.map-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: white;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.static-map:hover .map-overlay {
  opacity: 1;
}

/* Responsive improvements */
@media (max-width: 768px) {
  .container {
    padding: 0 0.5rem;
  }
  
  .accommodation-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    min-height: auto;
  }
  
  .image-container {
    min-height: 250px;
  }
  
  .mobile-hidden {
    display: block;
  }
  
  .desktop-image {
    display: none;
  }
  
  .mobile-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
  
  .accommodation-image {
    display: none;
  }
  
  .card {
    padding: 1rem;
  }
  
  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .pricing-image {
    order: -1;
  }
  
  .pricing-content {
    order: 1;
  }
  
  /* Gallery responsive improvements */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  
  .gallery-item {
    min-height: 120px;
  }
  
  .gallery-item.large {
    grid-column: span 2;
    aspect-ratio: 2/1;
  }
}

/* Mobile and tablet styles - hamburger menu from 600px down */
@media (max-width: 600px) {
  .navbar-nav {
    display: none;
    position: fixed;
    top: 80px; /* Výška navbar */
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 1rem;
    gap: 1rem;
    flex-direction: column;
    z-index: 998; /* Pod navbar ale nad obsah */
  }
  
  .navbar-nav.active {
    display: flex;
  }
  
  /* Mobile menu always has dark text */
  .navbar-nav.active .nav-link {
    color: #333333 !important;
  }
  
  .hamburger {
    display: flex;
  }
  
  .container {
    padding: 0 0.5rem;
  }
  
  .accommodation-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    min-height: auto;
  }
  
  .image-container {
    min-height: 200px;
  }
  
  .mobile-hidden {
    display: block;
  }
  
  .desktop-image {
    display: none;
  }
  
  .mobile-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
  
  .accommodation-image {
    display: none;
  }
  
  .card {
    padding: 1rem;
  }
  
  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .pricing-image {
    order: -1;
  }
  
  .pricing-content {
    order: 1;
  }
  
  /* Gallery mobile improvements - keep 2 columns */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  
  .gallery-item {
    min-height: 100px;
  }
  
  .gallery-item.large {
    grid-column: span 2;
    aspect-ratio: 2/1;
  }
  
  /* Show all gallery items on mobile */
  .gallery-item:last-child {
    display: flex;
  }
  
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  /* Keep 2 columns but adjust sizing */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  
  .gallery-item {
    min-height: 80px;
  }
  
  .gallery-item.large {
    grid-column: span 2;
    aspect-ratio: 2/1;
  }
}

@media (max-width: 330px) {
  body {
    font-size: 0.875rem;
  }
  
  .container {
    padding: 0 0.25rem;
  }
  
  .card {
    padding: 0.75rem;
  }
  
  .section {
    padding: 1rem 0;
  }
  
  .text-lg {
    font-size: 1rem;
  }
  
  .text-2xl {
    font-size: 1.25rem;
  }
  
  .button-group {
    flex-direction: column;
    gap: 1rem;
  }
  
  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }
  
  .hero h1 {
    font-size: 1rem !important;
  }
  
  /* Keep 2 columns even on very small screens */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.25rem;
  }
  
  .gallery-item {
    min-height: 60px;
  }
  
  .gallery-item.large {
    grid-column: span 2;
    aspect-ratio: 2/1;
  }
  
  .gallery-item:last-child {
    display: flex;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 1rem;
  }
}

@media (min-width: 769px) {
  .desktop-title {
    display: block;
  }
  
  .mobile-title {
    display: none;
  }
  
  .desktop-image {
    display: block;
  }
  
  .mobile-image {
    display: none;
  }
  
  .mobile-hidden {
    display: block;
  }
}

/* Mobile gallery order - change order on mobile devices */
@media (max-width: 768px) {
  .gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  
  /* Reorder gallery items for mobile ONLY */
  .gallery-grid .gallery-item.mobile-first-large {
    order: 1; /* Kuchyň (velký obrázek) první */
  }
  
  .gallery-grid .gallery-item.mobile-first {
    order: 2; /* Chodba */
  }
  
  .gallery-grid .gallery-item.mobile-second {
    order: 3; /* Postele */
  }
  
  .gallery-grid .gallery-item.mobile-third {
    order: 4; /* Postel dole */
  }
  
  .gallery-grid .gallery-item.mobile-fourth {
    order: 5; /* Postel nahoře */
  }
  
  .gallery-grid .gallery-item.mobile-fifth {
    order: 6; /* Sprcha */
  }
  
  .gallery-grid .gallery-item.mobile-sixth {
    order: 7; /* Kohoutek */
  }
} 