/* === KARL-STAVBY s.r.o. – Moderní web s paralaxou a animacemi === */

/* CSS proměnné */
:root {
  --primary: #2D4A3E;
  --primary-light: #3A5F4F;
  --secondary: #D4C5B9;
  --accent: #B85C4F;
  --bg-light: #FAF9F7;
  --bg-gray: #EAEAEA;
  --text-dark: #1A1A1A;
  --text-light: #FFFFFF;
  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Inter', sans-serif;
  --font-hand: 'Caveat', cursive;
  --transition: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  color: var(--text-dark);
  background: var(--bg-light);
  line-height: 1.6;
  overflow-x: hidden;
}

/* === Navigace === */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: transparent;
  transition: background var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
  background: rgba(250, 249, 247, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
  height: 70px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.logo-img {
  height: 40px;
  width: auto;
  transition: transform var(--transition);
}

.nav-logo:hover .logo-img {
  transform: scale(1.05);
}

.logo-text {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-dark);
  letter-spacing: 1px;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-menu a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s;
  position: relative;
}

.nav-menu a:not(.nav-cta)::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s;
}

.nav-menu a:hover::after {
  width: 100%;
}

.nav-cta {
  background: var(--primary);
  color: #fff !important;
  padding: 0.5rem 1.5rem;
  border-radius: 30px;
  transition: background 0.3s, transform 0.3s;
}

.nav-cta:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--text-dark);
  transition: var(--transition);
}

/* === Hero sekce s paralaxou === */
.hero {
  height: 100vh;
  min-height: 700px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #fff;
  text-align: center;
}

.parallax-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 120%;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  z-index: 1;
}

@media (max-width: 768px) {
  .parallax-bg {
    background-attachment: scroll;
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.3) 0%,
    rgba(0,0,0,0.5) 100%
  );
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 800px;
  padding: 0 2rem;
  animation: fadeInUp 1.2s ease-out;
}

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

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 8vw, 5rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-line {
  display: block;
}

.hero-line.accent {
  color: var(--secondary);
  font-style: italic;
  text-shadow: 0 0 20px rgba(0,0,0,0.3);
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  margin-bottom: 2.5rem;
  opacity: 0.9;
  animation: fadeInUp 1.2s ease-out 0.3s both;
}

.hero-cta {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 1.2s ease-out 0.6s both;
}

.btn {
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.3s;
  border: 2px solid transparent;
  cursor: pointer;
  display: inline-block;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: #a0493e;
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(184, 92, 79, 0.4);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.8);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-3px);
  border-color: #fff;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.7);
  font-size: 0.8rem;
  animation: bounce 2s infinite;
  cursor: pointer;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-10px); }
  60% { transform: translateX(-50%) translateY(-5px); }
}

/* === Sekce === */
.section {
  padding: 6rem 2rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 3rem;
  text-align: center;
  color: var(--primary);
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 1rem auto 0;
}

/* === O Nás === */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text .lead {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.about-text p {
  margin-bottom: 1rem;
  color: #555;
}

.values {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2rem;
}

.value-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-gray);
  padding: 0.5rem 1rem;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 500;
}

.about-image {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.about-img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s;
}

.about-image:hover .about-img {
  transform: scale(1.03);
}

.about-badge {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  background: white;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.badge-name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.2rem;
}

.badge-title {
  font-size: 0.8rem;
  color: #777;
}

/* === Služby === */
.services {
  background: #fff;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.service-card {
  background: var(--bg-light);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.service-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.service-card h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
  color: var(--primary);
}

/* === Portfolio === */
.portfolio-filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.filter-btn {
  padding: 0.5rem 1.5rem;
  border: 2px solid var(--secondary);
  background: transparent;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 500;
  color: var(--text-dark);
  transition: all 0.3s;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.portfolio-item {
  animation: fadeInScale 0.5s ease-out;
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.portfolio-img-wrapper {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  height: 300px;
}

.portfolio-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.portfolio-img-wrapper:hover img {
  transform: scale(1.1);
}

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: rgba(45, 74, 62, 0.85);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  color: #fff;
  opacity: 0;
  transition: opacity 0.4s;
}

.portfolio-img-wrapper:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-overlay h3 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  text-align: center;
}

.portfolio-overlay p {
  text-align: center;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

/* === Eko paralaxa sekce === */
.parallax-section {
  position: relative;
  min-height: 500px;
  display: flex;
  align-items: center;
}

.eco-content {
  position: relative;
  z-index: 2;
  color: #fff;
  width: 100%;
  background: rgba(0,0,0,0.4);
  padding: 6rem 0;
}

.eco-content .section-title {
  color: #fff;
}

.eco-content .section-title::after {
  background: var(--secondary);
}

.eco-content .lead {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
  font-size: 1.2rem;
}

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

.eco-card {
  text-align: center;
}

.eco-number {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 0.5rem;
}

/* === Reference === */
.references {
  background: var(--bg-light);
}

.references-slider {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.reference-card {
  display: none;
  background: #fff;
  padding: 3rem;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  animation: fadeIn 0.5s ease;
}

.reference-card.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.ref-stars {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.ref-quote {
  font-size: 1.2rem;
  font-style: italic;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.ref-author {
  font-weight: 600;
  color: var(--primary);
}

.reference-controls {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}

.ref-prev, .ref-next {
  background: var(--primary);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

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

/* === Kontakt === */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-info h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.contact-info p {
  margin-bottom: 0.5rem;
}

.map-wrapper {
  margin-top: 1.5rem;
  border-radius: 12px;
  overflow: hidden;
}

.contact-form {
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

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

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 2px solid var(--bg-gray);
  border-radius: 8px;
  font-family: var(--font-sans);
  transition: border-color 0.3s, box-shadow 0.3s;
  font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(45, 74, 62, 0.15);
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.checkbox input {
  margin-top: 0.3rem;
}

.form-success {
  margin-top: 1rem;
  color: var(--primary);
  font-weight: 600;
}

/* === Footer === */
.footer {
  background: var(--primary);
  color: #fff;
  padding: 3rem 2rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-logo-img {
  height: 50px;
  filter: brightness(0) invert(1);
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: var(--secondary);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: #fff;
}

/* === Efekty zobrazení při scrollu === */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* === Responzivní úpravy === */
@media (max-width: 992px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .about-image {
    max-width: 500px;
    margin: 0 auto;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background: rgba(250,249,247,0.98);
    backdrop-filter: blur(10px);
    width: 100%;
    text-align: center;
    transition: 0.4s;
    padding: 2rem 0;
    gap: 1.5rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
  }
  .nav-menu.active {
    left: 0;
  }
  .hamburger {
    display: flex;
  }
  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
  .section {
    padding: 4rem 1rem;
  }
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}