/* =====================================================
   Farma Fajnor — Stylesheet
   Aesthetic: Warm rustic • Earthy tones • Natural textures
   Fonts: Playfair Display (display) + Lato (body)
   ===================================================== */

:root {
  --cream:     #f7f2e9;
  --warm-white:#fdfaf4;
  --brown:     #3d2b1f;
  --brown-mid: #6b4c38;
  --brown-light:#a0714f;
  --gold:      #c9922a;
  --gold-light:#e8b96a;
  --green:     #4a6741;
  --green-light:#7a9e72;
  --dark:      #1e1610;
  --dark-mid:  #2e2018;
  --text:      #3a2e24;
  --text-muted:#7a6a5a;
  --border:    #ddd0be;

  --radius:    8px;
  --radius-lg: 16px;
  --shadow:    0 4px 24px rgba(61,43,31,0.12);
  --shadow-lg: 0 12px 48px rgba(61,43,31,0.2);

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Lato', 'Helvetica Neue', sans-serif;
  --font-serif:   'Libre Baskerville', Georgia, serif;

  --navbar-h: 72px;
  --transition: 0.3s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--warm-white);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* =================== CONTAINER =================== */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =================== BUTTONS =================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn--primary {
  background: var(--brown);
  color: var(--cream);
  border-color: var(--brown);
}
.btn--primary:hover {
  background: var(--brown-mid);
  border-color: var(--brown-mid);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(61,43,31,0.3);
}

.btn--outline {
  background: transparent;
  color: var(--cream);
  border-color: rgba(247,242,233,0.6);
}
.btn--outline:hover {
  background: rgba(247,242,233,0.15);
  border-color: var(--cream);
}

.btn--ghost {
  background: transparent;
  color: var(--brown);
  border-color: var(--border);
}
.btn--ghost:hover {
  background: var(--cream);
  border-color: var(--brown-light);
}

.btn--full { width: 100%; justify-content: center; }

.btn--gold {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
}
.btn--gold:hover {
  background: #b07e20;
  border-color: #b07e20;
}

/* =================== NAVBAR =================== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--navbar-h);
  background: rgba(30,22,16,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201,146,42,0.2);
  transition: all var(--transition);
}

.navbar.scrolled {
  height: 60px;
  background: rgba(30,22,16,0.98);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.navbar__inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand__logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(201,146,42,0.4);
}

.brand__name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--cream);
  letter-spacing: 0.02em;
}

.brand__name em {
  font-style: italic;
  color: var(--gold-light);
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.navbar__links a {
  padding: 8px 16px;
  border-radius: var(--radius);
  color: rgba(247,242,233,0.8);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: all var(--transition);
}

.navbar__links a:hover,
.navbar__links a.active {
  color: var(--gold-light);
  background: rgba(201,146,42,0.12);
}

.navbar__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}

.navbar__burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--cream);
  border-radius: 2px;
  transition: all var(--transition);
}

/* =================== HERO =================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: var(--navbar-h);
  /* Pevné pozadí přímo na .hero — žádné závislosti */
  background:
    radial-gradient(ellipse at 10% 60%, rgba(74,103,65,0.6) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 20%, rgba(201,146,42,0.4) 0%, transparent 45%),
    linear-gradient(150deg, #3a2810 0%, #2d4020 50%, #1a2010 100%);
}

.hero__bg {
  display: none; /* pozadí je přímo na .hero */
}

.hero__pattern {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: radial-gradient(circle, #fff 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.hero__overlay {
  display: none; /* overlay nepotřebujeme */
}

.hero__inner {
  position: relative;
  z-index: 2;
  max-width: 720px;
  padding-top: 40px;
  padding-bottom: 80px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border: 1px solid rgba(201,146,42,0.4);
  border-radius: 40px;
  background: rgba(201,146,42,0.1);
  color: var(--gold-light);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 32px;
  /* animation removed for reliability */
}

.badge__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.8); }
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(48px, 7vw, 88px);
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 28px;
  /* animation removed */
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.hero__title em {
  font-style: italic;
  color: var(--gold-light);
  display: block;
}

.hero__lead {
  font-size: clamp(16px, 2vw, 19px);
  color: rgba(255,255,255,0.9);
  line-height: 1.8;
  margin-bottom: 40px;
  max-width: 560px;
  /* animation removed */
}

.hero__cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  /* animation removed */
}

.hero__scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(247,242,233,0.5);
  animation: bounce 2s ease infinite;
  z-index: 2;
}

.hero__scroll svg {
  width: 28px;
  height: 28px;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =================== SECTIONS =================== */
.section {
  padding: 96px 0;
  position: relative;
}

.section--dark {
  background: var(--dark-mid);
}

.section__head {
  text-align: center;
  margin-bottom: 64px;
}

.section__head--light {
  color: var(--cream);
}

.section__tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 6px 16px;
  border: 1px solid rgba(201,146,42,0.3);
  border-radius: 40px;
  margin-bottom: 20px;
  background: rgba(201,146,42,0.06);
}

.section__tag--light {
  color: var(--gold-light);
  border-color: rgba(232,185,106,0.3);
  background: rgba(232,185,106,0.06);
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--brown);
  margin-bottom: 20px;
}

.section__title--light { color: var(--cream); }

.section__lead {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.8;
}

.section__lead--light { color: rgba(247,242,233,0.7); }

/* =================== ABOUT CARDS =================== */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 80px;
}

.about-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}

.about-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brown), var(--gold));
  opacity: 0;
  transition: opacity var(--transition);
}

.about-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--brown-light);
}

.about-card:hover::before { opacity: 1; }

.about-card__icon {
  font-size: 36px;
  margin-bottom: 16px;
  display: block;
}

.about-card h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--brown);
  margin-bottom: 10px;
}

.about-card p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
}

/* =================== STORY =================== */
.about-story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-story__img {
  position: relative;
}

.story__logo-img {
  width: 100%;
  max-width: 400px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 4px solid var(--cream);
}

.story__decor {
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 180px;
  height: 180px;
  border: 3px solid var(--gold);
  border-radius: var(--radius-lg);
  opacity: 0.3;
  z-index: -1;
}

.about-story__text h3 {
  font-family: var(--font-display);
  font-size: 36px;
  font-style: italic;
  color: var(--brown);
  margin-bottom: 24px;
}

.about-story__text p {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 16px;
  line-height: 1.8;
}

/* =================== GALLERY =================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
  background: var(--dark);
}

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

.gallery-item__overlay {
  position: absolute;
  inset: 0;
  background: rgba(30,22,16,0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.gallery-item__overlay span {
  font-size: 32px;
  color: white;
  opacity: 0;
  transform: scale(0.8);
  transition: all var(--transition);
}

.gallery-item:hover img { transform: scale(1.06); }
.gallery-item:hover .gallery-item__overlay {
  background: rgba(30,22,16,0.4);
}
.gallery-item:hover .gallery-item__overlay span {
  opacity: 1;
  transform: scale(1);
}

.gallery-item__caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 12px 16px;
  background: linear-gradient(transparent, rgba(30,22,16,0.8));
  color: white;
  font-size: 13px;
  transform: translateY(100%);
  transition: transform var(--transition);
}

.gallery-item:hover .gallery-item__caption {
  transform: translateY(0);
}

.gallery__empty {
  text-align: center;
  padding: 60px;
  color: rgba(247,242,233,0.5);
  font-style: italic;
}

/* =================== CONTACT =================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 64px;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.contact-item__icon {
  width: 48px;
  height: 48px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.contact-item small {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

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

.contact-social {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 700;
  color: var(--brown);
  transition: all var(--transition);
}

.social-btn:hover {
  background: var(--brown);
  color: var(--cream);
  border-color: var(--brown);
}

/* =================== CONTACT FORM =================== */
.contact-form {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brown-mid);
}

.field input,
.field textarea {
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--warm-white);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  transition: border-color var(--transition);
  outline: none;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--brown-mid);
  box-shadow: 0 0 0 3px rgba(106,76,56,0.1);
}

.cf-result {
  padding: 14px 20px;
  border-radius: var(--radius);
  font-weight: 700;
  text-align: center;
  font-size: 14px;
}

.cf-result--success {
  background: rgba(74,103,65,0.1);
  color: var(--green);
  border: 1px solid rgba(74,103,65,0.3);
}

.cf-result--error {
  background: rgba(180,60,60,0.1);
  color: #b43c3c;
  border: 1px solid rgba(180,60,60,0.3);
}

/* =================== FOOTER =================== */
.footer {
  background: var(--dark);
  color: rgba(247,242,233,0.7);
  padding: 64px 0 0;
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(247,242,233,0.1);
}

.footer__brand img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 16px;
  border: 2px solid rgba(201,146,42,0.3);
}

.footer__brand p {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(247,242,233,0.55);
}

.footer__nav,
.footer__contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer__nav h4,
.footer__contact h4 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.footer__nav a {
  font-size: 14px;
  color: rgba(247,242,233,0.6);
  transition: color var(--transition);
}

.footer__nav a:hover { color: var(--gold-light); }

.footer__contact span {
  font-size: 14px;
  color: rgba(247,242,233,0.6);
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
}

.footer__bottom span {
  font-size: 13px;
  color: rgba(247,242,233,0.4);
}

.footer__admin-link {
  font-size: 12px;
  color: rgba(247,242,233,0.25);
  transition: color var(--transition);
}

.footer__admin-link:hover { color: rgba(247,242,233,0.6); }

/* =================== LIGHTBOX =================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.95);
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox.open {
  display: flex;
}



.lightbox__img-wrap {
  max-width: 90vw;
  max-height: 90vh;
  position: relative;
}

.lightbox__img-wrap img {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: var(--radius);
  object-fit: contain;
}

.lightbox__caption {
  text-align: center;
  color: rgba(255,255,255,0.7);
  margin-top: 16px;
  font-size: 14px;
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: fixed;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover {
  background: rgba(255,255,255,0.25);
}

.lightbox__close { top: 20px; right: 20px; width: 44px; height: 44px; }
.lightbox__prev { left: 20px; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 28px; }
.lightbox__next { right: 20px; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 28px; }

/* =================== TOAST =================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 14px 20px;
  border-radius: var(--radius);
  background: var(--brown);
  color: var(--cream);
  font-size: 14px;
  font-weight: 700;
  box-shadow: var(--shadow);
  animation: slideIn 0.3s ease;
  max-width: 300px;
}

.toast--success { background: var(--green); }
.toast--error { background: #b43c3c; }

@keyframes slideIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =================== ADMIN LINK in footer =================== */
/* =================== RESPONSIVE =================== */
@media (max-width: 900px) {
  .about-story { grid-template-columns: 1fr; }
  .about-story__img { display: none; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .navbar__links { display: none; }
  .navbar__links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--navbar-h);
    left: 0; right: 0;
    background: var(--dark);
    padding: 24px;
    gap: 8px;
    border-bottom: 1px solid rgba(201,146,42,0.2);
  }
  .navbar__links.open a {
    padding: 14px 16px;
    text-align: center;
    border-radius: var(--radius);
  }
  .navbar__burger { display: flex; }
  .field-row { grid-template-columns: 1fr; }
  .hero__cta { flex-direction: column; }
  .footer__inner { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; gap: 12px; text-align: center; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .lightbox__prev { left: 8px; }
  .lightbox__next { right: 8px; }
  .contact-form { padding: 24px; }
}

/* =================== SECTION DIVIDERS =================== */
.section + .section--dark::before,
.section--dark + .section::before {
  content: '';
  display: block;
}

/* =================== SCROLL REVEAL =================== */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* =================== SELECTION =================== */
::selection {
  background: var(--gold);
  color: #fff;
}
