/* ============================================================
   EFT terapie Znojmo – finální styl
   Version: final (mobile optimized)
   Last change: buttons + title mobile fixes
   ============================================================ */

/* ============ VARIABLES ============ */
:root {
  /* Browns – main identity */
  --ink:          #7a6353;
  --heading:      #5f4a3a;
  --heading-dark: #463528;

  /* Accents */
  --accent:       #e8a87c;
  --accent-hover: #d18f61;
  --link:         #b5794f;

  /* Surfaces */
  --paper:        #fffdf9;
  --cream:        #fdf0dc;
  --lightcream:   #fff1eb;
  --darkcream:    #ffe9d1;
  --blush:        #ffb6a0;

  /* Gradient stops */
  --grad-1:       #fffdf9;
  --grad-2:       #fdeecb;
  --grad-3:       #fcd9be;
}

/* ============ RESET & BASE ============ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", system-ui, sans-serif;
  line-height: 1.6;
  font-size: 18px;
  color: var(--ink);
  background: linear-gradient(180deg, var(--grad-1) 0%, var(--grad-2) 50%, var(--grad-3) 100%);
  min-height: 100vh;
}

a {
  text-decoration: none;
  font-weight: bold;
  color: var(--link);
}

p {
  text-align: justify;
}

/* ============ COOKIE BANNER ============ */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background-color: var(--heading);
  color: var(--paper);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(70, 53, 40, 0.35);
  z-index: 9999;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s, transform 0.4s;
}
.cookie-banner.cookie-visible {
  opacity: 1;
  transform: translateY(0);
}

.cookie-text {
  flex: 1 1 320px;
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0;
}

.cookie-buttons {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-btn {
  padding: 10px 22px;
  border: none;
  border-radius: 50px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: bold;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

.cookie-accept {
  background-color: var(--accent);
  color: var(--heading);
}
.cookie-accept:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
}

.cookie-decline {
  background-color: transparent;
  color: var(--paper);
  border: 2px solid var(--paper);
}
.cookie-decline:hover {
  background-color: var(--heading-dark);
  transform: translateY(-2px);
}

@media (max-width: 480px) {
  .cookie-banner { left: 12px; right: 12px; bottom: 12px; }
  .cookie-buttons { width: 100%; }
  .cookie-btn { flex: 1; }
}

/* Map placeholder */
.map-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 450px;
  background-color: var(--paper);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 24px;
  text-align: center;
  color: var(--heading);
}

/* ============ LANGUAGE SWITCHER ============ */
.lang-switcher {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 8px;
}
.lang-switcher img {
  width: 30px;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 3px;
  transition: border-color 0.3s;
}
.lang-switcher img:hover  { border-color: var(--heading); }
.lang-switcher img.active { border-color: var(--accent); }

/* ============ HEADER & NAV ============ */
header {
  position: relative;
  text-align: center;
  margin: 10px 0 50px;
}

nav ul {
  list-style: none;
  margin: 0 70px;
  padding: 20px;
  border-radius: 16px;
  background-color: var(--heading);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

nav li a {
  display: block;
  padding: 12px 20px;
  color: var(--paper);
  border-radius: 8px;
  transition: background 0.3s, transform 0.3s;
}
nav li a:hover {
  background-color: var(--heading-dark);
  transform: scale(1.02);
}

nav li a svg {
  display: block;
}

.hover-underline {
  color: var(--paper);
  position: relative;
  cursor: pointer;
}
.hover-underline::before,
.hover-underline::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, #ffc093, #fff890);
  transform: scaleX(0);
  transition: transform 0.4s ease-out;
}
.hover-underline::before { top: -5px;    transform-origin: left; }
.hover-underline::after  { bottom: -5px; transform-origin: right; }
.hover-underline:hover::before,
.hover-underline:hover::after { transform: scaleX(1); }

/* ============ ANIMATED TITLE (Original Animation, Mobile Scaled) ============ */

/* ============ ANIMATED TITLE WITH BACKGROUND IMAGE ============ */

.title-wrapper {
  position: relative;
  padding: 60px 20px 80px;
  /* Min-height removed on mobile, let the image determine height */
  min-height: 450px;
  margin-top: 0;
  overflow: hidden;
  text-align: center;
}

.title-wrapper img.bg-image {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  object-fit: cover;   /* Fills wrapper completely, crops edges */
  opacity: 0.6;
  z-index: 0;
}

.title {
  text-align: center;
}

.title h1 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 7em;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
  color: transparent;
}

.title h1 span {
  position: absolute;
  top: 0;
  left: 0;
  font-size: inherit;
  overflow: hidden;
  transition: transform 0.5s;
  color: var(--heading);
}

.title h1 span:nth-child(1) { clip-path: polygon(0 0, 100% 0, 100% 50%, 0 50%); }
.title h1 span:nth-child(2) { clip-path: polygon(0 50%, 100% 50%, 100% 100%, 0 100%); }

.title h1:hover span:nth-child(1) { transform: translateY(-18px); }
.title h1:hover span:nth-child(2) { transform: translateY(18px); }

.title h1 span:nth-child(3) {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scaleY(0);
  background: var(--ink);
  color: #ffd7d7;
  font-size: 0.25em;
  font-weight: 500;
  letter-spacing: 0.7em;
  padding: 0 0.5em;
  transition: transform 0.5s;
}
.title h1:hover span:nth-child(3) { transform: translate(-50%, -50%) scaleY(1); }
/* ============ RESPONSIVE (Title) — SCALE DOWN ============ */
@media (max-width: 768px) {
  .title-wrapper {
    min-height: 350px;
    padding: 40px 20px 50px;
  }
  .title h1 {
    font-size: 5em;         /* Smaller on tablet */
  }
}

@media (max-width: 500px) {
  .title-wrapper {
    min-height: 280px;
    padding: 30px 15px 40px;
  }
  .title h1 {
    font-size: 3.5em;       /* Even smaller on phone — still fits in one line */
  }
}

/* If text still overflows on very narrow screens, add viewport meta tweak */
@media (max-width: 370px) {
  .title h1 {
    font-size: 2.8em;       /* Extra small for tiny phones */
  }
}
/* ============ LAYOUT ============ */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 20px 120px;
}

section { margin-bottom: 56px; }

section h1 { margin-bottom: 24px; }
section h2 {
  border-left: 4px solid var(--heading);
  padding-left: 10px;
  margin-bottom: 20px;
  color: var(--heading);
  font-size: 22px;
  font-weight: 600;
}
section h3 {
  margin-bottom: 12px;
  margin-top: 32px;
}

section p { margin-bottom: 16px; }

section ul, section ol {
  margin-bottom: 16px;
  padding-left: 24px;
}
section li { margin-bottom: 8px; }

.highlight {
  background-color: var(--cream);
  border-radius: 16px;
  padding: 20px;
}

.darkcream-box {
  background-color: var(--darkcream);
  border-radius: 16px;
  padding: 20px;
}

.lightcream-box {
  background-color: var(--paper);
  border-radius: 16px;
  padding: 20px;
}

.flex-section {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-start;
}
.flex-section .text  { flex: 1 1 300px; }
.flex-section .image { flex: 0 0 250px; }
.flex-section img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.wide-photo {
  margin: 40px 0;
}
.wide-photo img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}
.wide-photo figcaption {
  margin-top: 8px;
  font-size: 0.85em;
  text-align: center;
  color: var(--heading);
}

.short-photo {
  margin: 40px 0;
  display: flex;
  justify-content: center;
}
.short-photo img {
  width: 80%;
  height: auto;
  border-radius: 8px;
}

#contact p svg { margin-right: 6px; }

/* ============ CERTIFICATES ============ */
#certifikaty {
  margin: 60px 0;
  text-align: center;
}
#certifikaty h2 {
  border-left: none;
  padding-left: 0;
  margin-bottom: 16px;
}

.certificates-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  margin: 40px 0;
}

.cert-round {
  position: relative;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(70, 53, 40, 0.25);
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
}
.cert-round:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 32px rgba(70, 53, 40, 0.35);
}
.cert-round img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.cert-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    ellipse at center,
    rgba(255, 220, 192, 0) 40%,
    rgba(165, 134, 110, 0.2) 70%,
    rgba(95, 74, 58, 0.5) 100%
  );
  pointer-events: none;
}
.cert-round::after {
  content: "© Eva Horová";
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  font-weight: bold;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  letter-spacing: 0.5px;
  z-index: 2;
  user-select: none;
  -webkit-user-select: none;
}
.cert-note {
  font-size: 0.85rem;
  color: var(--heading);
  margin-top: 20px;
}

@media (max-width: 768px) {
  .certificates-grid { gap: 30px; }
  .cert-round { width: 200px; height: 200px; }
}
@media (max-width: 480px) {
  .certificates-grid {
    flex-direction: column;
    align-items: center;
  }
  .cert-round { width: 180px; height: 180px; }
}

/* ============ BUTTONS ============ */
.btn {
  margin-top: 40px;
  padding: 12px 24px;
  background-color: var(--accent);
  color: var(--paper);
  border: none;
  border-radius: 50px;
  font-size: large;
  font-weight: bold;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  display: table;
  width: auto;
  min-width: 280px;
  margin: 40px auto 0;
}
.btn:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .btn {
    display: block;
    width: 100%;
    min-width: unset;
  }
}

/* ============ PRICING ============ */
.pricing-plans {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 20px;
  max-width: 1200px;
  margin: 60px auto;
}
.pricing-plans .big-heading {
  width: 100%;
  text-align: center;
  font-size: 3em;
  letter-spacing: 2px;
  margin-bottom: 40px;
}

.plan {
  width: 400px;
  padding: 20px;
  background: var(--paper);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s, box-shadow 0.3s;
}
.plan:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.plan-title {
  font-size: 1.2em;
  font-weight: 800;
  color: var(--heading);
  margin-bottom: 30px;
}

.block { width: 100%; margin-bottom: 10px; }
.block p {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price {
  font-weight: bold;
  font-size: 1.2em;
}

/* ============ MAP ============ */
.map-container {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}
.map-container iframe {
  width: 900px;
  max-width: 100%;
  height: 450px;
  border: 0;
  border-radius: 16px;
  box-shadow: 1px 2px 8px 4px rgba(113, 62, 12, 0.2);
}

/* ============ FOOTER ============ */
footer {
  padding: 60px 20px 40px;
  background: var(--ink);
  color: var(--paper);
  text-align: center;
}
.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}
footer h3 { font-size: 20px; margin-bottom: 10px; }
footer p  { font-size: 14px; margin-bottom: 10px; }
footer a  { color: #efd0b7; text-decoration: underline; }
.copyright p { font-size: 12px; }

footer p { text-align: center; }

/* ============ RESPONSIVE ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media (max-width: 768px) {
  nav ul { margin: 0 60px;
           padding: 10px;}
  .pricing-plans { flex-direction: column; align-items: center; }
  .plan { width: 90%; }
  .flex-section { flex-direction: column; }
  .title h1 { font-size: 4em; }
}

@media (max-width: 500px) {
  .title h1 { font-size: 3em; }
  .btn { font-size: 0.9rem; }
}