@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap");

:root {
  /* Modern Color Palette - Enhanced Woodworking Theme */
  --primary-color: #8b4513; /* Saddle Brown */
  --primary-dark: #5d4037; /* Deep wood brown */
  --primary-light: #deb887; /* Burlywood */
  --secondary-color: #556b2f; /* Dark Olive Green */
  --accent-color: #cd853f; /* Peru (Golden wood) */
  --accent-light: #ffb74d; /* Light amber */
  --light-color: #fff8f0; /* Floral White */
  --dark-color: #2c1b18; /* Very dark brown */
  --text-color: #3e2723; /* Dark brown text */
  --text-light: #5d4037; /* Lighter brown text */
  --background: #faf3e0; /* Beige/Cream background */
  --surface: #ffffff; /* White */
  --border: #d7ccc8; /* Light brown border */
  --border-light: #efebe9;

  /* Typography */
  --font-primary: "Inter", system-ui, -apple-system, sans-serif;
  --font-heading: "Playfair Display", serif;

  /* Font Sizes */
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 2rem;
  --font-size-4xl: 2.5rem;
  --font-size-5xl: 3.5rem;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 0.75rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 5rem;

  /* Effects */
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 12px;
  --border-radius-full: 9999px;

  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-slow: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);

  --shadow-sm: 0 1px 3px rgba(62, 39, 35, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(62, 39, 35, 0.1),
    0 2px 4px -1px rgba(62, 39, 35, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(62, 39, 35, 0.1),
    0 4px 6px -2px rgba(62, 39, 35, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(62, 39, 35, 0.1),
    0 10px 10px -5px rgba(62, 39, 35, 0.04);

  /* Gradients */
  --gradient-primary: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-dark)
  );
  --gradient-wood: linear-gradient(
    to bottom,
    rgba(139, 69, 19, 0.8),
    rgba(93, 64, 55, 0.9)
  );
  --gradient-accent: linear-gradient(120deg, var(--accent-color), #8b4513);

  --max-width-content: 1200px;
  --max-width-narrow: 800px;
}

/* Base Styles */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background);
  /* Subtle wood texture pattern */
  background-image: radial-gradient(var(--primary-light) 1px, transparent 1px),
    radial-gradient(var(--primary-light) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: 0 0, 20px 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  animation: pageFadeIn 0.8s ease-out;
}

@keyframes pageFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
  color: var(--primary-dark);
}

h1 {
  font-size: var(--font-size-5xl);
}
h2 {
  font-size: var(--font-size-4xl);
}
h3 {
  font-size: var(--font-size-3xl);
}
h4 {
  font-size: var(--font-size-2xl);
}

p {
  margin-bottom: var(--spacing-md);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}
#hlavny-obsah, section { padding: auto; margin: auto; }
/* Header & Nav */
#cela_hlavicka {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
  border-bottom: 3px solid var(--primary-light);
}

#cela_hlavicka.scrolled {
  box-shadow: var(--shadow-md);
  padding: 0;
}

.hlavicka {
  max-width: var(--max-width-content);
  margin: 0 auto;
  padding: var(--spacing-sm) var(--spacing-md);
}

.hlavax {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nadpis {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  margin: 0;
  letter-spacing: -0.5px;
}

.nadpis a {
  color: var(--primary-dark);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Menu */
.menu ul {
  display: flex;
  list-style: none;
  gap: var(--spacing-md);
  margin: 0;
}

.menu a {
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius-full);
  position: relative;
  overflow: hidden;
  color: var(--text-color);
}

.menu a::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary-light);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.3s ease;
  z-index: -1;
  border-radius: var(--border-radius-full);
}

.menu a:hover::before {
  transform: scaleY(1);
}

.menu a:hover,
.menu a.active {
  color: var(--primary-dark);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--primary-dark);
}

@media (max-width: 768px) {
  .menu ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    text-align: center;
    padding: var(--spacing-md);
    box-shadow: var(--shadow-lg);
    border-top: 1px solid var(--border-light);
    animation: slideDown 0.3s ease-out;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .menu ul.active {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }
}


.hero {
  position: relative;
  background-color: var(--primary-dark);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: white;
  text-align: center;
  padding: var(--spacing-3xl) var(--spacing-md);
  margin-bottom: var(--spacing-2xl);
  /* Create a curved bottom edge */
  border-radius: 0 0 50% 50% / 40px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
 

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  animation: heroContentIn 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes heroContentIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  margin-bottom: var(--spacing-md);
}

.hero .lead {
  font-size: 1.5rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: var(--spacing-lg);
  font-family: var(--font-heading);
  font-style: italic;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.8em 1.8em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--border-radius-md);
  transition: var(--transition);
  cursor: pointer;
  border: none;
  text-align: center;
  font-size: 1rem;
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  filter: brightness(1.1);
  color: white;
}

.btn-outline-light {
  background: transparent;
  border: 2px solid white;
  color: white;
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  color: white;
}

.btn-secondary {
  background: var(--secondary-color);
  color: white;
}
.btn-secondary:hover {
  background: #3e4e24; /* Darker secondary */
  color: white;
  transform: translateY(-2px);
}

.btn-accent {
  background: var(--accent-color);
  color: white;
}
.btn-accent:hover {
  background: #a0622a; /* Darker accent */
  color: white;
  transform: translateY(-2px);
}

/* Forms */
.form-group {
  margin-bottom: var(--spacing-md);
}

.form-label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 500;
  color: var(--primary-dark);
  font-size: 0.95rem;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--border-radius-md);
  background-color: var(--surface);
  font-family: var(--font-primary);
  font-size: 1rem;
  color: var(--text-color);
  transition: var(--transition);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(205, 133, 63, 0.2);
  background-color: white;
}

.form-textarea {
  min-height: 150px;
  resize: vertical;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #999;
}

/* Sections */
.section {
  padding: var(--spacing-xl) 0;
}

.container {
  max-width: var(--max-width-content);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.section-header {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.section-header h2 {
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
}

.section-header h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--accent-color);
  border-radius: var(--border-radius-full);
}

/* Features */
.feature-card {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-lg);
  text-align: center;
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-color);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
}

/* Gallery Grid */
.galeria-grid {
  display: grid; /* Changed to grid for better responsiveness */
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-md);
  padding: var(--spacing-md) 0;
}

.galeria-polozka {
  position: relative;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1/1; 
}

.galeria-polozka img {
  width: 100%;
  height: 100%;
  object-fit:contain;
  transition: transform 0.8s ease;
  opacity: 1;
}

.galeria-polozka:hover img {
  transform: scale(2);
  opacity: 0.8;
}

.galeria-popis {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: var(--spacing-md);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  color: white;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.galeria-polozka:hover .galeria-popis {
  transform: translateY(0);
}

.galeria-popis h3 {
  color: white;
  font-size: 1.2rem;
  margin: 0;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.galeria-popis p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  margin: 0;
}

/* Card generic */
.card {
  background: white;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--spacing-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

.card-body {
  padding: var(--spacing-lg);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  z-index: 3000;
  inset: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: modalSlideUp 1.0s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition: opacity 0.5s ease;
}

.lightbox.otvoreny {
  display: flex;
  opacity: 1;
  animation: modalSlideUp 1.0s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Wrapper now just ensures grouping, but fits within flex parent */
.lightbox-obrazok-wrapper {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000; /* Behind controls */
  pointer-events: none;
}

.lightbox-obrazok {
  max-width: 98vw;
  max-height: 98vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--border-radius-sm);
  pointer-events: auto;
  animation: zoomIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes zoomIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.lightbox-zatvor {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 3rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  z-index: 3005;
  transition: all 0.3s;
  background: transparent;
  width: 50px;
  height: 50px;
  text-align: center;
}

.lightbox-zatvor:hover {
  color: white;
  transform: scale(1.1);
}

.lightbox-navigacia {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.05);
  border-color: white;
  color: rgba(255, 255, 255, 0.8);
  z-index: 3005;
  padding: 0;
  font-size: 2rem;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  backdrop-filter:initial
}

.lightbox-navigacia:hover {
  color: white;
  border-color: white;
  transform: translateY(-50%) scale(1.1);
}

.lightbox-pred {
  left: 20px;
  padding:30px;
  border-color: white;
}
.lightbox-dalsi {
  right: 20px;
  padding:30px;
  border-color: white;
}

.lightbox-popis {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  max-width: 90%;
  text-align: center;
  color: white;
  pointer-events: none;
  z-index: 3005;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
  background: rgba(0,0,0,0.5);
  padding: 10px 20px;
  border-radius: 20px;
  backdrop-filter: blur(5px);
}

/* Utilities */
.text-center {
  text-align: center;
}
.mb-lg {
  margin-bottom: var(--spacing-lg);
}
.mt-xl {
  margin-top: var(--spacing-xl);
}
.mt-lg {
  margin-top: var(--spacing-lg);
}
.mt-md {
  margin-top: var(--spacing-md);
}
.img-fluid {
  max-width: 100%;
  height: auto;
}
.shadow-md {
  box-shadow: var(--shadow-md);
}
.rounded {
  border-radius: var(--border-radius-lg);
}

/* Footer */
footer {
  background: var(--dark-color);
  color: var(--light-color);
  padding: var(--spacing-xl) 0;
  text-align: center;
  margin-top: var(--spacing-3xl);
  border-top: 4px solid var(--accent-color);
}

footer a {
  color: var(--accent-color);
}

footer a:hover {
  color: var(--accent-light);
}

footer svg {
  fill: currentColor;
  margin-top: 10px;
  transition: transform 0.3s;
}

footer svg:hover {
  transform: scale(1.1);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: none; /* Flex when active */
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  background: var(--surface);
  padding: var(--spacing-xl);
  width: min(500px, 90%);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
  border-top: 5px solid var(--primary-color);
  color: var(--text-color);
  position: relative;
  animation: modalSlideUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--text-color);
  transition: color 0.3s;
}

.modal-close:hover {
  color: var(--primary-color);
}

.modal-footer {
  margin-top: var(--spacing-md);
  text-align: right;
}
