/* Font definitions */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local('Lato Regular'), local('Lato-Regular'),
       url('/fonts/lato-regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: local('Lato Bold'), local('Lato-Bold'),
       url('/fonts/lato-bold.woff2') format('woff2');
}

/* Reset a základní styly */
body {
  font-family: 'Lato', sans-serif;
  background-color: #f9f9f9;
  color: #333;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Hlavní layout */
main {
  display: block; /* Pro starší prohlížeče */
}

header, section, footer {
  max-width: 800px;
  margin: auto;
  padding: 20px;
  box-sizing: border-box;
}

/* Typografie */
h1, h2, h3 {
  color: #333;
  line-height: 1.2;
}

h1 {
  margin-bottom: 10px;
  font-size: 28px;
}

h2 {
  margin-top: 40px;
  font-size: 24px;
  border-bottom: 1px solid #ccc;
  padding-bottom: 5px;
}

/* Přístupnost */
:focus {
  outline: 3px solid #c69fa5;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Formuláře */
form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 100%;
}

input, textarea {
  font-family: inherit;
  margin-bottom: 10px;
  padding: 12px;
  font-size: 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
  width: 100%;
  box-sizing: border-box;
  transition: all 0.2s ease;
  background: white;
}

/* Validace formuláře */
input:invalid {
  border-color: #ffa4a4;
}

input:invalid:focus {
  border-color: #ff8080;
  box-shadow: 0 0 0 2px rgba(255, 128, 128, 0.2);
}

input[type="tel"]:placeholder-shown,
input[type="email"]:placeholder-shown {
  border-color: #ddd;
}

input[type="tel"]:valid,
input[type="email"]:valid {
  border-color: #a8e6cf;
}

input[type="tel"]:valid:focus,
input[type="email"]:valid:focus {
  border-color: #8ed7bc;
  box-shadow: 0 0 0 2px rgba(142, 215, 188, 0.2);
}

input:hover, textarea:hover {
  border-color: #c69fa5;
}

input:focus, textarea:focus {
  outline: none;
  border-color: #c69fa5;
  box-shadow: 0 0 0 2px rgba(198, 159, 165, 0.2);
}

/* Placeholder styly */
::placeholder {
  color: #999;
  opacity: 1;
}

:-ms-input-placeholder {
  color: #999;
}

::-ms-input-placeholder {
  color: #999;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

button {
  padding: 12px 24px;
  font-size: 16px;
  background-color: #8B3A45;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  align-self: flex-start;
}

button:hover, button:focus {
  background-color: #6B2D36;
  transform: translateY(-1px);
}

button:active {
  transform: translateY(1px);
}

#form-status {
  margin-top: 15px;
  padding: 12px;
  border-radius: 4px;
  text-align: center;
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#form-status.visible {
  opacity: 1;
}

#form-status.success {
  background-color: #e8f5e9;
  color: #2e7d32;
}

#form-status.error {
  background-color: #fbe9e7;
  color: #c62828;
}

/* Odkazy */
a {
  color: #8B3A45;
  text-decoration: underline;
  transition: all 0.2s ease;
  border-bottom: 1px solid transparent;
}

a:hover, a:focus {
  color: #6B2D36;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

/* Existující styly ... */
footer {
  text-align: center;
  font-size: 14px;
  color: #4A4A4A;
  padding: 20px;
  margin-top: 40px;
}

footer p {
  margin: 0;
  color: #4A4A4A;
}

footer a {
  color: #8B3A45;
  text-decoration: underline;
  transition: all 0.2s;
  padding-bottom: 1px;
}

footer a:hover, footer a:focus {
  color: #6B2D36;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.cenik h3 {
  color: #444;
  margin-top: 30px;
  margin-bottom: 10px;
  font-size: 18px;
}

.cenik p {
  margin: 5px 0;
  color: #666;
}

.note {
  margin-top: 30px;
  padding: 15px;
  background-color: #f5f5f5;
  border-radius: 4px;
}

.kontakt a {
  color: #8B3A45;
  text-decoration: underline;
  transition: all 0.2s;
  display: inline-block;
  padding: 2px 0;
}

.kontakt a:hover, .kontakt a:focus {
  color: #6B2D36;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.address-container {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.show-on-map {
  color: #8B3A45;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s;
  padding: 2px 4px;
  border: 1px solid currentColor;
  border-radius: 3px;
}

.show-on-map:hover, .show-on-map:focus {
  color: #6B2D36;
  background-color: #f8f8f8;
}

/* Facebook sekce */
.facebook-container {
  max-width: 800px;
  margin: 40px auto;
  padding: 20px;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.facebook-container h2 {
  margin-top: 0;
  margin-bottom: 20px;
}

.fb-loading-placeholder {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 40px;
  margin: 20px 0;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
}

.fb-loading-placeholder p {
  margin: 0;
  font-size: 16px;
}

.fb-page {
  margin: 0 auto;
  display: block;
  width: 100% !important;
}

.fb-page > span {
  width: 100% !important;
  display: block !important;
}

.fb-page iframe {
  width: 100% !important;
  max-width: 100% !important;
}

/* Oprava pro Facebook kontejner */
._2p3a {
  width: 100% !important;
  min-width: 100% !important;
}

/* Zajištění správného poměru stran */
.fb_iframe_widget {
  width: 100% !important;
  display: block !important;
}

.fb_iframe_widget span {
  width: 100% !important;
  display: block !important;
}

/* Telefonní input */
.phone-input-container {
  display: flex;
  align-items: stretch;
  margin-bottom: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.phone-input-container:hover {
  border-color: #c69fa5;
}

.phone-input-container:focus-within {
  border-color: #c69fa5;
  box-shadow: 0 0 0 2px rgba(198, 159, 165, 0.2);
}

.phone-prefix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  background-color: #f5f5f5;
  color: #666;
  font-family: inherit;
  font-size: 16px;
  border-right: 1px solid #ddd;
  user-select: none;
}

.phone-input-container input[type="tel"] {
  border: none;
  margin: 0;
  flex: 1;
  min-width: 0;
  border-radius: 0;
}

.phone-input-container input[type="tel"]:focus {
  outline: none;
  box-shadow: none;
}

/* Sekce o majitelce */
.about-owner {
  content-visibility: auto;
  contain-intrinsic-size: 400px;
}

.owner-content {
  display: flex;
  align-items: flex-start;
  gap: 30px;
}

.owner-photo {
  width: 300px;
  height: 400px;
  border-radius: 4px;
  object-fit: cover;
  aspect-ratio: 3/4;
}

.owner-text {
  flex: 1;
}

.owner-text h2 {
  margin-top: 0;
  text-align: left;
}

/* Brands section */
.brands {
  content-visibility: auto;
  contain-intrinsic-size: 800px;
}

.brands h2 {
  text-align: center;
  margin-bottom: 30px;
}

.brands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  align-items: center;
  justify-items: center;
  margin-top: 20px;
}

.brand-item {
  text-align: center;
  padding: 20px;
  background: transparent;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
}

.brand-item:hover {
  transform: translateY(-5px);
}

.brand-logo {
  max-width: 200px;
  height: auto;
  margin-bottom: 15px;
}

.brand-item p {
  color: #666;
  margin: 0;
}

@media (max-width: 768px) {
  .brands-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .brand-logo {
    max-width: 150px;
  }
}

/* Galerie */
.gallery {
  margin: 40px auto;
  max-width: 800px;
  padding: 0 20px;
  content-visibility: auto;
  contain-intrinsic-size: 800px;
}

.gallery h2 {
  text-align: center;
  margin-bottom: 30px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

/* Obecné styly pro sekce */
section {
  margin: 40px auto;
  max-width: 800px;
  padding: 30px;
  box-sizing: border-box;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

section h2 {
  margin-top: 0;
  text-align: center;
}

.gallery-item {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  transition: transform 0.2s ease;
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.gallery-item:hover {
  transform: translateY(-2px);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  z-index: 1000;
  padding: 20px;
  box-sizing: border-box;
}

.lightbox.active {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.lightbox-image {
  max-width: 90%;
  max-height: 80vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  color: white;
  font-size: 30px;
  cursor: pointer;
  padding: 10px;
}

.lightbox-caption {
  color: white;
  margin-top: 10px;
  font-size: 14px;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: none;
  font-size: 24px;
  padding: 20px 15px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  z-index: 1010;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-nav.prev {
  left: 20px;
}

.lightbox-nav.next {
  right: 20px;
}

/* Responzivní design */
@media (max-width: 768px) {
  .owner-content {
    flex-direction: column;
    align-items: center;
  }

  .owner-photo {
    width: 200px;
    margin-bottom: 20px;
  }

  .owner-text {
    text-align: center;
  }

  .owner-text h2 {
    text-align: center;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .lightbox-nav {
    padding: 15px 10px;
    font-size: 20px;
  }
  
  .lightbox-nav.prev {
    left: 10px;
  }
  
  .lightbox-nav.next {
    right: 10px;
  }

  section {
    padding: 20px;
  }
}

/* Služba s obrázkem */
.service-with-image {
  position: relative;
  margin: 20px 0;
  min-height: 120px;
  clear: both;
  padding: 0;
  background: none;
  box-shadow: none;
}

.service-image {
  float: left;
  width: 200px;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
  margin: 0 30px 20px 0;
}

.service-text {
  overflow: hidden;
}

.service-text h3 {
  margin-top: 0;
  margin-bottom: 15px;
}

.service-text p {
  margin: 8px 0;
}

@media (max-width: 768px) {
  .service-with-image {
    margin: 30px 0;
    min-height: auto;
  }

  .service-text {
    margin-left: 0;
    text-align: center;
  }

  .service-image {
    float: none;
    width: 200px;
    margin: 0 auto 20px;
    display: block;
  }
}

/* Hlavní navigace */
.main-nav {
  background: #fff;
  padding: 10px 0;
  margin-top: 20px;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.main-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 10px;
}

.main-nav a {
  color: #333;
  text-decoration: none;
  padding: 5px 8px;
  border-radius: 4px;
  transition: all 0.3s ease;
  font-size: 15px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover, .main-nav a:focus {
  background: #f5f5f5;
  color: #000;
  border-bottom: 2px solid #8B3A45;
}

@media (max-width: 768px) {
  .main-nav {
    padding: 10px 0;
  }
  
  .main-nav ul {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  
  .main-nav a {
    display: block;
    padding: 8px 15px;
    font-size: 16px;
  }
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Speciální úpravy pro galerii a značky */
.gallery-grid, .brands-grid {
  margin-top: 20px;
}

/* Úprava pro Facebook sekci */
.fb-loading-placeholder {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 40px;
  margin: 20px 0;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
}

/* Úprava pro služby */
.service-with-image {
  margin: 20px 0;
}

/* Úprava pro kontaktní sekci */
.kontakt > p {
  margin: 10px 0;
} 