/* Demleme Okulu — Türk Çayı Rehberi — Premium reklam teması */
:root {
  --color-bg: #faf6f1;
  --color-bg-warm: #f2ebe3;
  --color-surface: #fffefc;
  --color-primary: #8b4512;
  --color-primary-dark: #5c2e0a;
  --color-primary-light: #a65c2e;
  --color-accent: #c45c2e;
  --color-tea-red: #8b3a3a;
  --color-tavsan-kani: #a63d3d;
  --color-copper: #c4946c;
  --color-gold: #b8860b;
  --color-text: #2a2118;
  --color-text-muted: #5c4d3d;
  --color-border: #e5d9cc;
  --color-tea-dark: #4a3525;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Outfit', 'Segoe UI', system-ui, sans-serif;
  --shadow-soft: 0 4px 20px rgba(92, 46, 10, 0.06);
  --shadow: 0 6px 24px rgba(92, 46, 10, 0.1);
  --shadow-lg: 0 12px 40px rgba(92, 46, 10, 0.14);
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  letter-spacing: 0.01em;
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(198, 140, 83, 0.08), transparent),
    radial-gradient(ellipse 100% 60% at 100% 50%, rgba(166, 92, 46, 0.04), transparent),
    radial-gradient(ellipse 80% 50% at 0% 80%, rgba(139, 69, 18, 0.05), transparent);
  background-attachment: fixed;
}

p {
  margin: 0 0 1rem;
  text-rendering: optimizeLegibility;
}

p:last-child {
  margin-bottom: 0;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s var(--ease-out);
}

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

/* ----- Header ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 254, 252, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-border);
  padding: 0.85rem 1.25rem;
  box-shadow: 0 1px 0 rgba(196, 92, 46, 0.08);
  transition: box-shadow 0.3s var(--ease-out);
}

.site-header .wrap {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  letter-spacing: 0.04em;
}

.site-logo:hover {
  color: var(--color-accent);
  text-decoration: none;
}

.header-nav {
  display: flex;
  align-items: center;
}

.nav-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.25s var(--ease-out);
}

.nav-menu a:hover {
  color: var(--color-primary-dark);
  background: var(--color-bg-warm);
  text-decoration: none;
}

.nav-menu a.is-current {
  color: var(--color-primary-dark);
  background: linear-gradient(135deg, rgba(196, 148, 108, 0.35), rgba(184, 134, 11, 0.15));
  font-weight: 600;
  text-decoration: none;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--color-text);
  border-radius: var(--radius);
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}

.menu-toggle:hover {
  background: var(--color-bg-warm);
}

.menu-toggle .hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 22px;
}

.menu-toggle .hamburger span {
  display: block;
  height: 2px;
  background: var(--color-primary-dark);
  border-radius: 1px;
  transition: transform 0.3s var(--ease-out), opacity 0.2s;
}

.menu-toggle .hamburger span:nth-child(1) { width: 100%; }
.menu-toggle .hamburger span:nth-child(2) { width: 100%; }
.menu-toggle .hamburger span:nth-child(3) { width: 85%; margin-left: auto; }

.menu-toggle[aria-expanded="true"] .hamburger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .hamburger span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .hamburger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  width: 100%;
  margin-left: 0;
}

@media (max-width: 768px) {
  .site-header .wrap {
    position: relative;
  }
  .menu-toggle { display: flex; }
  .header-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    order: 3;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s var(--ease-out), opacity 0.3s var(--ease-out);
    background: rgba(255, 254, 252, 0.98);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 8px 24px rgba(92, 46, 10, 0.12);
    border-bottom: 1px solid var(--color-border);
    z-index: 99;
  }
  .header-nav.is-open {
    max-height: 520px;
    opacity: 1;
  }
  .nav-menu {
    flex-direction: column;
    width: 100%;
    padding: 0.5rem 0;
    gap: 0.25rem;
  }
  .nav-menu a {
    display: block;
    padding: 0.7rem 1rem;
  }
}

/* ----- Hero (full-bleed, overlay, CTA) ----- */
.hero {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  overflow: hidden;
  opacity: 1;
  transform: none;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg,
    rgba(44, 33, 25, 0.75) 0%,
    rgba(92, 46, 10, 0.5) 40%,
    rgba(92, 46, 10, 0.35) 100%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 640px;
}

.hero-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-copper);
  margin-bottom: 1rem;
  padding: 0.4rem 1rem;
  border: 1px solid rgba(196, 148, 108, 0.6);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.2);
  animation: hero-badge 1s var(--ease-out) 0.3s both;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.75rem;
  letter-spacing: 0.02em;
  line-height: 1.15;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.4);
  animation: hero-title 0.9s var(--ease-out) 0.15s both;
}

.hero .tagline {
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  font-weight: 400;
  margin-bottom: 1.75rem;
  line-height: 1.5;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.3);
  animation: hero-title 0.9s var(--ease-out) 0.25s both;
}

.hero-cta {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-primary-dark);
  background: linear-gradient(180deg, var(--color-copper) 0%, #a67c52 100%);
  border: none;
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s, color 0.2s;
  animation: hero-title 0.9s var(--ease-out) 0.35s both;
}

.hero-cta:hover {
  color: var(--color-primary-dark);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.35);
}

@keyframes hero-badge {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes hero-title {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ----- Sections ----- */
section {
  padding: 3rem 1.25rem;
  max-width: 1000px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s var(--ease-out), transform 0.6s var(--ease-out);
}

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

/* Страницы политик: контент сразу виден (нет IntersectionObserver) */
.policy-page section,
.page-content section {
  opacity: 1;
  transform: none;
}

section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 600;
  color: var(--color-primary-dark);
  margin-top: 0;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  position: relative;
  letter-spacing: 0.02em;
  line-height: 1.25;
}

section h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 4px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-copper));
  border-radius: 2px;
}

section h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-tea-dark);
  margin: 1.75rem 0 0.75rem;
}

/* Section with image */
.section-with-image {
  display: grid;
  gap: 2rem;
  align-items: start;
}

.section-with-image .text-block {
  min-width: 0;
}

.section-with-image .media-block {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
}

.section-with-image .media-block img {
  width: 100%;
  height: auto;
  display: block;
}

@media (min-width: 640px) {
  .section-with-image.row {
    grid-template-columns: 1fr 1fr;
  }
  .section-with-image.row.reverse {
    direction: rtl;
  }
  .section-with-image.row.reverse > * {
    direction: ltr;
  }
}

/* ----- Cards ----- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.35s var(--ease-out), transform 0.3s var(--ease-out), border-color 0.25s;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--color-accent), var(--color-copper));
  border-radius: 4px 0 0 4px;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: rgba(196, 92, 46, 0.25);
}

.card h3 {
  margin-top: 0;
  color: var(--color-tea-dark);
  font-size: 1.1rem;
}

/* ----- Table ----- */
.table-wrap {
  overflow-x: auto;
  margin: 1.25rem 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
}

th, td {
  padding: 0.9rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

th {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-tea-red) 100%);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
}

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

tr:hover td {
  background: rgba(242, 235, 227, 0.5);
}

/* ----- Calculator ----- */
.calc-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  max-width: 420px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--color-accent);
  transition: box-shadow 0.3s var(--ease-out);
}

.calc-box:hover {
  box-shadow: var(--shadow-lg);
}

.calc-box label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-tea-dark);
}

.calc-box input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.calc-box input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(139, 69, 18, 0.15);
}

.calc-result {
  margin-top: 1rem;
  padding: 1.15rem;
  background: linear-gradient(135deg, var(--color-bg-warm) 0%, rgba(196, 148, 108, 0.12) 100%);
  border-radius: var(--radius);
  font-weight: 600;
  color: var(--color-primary-dark);
  border: 1px solid var(--color-border);
}

/* ----- FAQ ----- */
.faq-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 0.6rem;
  background: var(--color-surface);
  overflow: hidden;
  transition: box-shadow 0.25s var(--ease-out);
}

.faq-item:hover {
  box-shadow: var(--shadow-soft);
}

.faq-item [aria-expanded] {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.35rem;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  color: var(--color-text);
  transition: background 0.2s, color 0.2s;
}

.faq-item [aria-expanded]:hover {
  background: var(--color-bg-warm);
  color: var(--color-primary-dark);
}

.faq-item [aria-expanded]::after {
  content: '+';
  font-size: 1.35rem;
  color: var(--color-accent);
  flex-shrink: 0;
  margin-left: 0.5rem;
  transition: transform 0.35s var(--ease-out);
}

.faq-item [aria-expanded="true"]::after {
  content: '−';
  transform: rotate(180deg);
}

/* Плавное открытие/закрытие без «тиков» через grid. Изначально все закрыты. */
.faq-item .faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--ease-out);
  color: var(--color-text-muted);
}

.faq-item .faq-answer:not(.is-open) .faq-answer-inner {
  visibility: hidden;
}

.faq-item .faq-answer.is-open {
  grid-template-rows: 1fr;
}

.faq-item .faq-answer.is-open .faq-answer-inner {
  visibility: visible;
}

.faq-item .faq-answer-inner {
  overflow: hidden;
  min-height: 0;
  padding: 0 1.35rem 1.15rem;
}

/* ----- Glossary ----- */
/* Словарь: каждая пара термин–определение в своей ячейке, адаптивная сетка */
.glossary-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.glossary-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.25s var(--ease-out), border-color 0.2s;
}

.glossary-item:hover {
  box-shadow: var(--shadow);
  border-color: rgba(196, 92, 46, 0.2);
}

.glossary-item dt {
  font-weight: 700;
  color: var(--color-tea-dark);
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  line-height: 1.3;
}

.glossary-item dd {
  margin: 0;
  color: var(--color-text-muted);
  line-height: 1.6;
  font-size: 0.95rem;
}

@media (max-width: 380px) {
  .glossary-list {
    grid-template-columns: 1fr;
  }
}

/* ----- Checklist ----- */
.check-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0;
}

.check-list li {
  padding: 0.5rem 0 0.5rem 2.25rem;
  position: relative;
}

.check-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: bold;
  font-size: 1.1rem;
}

/* ----- Footer ----- */
.site-footer {
  margin-top: 4rem;
  padding: 2.5rem 1.25rem;
  background: linear-gradient(180deg, var(--color-primary-dark) 0%, #2a1810 50%, #1f120c 100%);
  color: #e8e2da;
  font-size: 0.9rem;
  border-top: 3px solid var(--color-copper);
  position: relative;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196, 148, 108, 0.5), transparent);
  opacity: 0.8;
}

.site-footer .wrap {
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}

.site-footer a {
  color: var(--color-copper);
}

.site-footer a:hover {
  color: #f0e6d8;
  text-decoration: none;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
}

.site-footer .footer-copy {
  margin: 0;
  font-size: 0.9rem;
}

.site-footer .footer-copyright {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  opacity: 0.9;
}

/* ----- Form & Contact ----- */
.form-group {
  margin-bottom: 1.35rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.45rem;
  color: var(--color-tea-dark);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s;
}

/* Плавное визуальное открытие select (нативный dropdown) */
.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235c4d3d' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.25rem;
}

.form-group select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(139, 69, 18, 0.12);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(139, 69, 18, 0.12);
}

.form-group textarea {
  min-height: 130px;
  resize: vertical;
}

.form-group .required::after {
  content: ' *';
  color: var(--color-accent);
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  transition: background 0.25s, transform 0.2s, box-shadow 0.2s;
}

.btn-primary {
  background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(92, 46, 10, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(180deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
  box-shadow: 0 6px 24px rgba(92, 46, 10, 0.35);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.form-status {
  margin-top: 1rem;
  padding: 0.85rem;
  border-radius: var(--radius);
  display: none;
}

.form-status.show {
  display: block;
}

.form-status.success {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.form-status.error {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ef9a9a;
}

.contact-block {
  display: grid;
  gap: 1.75rem;
  margin-top: 1.75rem;
  align-items: start;
}

@media (min-width: 640px) {
  .contact-block {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-info-card,
.contact-form-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--color-accent);
  transition: box-shadow 0.3s var(--ease-out);
}

.contact-info-card:hover,
.contact-form-card:hover {
  box-shadow: var(--shadow-lg);
}

.contact-info-card h3,
.contact-form-card h3 {
  margin-top: 0;
  margin-bottom: 1.1rem;
  font-size: 1.15rem;
  color: var(--color-tea-dark);
}

.contact-item {
  margin: 0 0 1rem;
}

.contact-item:last-child {
  margin-bottom: 0;
}

.contact-item a {
  word-break: break-all;
}

/* ----- Cookie banner ----- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(180deg, var(--color-primary-dark) 0%, #2a1810 100%);
  color: #e8e2da;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 -6px 32px rgba(0, 0, 0, 0.25);
  display: none;
  border-top: 2px solid var(--color-copper);
}

.cookie-banner.show {
  display: block;
}

.cookie-banner p {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.55;
}

.cookie-banner .buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.cookie-banner .buttons button {
  flex: 0 1 auto;
  min-height: 36px;
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  font-family: inherit;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.2s var(--ease-out), background 0.2s, color 0.2s, box-shadow 0.2s, border-color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.cookie-banner .buttons button:hover {
  transform: translateY(-1px);
}

.cookie-banner .btn-accept {
  background: linear-gradient(180deg, var(--color-copper) 0%, #a67c52 100%);
  color: var(--color-primary-dark);
}

.cookie-banner .btn-accept:hover {
  box-shadow: 0 2px 12px rgba(196, 148, 108, 0.4);
}

.cookie-banner .btn-reject {
  background: rgba(90, 82, 72, 0.85);
  color: #fff;
}

.cookie-banner .btn-reject:hover {
  background: #6d6459;
}

/* Ayarlar — контрастный фон и обводка, не сливается с баннером */
.cookie-banner .btn-settings {
  background: rgba(255, 255, 255, 0.12);
  color: #e8dcc8;
  border: 1px solid rgba(232, 220, 200, 0.6);
}

.cookie-banner .btn-settings:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

@media (max-width: 380px) {
  .cookie-banner .buttons {
    flex-direction: column;
  }
  .cookie-banner .buttons button {
    width: 100%;
    min-height: 40px;
  }
}

/* Cookie modal */
.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 1001;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.cookie-modal.show {
  display: flex;
}

.cookie-modal [role="dialog"] {
  background: var(--color-surface);
  max-width: 440px;
  width: 100%;
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--color-border);
}

.cookie-modal h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--color-primary-dark);
}

.cookie-modal .setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--color-border);
}

.cookie-modal .setting-row:last-of-type {
  border-bottom: none;
}

.cookie-modal .buttons {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.cookie-modal .buttons button {
  padding: 0.6rem 1.2rem;
  font-family: inherit;
  font-size: 0.95rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
}

.cookie-modal .btn-save {
  background: var(--color-primary);
  color: #fff;
  border: none;
}

.cookie-modal .btn-cancel {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

/* ----- Policy pages ----- */
.policy-page,
.policy-page main,
.page-content {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  padding: 2.5rem 1.25rem;
}

.policy-page .page-content {
  color: var(--color-text);
}

.policy-page .page-content p,
.policy-page .page-content li,
.policy-page .page-content section {
  color: inherit;
}

.policy-page h1 {
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--color-primary-dark);
  margin-bottom: 0.5rem;
}

.policy-page h2 {
  font-size: 1.3rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--color-primary-dark);
}

.policy-toc {
  background: var(--color-bg-warm);
  padding: 1.35rem;
  border-radius: var(--radius);
  margin: 1.5rem 0;
  border-left: 4px solid var(--color-accent);
}

.policy-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.policy-toc a {
  display: block;
  padding: 0.4rem 0;
}

/* ----- Skip link & a11y ----- */
.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 9999;
  padding: 0.75rem 1rem;
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

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

/* ----- Form toast ----- */
.form-toast {
  position: fixed;
  z-index: 1002;
  padding: 1rem 1.35rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
  box-shadow: var(--shadow-lg);
  max-width: calc(100vw - 2rem);
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
  pointer-events: none;
}

.form-toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.form-toast-success {
  background: #e8f5e9;
  color: #1b5e20;
  border: 1px solid #a5d6a7;
}

.form-toast-error {
  background: #ffebee;
  color: #b71c1c;
  border: 1px solid #ef9a9a;
}

@media (max-width: 640px) {
  .form-toast {
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
  }
}

@media (min-width: 641px) {
  .form-toast {
    bottom: 1.5rem;
    right: 1.5rem;
    left: auto;
    max-width: 380px;
  }
}
