/* ==========================================================================
   Znalecké posudky – nemovitosti a pozemky
   Sdílený stylopis pro celý statický web
   ========================================================================== */

:root {
  --navy: #14304d;
  --navy-dark: #0c2036;
  --navy-light: #e8eef4;
  --blue: #2f6690;
  --blue-light: #f0f5f9;
  --gray-900: #20242b;
  --gray-700: #4b5563;
  --gray-500: #6b7684;
  --gray-400: #9aa3ad;
  --gray-200: #e2e6ea;
  --gray-100: #f5f7f9;
  --white: #ffffff;
  --radius-sm: 4px;
  --radius: 10px;
  --shadow: 0 2px 14px rgba(20, 48, 77, 0.09);
  --shadow-lg: 0 8px 30px rgba(20, 48, 77, 0.14);
  --max-width: 1120px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: 'Lora', Georgia, 'Times New Roman', serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

iframe {
  max-width: 100%;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.25;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

ul, ol {
  margin: 0 0 1em;
  padding-left: 1.3em;
}

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

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--navy);
  color: var(--white);
  padding: 10px 16px;
  z-index: 1000;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  left: 20px;
  top: 20px;
}

/* ==========================================================================
   Header / navigace
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand:hover, .brand:focus {
  text-decoration: none;
}

.brand-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--navy);
}

.brand-sub {
  font-size: 0.8rem;
  color: var(--gray-500);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 22px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--navy);
  border-radius: 2px;
}

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

.primary-nav > ul {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.primary-nav > ul > li {
  position: relative;
}

.primary-nav > ul > li > a,
.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 10px 12px;
  color: var(--gray-900);
  font-size: 0.95rem;
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  border-radius: var(--radius-sm);
}

.primary-nav a[aria-current="page"] {
  color: var(--blue);
  font-weight: 700;
}

.primary-nav > ul > li > a:hover,
.dropdown-toggle:hover,
.dropdown-toggle[aria-expanded="true"] {
  background: var(--navy-light);
  text-decoration: none;
}

.nav-cta {
  background: var(--navy) !important;
  color: var(--white) !important;
  padding: 10px 18px !important;
}

.nav-cta:hover {
  background: var(--blue) !important;
}

.dropdown-toggle .caret {
  font-size: 0.6em;
  transition: transform 0.15s ease;
}

.dropdown-toggle[aria-expanded="true"] .caret {
  transform: rotate(180deg);
}

.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
}

.has-dropdown.open .dropdown {
  display: block;
}

.dropdown li a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--gray-900);
  font-size: 0.93rem;
}

.dropdown li a:hover {
  background: var(--navy-light);
  text-decoration: none;
}

@media (min-width: 861px) {
  .has-dropdown:hover .dropdown,
  .has-dropdown:focus-within .dropdown {
    display: block;
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: flex;
  }

  .primary-nav {
    display: none;
    width: 100%;
    order: 3;
  }

  .primary-nav.open {
    display: block;
  }

  .primary-nav > ul {
    flex-direction: column;
    align-items: stretch;
    padding: 10px 0 18px;
    gap: 0;
    border-top: 1px solid var(--gray-200);
  }

  .primary-nav > ul > li > a,
  .dropdown-toggle {
    width: 100%;
    justify-content: space-between;
    padding: 12px 6px;
  }

  .dropdown {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 12px;
    display: none;
  }

  .has-dropdown.open .dropdown {
    display: block;
  }

  .header-inner {
    flex-wrap: wrap;
  }

  .nav-cta {
    margin-top: 6px;
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  background:
    linear-gradient(135deg, rgba(20, 48, 77, 0.93) 0%, rgba(12, 32, 54, 0.95) 100%),
    url('https://images.pexels.com/photos/1575939/pexels-photo-1575939.jpeg?auto=compress&cs=tinysrgb&w=1600') center/cover no-repeat;
  color: var(--white);
  padding: 64px 0;
}

.hero h1 {
  color: var(--white);
  max-width: 780px;
}

.hero .lead {
  font-size: 1.15rem;
  color: var(--gray-200);
  max-width: 640px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.page-hero {
  background: var(--navy-light);
  padding: 44px 0;
  border-bottom: 1px solid var(--gray-200);
}

.page-hero h1 {
  margin-bottom: 0.3em;
}

.page-hero .lead {
  color: var(--gray-700);
  max-width: 720px;
  font-size: 1.05rem;
  margin-bottom: 0;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-bottom: 14px;
}

.breadcrumb a {
  color: var(--gray-500);
}

.page-hero-photo {
  background:
    linear-gradient(135deg, rgba(20, 48, 77, 0.88) 0%, rgba(12, 32, 54, 0.92) 100%),
    var(--hero-bg-image) center/cover no-repeat;
  border-bottom: none;
  padding: 56px 0;
}

.page-hero-photo h1 {
  color: var(--white);
}

.page-hero-photo .lead {
  color: var(--gray-200);
}

.page-hero-photo .breadcrumb,
.page-hero-photo .breadcrumb a {
  color: var(--gray-200);
}

/* ==========================================================================
   Tlačítka
   ========================================================================== */

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn:hover, .btn:focus {
  text-decoration: none;
}

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

.btn-primary:hover {
  background: var(--gray-100);
}

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

section .btn-primary,
.page-section .btn-primary {
  background: var(--navy);
  color: var(--white);
}

section .btn-primary:hover,
.page-section .btn-primary:hover {
  background: var(--blue);
}

.btn-outline {
  border-color: rgba(255,255,255,0.7);
  color: var(--white);
  background: transparent;
}

.btn-outline:hover {
  background: rgba(255,255,255,0.12);
}

.page-section .btn-outline {
  border-color: var(--navy);
  color: var(--navy);
}

.page-section .btn-outline:hover {
  background: var(--navy-light);
}

/* ==========================================================================
   Obecné sekce a mřížky
   ========================================================================== */

.page-section {
  padding: 56px 0;
}

.page-section.alt {
  background: var(--gray-100);
}

.page-section.dark {
  background:
    linear-gradient(135deg, rgba(20, 48, 77, 0.80) 0%, rgba(12, 32, 54, 0.85) 100%),
    url('https://images.pexels.com/photos/7641904/pexels-photo-7641904.jpeg?auto=compress&cs=tinysrgb&w=1600') center/cover no-repeat;
  color: var(--white);
}

.page-section.dark h2 {
  color: var(--white);
}

.page-section.dark .section-intro {
  color: var(--gray-200);
}

.page-section.dark .card {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: none;
  padding: 22px;
}

.page-section.dark .card h3 {
  color: var(--white);
}

.page-section.dark .card p {
  color: var(--gray-200);
}

.page-section.dark .card-link {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.section-intro {
  max-width: 720px;
}

.grid {
  display: grid;
  gap: 22px;
}

.grid > *,
.contact-grid > *,
.header-inner > *,
.primary-nav > ul > li {
  min-width: 0;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

@media (max-width: 860px) {
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
}

@media (min-width: 861px) and (max-width: 1080px) {
  .grid-5 { grid-template-columns: repeat(2, 1fr); }
}

.card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--card-bg-image);
  background-size: cover;
  background-position: center;
  opacity: 0.16;
  z-index: 0;
}

.card-photo > * {
  position: relative;
  z-index: 1;
}

.card h3 {
  margin-top: 0;
}

.card a.card-link {
  display: inline-block;
  margin-top: 10px;
  font-weight: 600;
}

.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--navy-light);
  color: var(--navy);
  font-weight: 700;
  margin-bottom: 14px;
}

/* Postup / kroky */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
  display: grid;
  gap: 18px;
}

.steps li {
  position: relative;
  padding-left: 52px;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.steps h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}

.steps p {
  margin: 0;
  color: var(--gray-700);
}

/* Info / poznámkové boxy */
.notice-box {
  background: var(--blue-light);
  border-left: 4px solid var(--blue);
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  margin: 24px 0;
}

.notice-box p:last-child {
  margin-bottom: 0;
}

.placeholder {
  color: #9a5b00;
  background: #fff6e6;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}

/* ==========================================================================
   Tabulky (ceník)
   ========================================================================== */

.price-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.price-table th,
.price-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
}

.price-table th {
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
}

.price-table tr:last-child td {
  border-bottom: none;
}

.price-table tr:nth-child(even) td {
  background: var(--gray-100);
}

.table-scroll {
  overflow-x: auto;
}

/* ==========================================================================
   FAQ (details/summary)
   ========================================================================== */

.faq-list {
  display: grid;
  gap: 14px;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 6px 22px;
}

.faq-item summary {
  cursor: pointer;
  padding: 16px 0;
  font-weight: 600;
  color: var(--navy);
  font-size: 1.02rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--blue);
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: "\2212";
}

.faq-item p {
  color: var(--gray-700);
  padding-bottom: 18px;
  margin: 0;
}

/* ==========================================================================
   Formulář
   ========================================================================== */

.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
}

@media (max-width: 860px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.form-field {
  margin-bottom: 18px;
}

.form-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.93rem;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--gray-400);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.98rem;
  background: var(--white);
  color: var(--gray-900);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}

.form-required {
  color: #b3261e;
}

.form-note {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-top: -6px;
}

#formFeedback {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--navy-light);
  color: var(--navy);
  font-size: 0.95rem;
}

#formFeedback[hidden] {
  display: none;
}

.contact-info-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 16px;
}

.contact-info-list li {
  padding: 16px 18px;
  background: var(--gray-100);
  border-radius: var(--radius);
}

.contact-info-list strong {
  display: block;
  color: var(--navy);
  margin-bottom: 2px;
}

.map-placeholder {
  margin-top: 20px;
  border: 2px dashed var(--gray-400);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  color: var(--gray-500);
  background: var(--gray-100);
}

.map-embed {
  margin-top: 20px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.map-embed iframe {
  display: block;
}

/* ==========================================================================
   Patička
   ========================================================================== */

.site-footer {
  background: var(--navy-dark);
  color: var(--gray-200);
  margin-top: 60px;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  padding: 48px 0 30px;
}

.footer-inner > div {
  min-width: 0;
}

.footer-contact a,
.footer-links a {
  overflow-wrap: anywhere;
}

@media (max-width: 860px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
}

.footer-heading {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 12px;
}

.site-footer p {
  color: var(--gray-400);
  font-size: 0.92rem;
}

.footer-contact,
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
  font-size: 0.92rem;
}

.footer-contact a,
.footer-links a {
  color: var(--gray-200);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 18px 0;
  font-size: 0.82rem;
  color: var(--gray-400);
}

/* ==========================================================================
   Nástroje
   ========================================================================== */

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }

/* ==========================================================================
   Jemné scroll-in animace (viz script.js)
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }

  .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}
