:root {
  --violet-50: #f8f0fa;
  --violet-500: #9b59b6;
  --violet-600: #8e44ad;
  --muted: #64748b;
  --border: #e5e7eb;
  --card: #ffffff;
}

/* General Reset & Body */
* {
  box-sizing: border-box;
}

body {
  background: var(--violet-50);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, 'Helvetica Neue', Arial;
  margin: 0;
}

/* Header */
header {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
  padding: 18px 16px;
  flex-wrap: wrap;
  text-align: center;

  /* New background */
  background: url('img/ordinace/ordinace2.jpg') center/cover no-repeat;
  position: relative;
  color: #fff; /* ensure text is visible */
}

/* Faded overlay */
header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4); /* dark overlay to fade image */
  z-index: 0;
}

header > * {
  position: relative; /* make text & img appear above overlay */
  z-index: 1;
}

header img {
  max-width: 180px;
  height: auto;
}

h1 {
  font-size: 2.6rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.3px;
  margin: 6px 0 0;
}

/* Sections */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 16px;
}

h2.section-title {
  color: #6d28d9;
  margin: 0 0 12px;
  text-align: center;
  font-size: 1.8rem;
}

.lead {
  color: var(--muted);
}

/* Subnavigation */
.subnav {
  max-width: 1100px;
  margin: 12px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.subnav a {
  background: #fff;
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
  color: #333;
  transition: background 0.2s;
}

.subnav a:hover {
  background: #f3e8ff;
}

/* Grids */
.grid {
  display: grid;
  gap: 16px;
}

.grid.cols-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

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

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

/* Cards */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  text-align: center;
}

.card img {
  max-width: 100%;
  border-radius: 12px;
  margin-bottom: 12px;
}

.card .service-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin: 0 auto 12px;
  display: block;
}

/* Hours Section */
.hours {
  display: grid;
  gap: 16px;
}

.hours .hours-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}

.hours .hours-card table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 4px;
}

.hours .hours-card th {
  width: 150px;
  white-space: nowrap;
  text-align: left;
  padding: 4px 8px 4px 0;
  color: #374151;
  font-weight: 600;
}

.hours .hours-card td {
  text-align: left;
  padding: 4px 0;
}

.hours-card h3 a {
  color: inherit;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.hours-card h3 a:hover {
  border-bottom-color: currentColor;
}

/* Price Table */
.price-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

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

.price-table thead th {
  background: var(--violet-600);
  color: #fff;
}

/* ====================== */
/*       GALLERY          */
/* ====================== */
/* Gallery styling */
.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.gallery a {
  position: relative;
  width: calc(33.333% - 10px);
  cursor: pointer;
}

.gallery img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.gallery img:hover {
  transform: scale(1.05);
}

/* Overlay styling */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.overlay img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
}

.overlay .closebtn {
  position: absolute;
  top: 20px;
  right: 20px;
  color: white;
  font-size: 30px;
  cursor: pointer;
  background: none;
  border: none;
}

/*///////////////////////////////////////////////////////*/

#kontakt {
  display: flex;
  justify-content: center;
  text-align: center;
  padding: 40px 16px;
}

#kontakt .contact {
  max-width: 500px;
}

/* Footer */
footer {
  text-align: center;
  padding: 20px;
  color: #888;
}

/* Map */
#mapa iframe {
  width: 100%;
  height: 320px;
  border: 0;
  border-radius: 12px;
}
