/* ==========================================
   ZAHRADNÍ SERVIS - Main Stylesheet
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@400;700&family=Quicksand:wght@400;500;600;700&display=swap');

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green: #5a8a3e;
  --green-dark: #3d6129;
  --green-light: #7ab356;
  --dark: #1c1c1c;
  --gray: #555;
  --gray-light: #f5f5f5;
  --border: #e0e0e0;
  --white: #ffffff;
  --sidebar-w: 240px;
  --transition: .25s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Quicksand', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--dark);
  background: var(--white);
}

h1, h2, h3, h4 {
  font-family: 'Comfortaa', cursive;
  font-weight: 700;
  line-height: 1.3;
}

h1 { font-size: 2rem; margin-bottom: 1.5rem; color: var(--dark); }
h2 { font-size: 1.45rem; margin: 2rem 0 1rem; color: var(--dark); }
h3 { font-size: 1.15rem; margin: 1.5rem 0 .75rem; color: var(--green-dark); }

p { margin-bottom: 1rem; color: var(--gray); }
a { color: var(--green); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--green-dark); }

img { max-width: 100%; display: block; }

ul { padding-left: 1.4rem; }
ul li { margin-bottom: .4rem; color: var(--gray); }

strong { font-weight: 700; color: var(--dark); }

/* --- Layout --- */
.layout {
  display: flex;
  min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--white);
  border-right: none;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}

.sidebar-logo {
  padding: 20px 20px 15px;
  border-bottom: none;
}

.sidebar-logo img {
  width: 160px;
  height: auto;
}

.sidebar-nav {
  flex: 1;
  padding: 10px 0;
}

.sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav ul li a {
  display: block;
  padding: 4px 22px;
  font-family: 'Quicksand', sans-serif;
  font-size: 15.6px;
  font-weight: 400;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--dark);
  transition: color var(--transition), background var(--transition), font-weight var(--transition);
}

.sidebar-nav ul li a:hover {
  color: var(--dark);
  background: var(--gray-light);
  font-weight: 700;
}

.sidebar-nav ul li.active a {
  color: var(--green);
  font-weight: 700;
}

.sidebar-social {
  padding: 15px 22px;
  border-top: none;
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
}

.sidebar-social a {
  color: var(--gray);
  font-size: 18px;
  transition: color var(--transition);
}

.sidebar-social a:hover { color: var(--green); }
.sidebar-social a.soc-fb:hover { color: #1877F2; }
.sidebar-social a.soc-ig:hover { color: #E1306C; }
.sidebar-social a.soc-yt:hover { color: #FF0000; }

/* --- Main Content --- */
.main-content {
  margin-left: calc(var(--sidebar-w) + 40px);
  flex: 1;
  min-height: 100vh;
}

/* --- Hero (Homepage) --- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 500px;
  overflow: hidden;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.25);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-logo {
  text-align: center;
  color: var(--white);
}

.hero-logo img {
  width: 250px;
  margin: 0 auto 16px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.4));
}

.hero-logo h1 {
  font-family: 'Comfortaa', cursive;
  font-size: 2.65rem;
  color: var(--white);
  text-shadow: 0 2px 8px rgba(0,0,0,.4);
  margin-bottom: 6px;
}

.hero-logo p {
  font-size: 1.1rem;
  color: rgba(255,255,255,.9);
  font-weight: 600;
  letter-spacing: .05em;
  text-shadow: 0 1px 4px rgba(0,0,0,.4);
}

/* --- Page Content Area --- */
.page-content {
  padding: 50px 60px 50px 80px;
  max-width: 1300px;
}

/* --- Section: Image + Text --- */
.img-text-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  margin: 2.5rem 0;
}

.img-text-section.img-right {
  direction: rtl;
}
.img-text-section.img-right > * {
  direction: ltr;
}

.img-text-section img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
}

.img-text-section .text-block h2 {
  margin-top: 0;
}

/* --- Section: Full Image --- */
.full-img-section {
  margin: 2rem 0;
}

.full-img-section img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 4px;
}

/* --- Section: Image Gallery (multi-col) --- */
.img-row {
  display: grid;
  gap: 12px;
  margin: 1.5rem 0;
}
.img-row.cols-2 { grid-template-columns: 1fr 1fr; }
.img-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }

.img-row img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 4px;
  transition: opacity var(--transition);
}
.img-row img:hover { opacity: .9; }

/* --- Section: List with checks --- */
.check-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}
.check-list li {
  padding: .3rem 0 .3rem 1.6rem;
  position: relative;
}
.check-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

/* --- Section: Highlight Box --- */
.highlight-box {
  background: #fff;
  padding: 20px 24px;
  margin: 1.5rem 0;
}
.highlight-box h3 { margin-top: 0; }

/* --- Gallery Page --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 2rem;
}

.gallery-item {
  cursor: pointer;
  overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 4/3;
}

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

.gallery-item:hover img {
  transform: scale(1.04);
  opacity: .9;
}

/* --- Lightbox --- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.lightbox.active { display: flex; }

.lightbox img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 2px;
}

.lightbox-close {
  position: absolute;
  top: 20px; right: 28px;
  font-size: 2.5rem;
  color: var(--white);
  cursor: pointer;
  line-height: 1;
  transition: opacity var(--transition);
}
.lightbox-close:hover { opacity: .7; }

.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.15);
  color: white;
  border: none;
  padding: 14px 18px;
  font-size: 1.4rem;
  cursor: pointer;
  border-radius: 3px;
  transition: background var(--transition);
}
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,.3); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* --- Contact Page --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-top: 1rem;
}

.contact-info h2 { margin-top: 1.5rem; }
.contact-info h2:first-child { margin-top: 0; }

.contact-info ul {
  list-style: none;
  padding: 0;
}

.contact-info ul li {
  padding: 4px 0;
  color: var(--gray);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.contact-info ul li::before {
  content: '▪';
  color: var(--green);
  font-size: .8rem;
  margin-top: 4px;
  flex-shrink: 0;
}

.contact-area {
  font-size: .95rem;
  color: var(--green);
  font-weight: 600;
  margin-top: 1rem;
}

/* --- Contact Form --- */
.contact-form h2 { margin-top: 0; }

.form-group {
  margin-bottom: 1.4rem;
}

.form-group label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 6px;
}

.form-group label .req { color: var(--green); }

.form-group input,
.form-group textarea {
  width: 100%;
  border: none;
  border-bottom: 2px solid var(--border);
  padding: 8px 0;
  font-family: 'Quicksand', sans-serif;
  font-size: .95rem;
  color: var(--dark);
  background: transparent;
  outline: none;
  transition: border-color var(--transition);
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  border-bottom-color: var(--green);
}

.form-group textarea { min-height: 110px; }

.btn {
  display: inline-block;
  padding: 13px 36px;
  background: var(--dark);
  color: var(--white);
  border: none;
  cursor: pointer;
  font-family: 'Quicksand', sans-serif;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .04em;
  transition: background var(--transition), transform var(--transition);
  border-radius: 2px;
}

.btn:hover {
  background: var(--green);
  transform: translateY(-1px);
}

.btn-green {
  background: var(--green);
}
.btn-green:hover { background: var(--green-dark); }

.form-msg {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 3px;
  font-size: .9rem;
  display: none;
}
.form-msg.success { background: #e8f5e9; color: #2e7d32; display: block; }
.form-msg.error { background: #fce4e4; color: #c62828; display: block; }

/* --- Page Header Image --- */
.page-hero {
  width: 100%;
  height: 260px;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* --- Mobile Toggle --- */
.mobile-toggle {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 200;
  background: var(--white);
  border: 1px solid var(--border);
  padding: 8px 10px;
  cursor: pointer;
  border-radius: 3px;
}

.mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--dark);
  margin: 4px 0;
  transition: all .3s;
}

/* --- Divider --- */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* --- Admin link in sidebar --- */
.sidebar-admin-link {
  padding: 12px 22px;
  border-top: 1px solid var(--border);
}
.sidebar-admin-link a {
  font-size: 11px;
  color: #aaa;
  letter-spacing: .05em;
}
.sidebar-admin-link a:hover { color: var(--green); }

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 900px) {
  .img-text-section {
    grid-template-columns: 1fr;
  }
  .img-text-section.img-right { direction: ltr; }
  .img-text-section img { height: auto; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .page-content { padding: 30px 30px; }
}

@media (max-width: 700px) {
  .mobile-toggle { display: block; }

  .sidebar {
    transform: translateX(-100%);
    transition: transform .3s ease;
    z-index: 150;
    box-shadow: 3px 0 16px rgba(0,0,0,.15);
  }

  .sidebar.open { transform: translateX(0); }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 140;
  }
  .sidebar-overlay.active { display: block; }

  .main-content { margin-left: 0; }

  .hero-logo img { width: 160px; }
  .hero-logo h1 { font-size: 1.8rem; }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .img-row.cols-3 { grid-template-columns: 1fr 1fr; }

  .page-content { padding: 20px 18px; }
  h1 { font-size: 1.6rem; }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .img-row.cols-2, .img-row.cols-3 { grid-template-columns: 1fr; }
}

/* --- Album grid (Reference) --- */
.album-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
  margin-top: 24px;
}
.album-card {
  text-decoration: none;
  color: inherit;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  transition: transform .2s;
  display: block;
}
.album-card:hover {
  transform: translateY(-3px);
}
.album-thumb {
  aspect-ratio: 1/1;
  overflow: hidden;
  background: #eee;
}
.album-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}
.album-card:hover .album-thumb img {
  transform: scale(1.04);
}
.album-no-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: #bbb;
}
.album-info {
  padding: 8px 0;
  text-align: center;
}
.album-name {
  font-weight: 400;
  font-size: 1.08rem;
  color: #333;
}
.album-count {
  display: none;
}

/* --- Masonry gallery (album detail) --- */
.gallery-masonry {
  columns: 3;
  column-gap: 12px;
  margin-top: 20px;
}
.gallery-masonry img {
  width: 100%;
  display: block;
  break-inside: avoid;
  margin-bottom: 12px;
  border-radius: 5px;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.gallery-masonry img:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
}
@media (max-width: 900px) {
  .gallery-masonry { columns: 2; }
}
@media (max-width: 480px) {
  .gallery-masonry { columns: 1; }
}

/* --- Homepage content --- */
.home-content {
  padding: 60px 60px 60px 80px;
  max-width: 1300px;
}
.home-intro {
  max-width: 720px;
  margin-bottom: 50px;
}
.home-intro h1 {
  font-family: 'Comfortaa', cursive;
  font-size: 2rem;
  color: var(--dark);
  margin-bottom: 16px;
}
.home-intro p {
  font-size: 1.05rem;
  color: var(--gray);
  line-height: 1.75;
  margin-bottom: 20px;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 50px;
}
.service-card {
  border-bottom: 3px solid var(--green);
  padding: 24px 0 20px;
}
.service-card h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.service-card p {
  font-size: .9rem;
  color: var(--gray);
  line-height: 1.6;
  margin-bottom: 14px;
}
.service-card a {
  font-size: .85rem;
  color: var(--green);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .03em;
}
.service-card a:hover { color: var(--green-dark); }
.home-area {
  background: var(--light);
  padding: 28px 32px;
  border-radius: 4px;
  margin-bottom: 40px;
}
.home-area h2 {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--dark);
  margin-bottom: 10px;
}
.home-area p {
  color: var(--gray);
  font-size: .95rem;
}
@media (max-width: 900px) {
  .home-content { padding: 40px 20px; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .home-intro h1 { font-size: 1.5rem; }
}
@media (max-width: 580px) {
  .services-grid { grid-template-columns: 1fr; }
}

/* --- Homepage tiles --- */
.home-lead {
  padding: 50px 60px 40px 80px;
  max-width: 900px;
}
.home-lead h1 {
  font-family: 'Comfortaa', cursive;
  font-size: 1.6rem;
  color: var(--dark);
  margin-bottom: 14px;
}
.home-lead p {
  font-size: 1rem;
  color: var(--gray);
  line-height: 1.75;
}
.home-tiles {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  padding: 0 60px 60px 80px;
}
.home-tile {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--dark);
  transition: transform var(--transition), box-shadow var(--transition);
}
.home-tile:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,.1); }
.home-tile-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}
.home-tile-body {
  padding: 14px 0 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.home-tile-body h2 {
  font-size: .9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--dark);
  margin-bottom: 6px;
}
.home-tile-body p {
  font-size: .85rem;
  color: var(--gray);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 12px;
}
.home-tile-btn {
  display: inline-block;
  padding: 8px 18px;
  background: var(--dark);
  color: var(--white);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
  border: none;
  transition: background var(--transition);
}
.home-tile:hover .home-tile-btn { background: var(--green); }
@media (max-width: 1100px) {
  .home-lead { padding: 40px 30px; }
  .home-tiles { grid-template-columns: repeat(3, 1fr); padding: 0 30px 40px; }
}
@media (max-width: 700px) {
  .home-lead { padding: 30px 20px; }
  .home-lead h1 { font-size: 1.3rem; }
  .home-tiles { grid-template-columns: repeat(2, 1fr); padding: 0 20px 30px; gap: 14px; }
}
@media (max-width: 420px) {
  .home-tiles { grid-template-columns: 1fr; }
}
