/* ============================================================
   САП СЕРФИНГ — Global Styles
   Font: Ubuntu
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap');

/* =================== VARIABLES =================== */
:root {
  --bg:              #F5F0E8;
  --bg-dark:         #3C2F24;
  --bg-card-dark:    #3F2A22;

  --terracotta:      #D47E5F;
  --terracotta-dark: #b8644a;
  --terracotta-light:#e09a82;

  --text:            #4A3C2F; 
  --text-muted:      #6b5a4a;
  --heading-accent:  #5C4633;

  --card-title:      #FFE8B8;
  --card-desc:       #F0E4D4;
  --card-price:      #E8C87A;
  --card-btn-bg:     #D47E5F;
  --card-btn-text:   #2C221A;

  --border:          rgba(192,101,74,0.22);
  --gold:            #c8a96e;
  --white:           #ffffff;

  --nav-h:        70px;
  --radius:       14px;
  --shadow:       0 8px 32px rgba(42,31,20,0.10);
  --shadow-hover: 0 18px 48px rgba(192,101,74,0.18);
}

/* =================== RESET =================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Ubuntu', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.6;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* =================== SCROLLBAR =================== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--terracotta); border-radius: 3px; }

/* =================== TYPOGRAPHY =================== */
h1, h2, h3, h4 {
  font-family: 'Ubuntu', sans-serif;
  line-height: 1.25;
  font-weight: 700;
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 1.75rem);
  text-align: center;
  font-weight: 700;
  color: var(--heading-accent);
}
.section-divider {
  width: 44px; height: 3px;
  background: var(--terracotta);
  margin: 0.5rem auto 2.6rem;
  border-radius: 2px;
}

/* =================== UTILITY =================== */
.container { width: 90%; max-width: 1180px; margin: 0 auto; }
.section { padding: 80px 0; }

/* =================== BUTTONS =================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--terracotta);
  color: var(--white);
  padding: 12px 30px;
  border-radius: 8px;
  font-family: 'Ubuntu', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.03em;
  border: none;
  cursor: pointer;
  transition: background 0.25s, transform 0.2s, box-shadow 0.25s;
}
.btn:hover {
  background: var(--terracotta-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(212,126,95,0.38);
}
.btn:active { transform: translateY(0); }

.btn-card {
  background: var(--card-btn-bg);
  color: var(--card-btn-text);
  font-weight: 700;
}
.btn-card:hover { background: #c06a4a; color: var(--white); }

.btn-outline {
  background: transparent;
  border: 2px solid var(--terracotta);
  color: var(--terracotta);
}
.btn-outline:hover { background: var(--terracotta); color: var(--white); }

/* =================== NAVBAR =================== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--bg-dark);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  z-index: 1000;
  transition: box-shadow 0.3s;
}
.navbar.scrolled {
  box-shadow: 0 2px 24px rgba(0,0,0,0.3);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 20px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Ubuntu', sans-serif;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--white);
  flex-shrink: 0;
  text-decoration: none;
}
.nav-logo-icon {
  width: 60px; height: 60px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.nav-logo-icon img,
.nav-logo-icon svg { width: 100%; height: 100%; object-fit: contain; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  justify-content: center;
}
.nav-links a {
  font-family: 'Ubuntu', sans-serif;
  font-size: 1.06rem;
  font-weight: normal;
  color: rgba(255,255,255,0.72);
  transition: color 0.2s;
  white-space: nowrap;
  position: relative;
  padding-bottom: 2px;
}
.nav-links a::after {
  content: '';
  position: absolute; bottom: -2px; left: 0; right: 0;
  height: 2px; background: var(--terracotta);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.25s;
  border-radius: 1px;
}
.nav-links a:hover { color: var(--white); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a.active { color: var(--white); }
.nav-links a.active::after { transform: scaleX(1); }

.nav-socials {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.nav-socials a {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  transition: background 0.2s, transform 0.2s;
}
.nav-socials a:hover { background: var(--terracotta); transform: scale(1.1); }
.social-icon-img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

/* Burger */
.burger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 4px; background: none; border: none; flex-shrink: 0;
}
.burger span {
  display: block; width: 24px; height: 2px;
  background: var(--white); border-radius: 2px; transition: all 0.3s;
}
.burger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* Mobile menu */
.mobile-menu {
  position: fixed;
  top: var(--nav-h); left: 0; right: 0;
  background: #2e2018;
  padding: 0 5%;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  z-index: 999;
  max-height: 0; overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s;
}
.mobile-menu.open { max-height: 500px; padding: 16px 5%; }
.mobile-menu a {
  display: block; font-size: 1rem; font-weight: 400;
  color: rgba(255,255,255,0.8);
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: color 0.2s;
}
.mobile-menu > a:last-of-type { border-bottom: none; }
.mobile-menu a:hover { color: var(--terracotta); }
.mobile-menu-socials {
  display: flex;
  gap: 10px;
  padding-top: 16px;
}
.mobile-menu-socials a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border-bottom: none;
  padding: 0;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =================== FOOTER =================== */
footer {
  background: var(--bg-dark);
  padding: 56px 0 28px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px; margin-bottom: 40px;
}
.footer-brand .nav-logo { margin-bottom: 14px; }
.footer-brand p {
  font-size: 0.88rem; color: rgba(255,255,255,0.5);
  line-height: 1.75; max-width: 230px;
}
.footer-col h4 {
  font-family: 'Ubuntu', sans-serif;
  font-size: 1.06rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 18px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a {
  font-size: 0.95rem; color: rgba(255,255,255,0.6); transition: color 0.2s;
}
.footer-col ul li a:hover { color: var(--terracotta-light); }
.footer-phone {
  font-size: 1.1rem; color: var(--white); font-weight: 700;
  margin-bottom: 14px; display: block;
}
.footer-socials { display: flex; gap: 10px; }
.footer-socials a {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  color: var(--white); transition: background 0.2s;
}
.footer-socials a:hover { background: var(--terracotta); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: 22px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 10px;
}
.footer-bottom p { font-size: 0.8rem; color: rgba(255,255,255,0.3); }

/* =================== PAGE HEADER =================== */
.page-header {
  padding-top: calc(var(--nav-h) + 52px);
  padding-bottom: 36px; text-align: center;
}
.page-header h1 {
  font-size: clamp(1.75rem, 4.5vw, 3rem);
  margin-bottom: 0.5rem; color: var(--heading-accent);
}
.page-header p {
  font-size: 1rem; color: var(--text-muted);
  max-width: 560px; margin: 0 auto; line-height: 1.75;
}
.page-eyebrow {
  font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--terracotta); margin-bottom: 10px;
}

/* =================== RESPONSIVE =================== */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav-socials { display: none; }
  .burger { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .section { padding: 56px 0; }
}

/* ============================================================
   LEGAL MODAL (Политика / Согласие)
============================================================ */
.footer-bottom {
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.footer-legal {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-legal-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.45);
  font-family: 'Ubuntu', sans-serif;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-legal-btn:hover { color: var(--terracotta-light); }
.footer-legal-sep { color: rgba(255,255,255,0.2); font-size: 0.8rem; }

/* Overlay */
.legal-overlay {
  position: fixed; inset: 0;
  background: rgba(20,12,6,0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.legal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* Modal box */
.legal-modal {
  position: relative;
  background: var(--bg);
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
  width: 100%;
  max-width: 620px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 40px 36px 36px;
  scrollbar-width: thin;
  scrollbar-color: var(--terracotta) transparent;
}
.legal-modal::-webkit-scrollbar { width: 4px; }
.legal-modal::-webkit-scrollbar-thumb { background: var(--terracotta); border-radius: 2px; }

/* Close button */
.legal-close {
  position: sticky;
  top: 0;
  float: right;
  margin: -8px -8px 12px 12px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-dark);
  border: none;
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  flex-shrink: 0;
  z-index: 2;
}
.legal-close:hover {
  background: var(--terracotta);
  transform: rotate(90deg);
}

/* Content */
.legal-body h2 {
  font-size: 1.5rem;
  color: var(--heading-accent);
  margin-bottom: 1.4rem;
  clear: both;
}
.legal-body h3 {
  font-size: 1rem;
  color: var(--heading-accent);
  margin: 1.4rem 0 0.5rem;
}
.legal-body p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.75;
}

/* Responsive */
@media (max-width: 480px) {
  .legal-modal { padding: 28px 20px 24px; border-radius: 16px 16px 0 0; }
  .legal-overlay { align-items: flex-end; padding: 0; }
  .legal-modal { max-height: 90vh; border-radius: 16px 16px 0 0; }
}

.site-toast-root {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 3600;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(360px, calc(100vw - 24px));
}

.site-toast {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  color: #fff9f2;
  background: rgba(33, 40, 49, 0.94);
  box-shadow: 0 20px 44px rgba(20, 12, 6, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.12);
  animation: toast-in 0.22s ease;
}

.site-toast.is-leaving {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.site-toast-success {
  background: linear-gradient(135deg, rgba(53, 99, 72, 0.96), rgba(36, 67, 49, 0.96));
}

.site-toast-error {
  background: linear-gradient(135deg, rgba(158, 69, 58, 0.96), rgba(98, 39, 33, 0.96));
}

.site-toast-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.site-toast-copy strong {
  font-size: 0.92rem;
}

.site-toast-copy span {
  color: rgba(255, 249, 242, 0.82);
  line-height: 1.5;
  font-size: 0.9rem;
}

.site-toast-close {
  border: none;
  background: transparent;
  color: rgba(255, 249, 242, 0.78);
  font-size: 1.3rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.site-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 3550;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(20, 12, 6, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.site-confirm-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.site-confirm-modal {
  width: min(460px, 100%);
  padding: 28px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.98), rgba(244, 236, 227, 0.98));
  box-shadow: 0 28px 70px rgba(20, 12, 6, 0.28);
  color: var(--heading-accent);
}

.site-confirm-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  margin-bottom: 16px;
  background: rgba(212, 126, 95, 0.12);
  color: var(--terracotta);
}

.site-confirm-modal h3 {
  margin-bottom: 10px;
}

.site-confirm-modal p {
  color: var(--text-muted);
  line-height: 1.65;
}

.site-confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 22px;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 540px) {
  .site-toast-root {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
  }

  .site-confirm-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .site-confirm-modal {
    width: 100%;
    border-radius: 18px 18px 0 0;
    padding: 24px 18px;
  }

  .site-confirm-actions {
    flex-direction: column-reverse;
  }
}
