/* =========================
   RESET
========================= */

:root {
  --bg: #f5fbff;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: #ffffff;
  --text: #10263a;
  --muted: #5b7082;
  --line: rgba(16, 38, 58, 0.12);
  --blue: #0b8ed8;
  --blue-dark: #075985;
  --teal: #0f766e;
  --mint: #d9f8f1;
  --amber: #f59e0b;
  --shadow: 0 18px 44px rgba(8, 47, 73, 0.10);
  --radius: 8px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Montserrat", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(232, 248, 255, 0.9), rgba(255, 255, 255, 0.35) 34%, rgba(223, 248, 241, 0.42));
  z-index: -2;
}

img,
svg,
video,
iframe {
  max-width: 100%;
}

a {
  color: inherit;
}

p,
h1,
h2,
h3,
li,
a,
span {
  overflow-wrap: anywhere;
}

button,
input,
textarea {
  font: inherit;
}

:focus-visible {
  outline: 3px solid rgba(245, 158, 11, 0.75);
  outline-offset: 4px;
}

/* =========================
   LAYOUT
========================= */

.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

section {
  padding: 96px 0;
}

.soft-section {
  background: rgba(255, 255, 255, 0.38);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-title {
  max-width: 760px;
  margin: 0 auto 44px;
  text-align: center;
}

.section-title span,
.cta-content span,
.card-kicker,
.trainer-category,
.membership-label,
.page-subtitle,
.hero-subtitle {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  color: var(--blue-dark);
  background: rgba(14, 165, 233, 0.10);
  border: 1px solid rgba(14, 165, 233, 0.18);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 800;
}

.section-title span,
.cta-content span {
  margin-bottom: 14px;
}

.section-title h2 {
  font-size: 44px;
  line-height: 1.12;
  margin-bottom: 14px;
}

.section-title p {
  color: var(--muted);
}

/* =========================
   HEADER
========================= */

.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.nav {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 12px 0;
}

.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-width: max-content;
  min-height: 44px;
  text-decoration: none;
  line-height: 1.2;
  color: var(--blue-dark);
}

.logo span {
  font-size: 14px;
  font-weight: 700;
  color: var(--teal);
  line-height: 1.2;
}

.logo strong {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}

.menu {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.menu a {
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  padding: 10px 12px;
  border-radius: 999px;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.menu a:hover,
.menu a[aria-current="page"] {
  background: rgba(14, 165, 233, 0.10);
  color: var(--blue-dark);
}

.menu a:hover {
  transform: translateY(-2px);
}

/* =========================
   BUTTONS
========================= */

.btn,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  max-width: 100%;
  padding: 13px 24px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  text-align: center;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 12px 28px rgba(11, 142, 216, 0.25);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.78);
  color: var(--blue-dark);
  border-color: rgba(7, 89, 133, 0.22);
}

.btn:hover,
.btn-outline:hover {
  transform: translateY(-3px);
}

.btn:hover {
  box-shadow: 0 18px 34px rgba(11, 142, 216, 0.30);
}

/* =========================
   HERO
========================= */

.hero,
.page-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(245, 251, 255, 0.92), rgba(245, 251, 255, 0.66)),
    url("https://images.unsplash.com/photo-1519315901367-f34ff9154487?q=80&w=2070&auto=format&fit=crop") center/cover no-repeat;
}

.hero {
  min-height: 720px;
  padding: 76px 0;
}

.page-hero {
  min-height: 360px;
  padding: 72px 0;
  background:
    linear-gradient(90deg, rgba(245, 251, 255, 0.94), rgba(245, 251, 255, 0.72)),
    url("https://images.unsplash.com/photo-1576013551627-0b744bca024d?q=80&w=1974&auto=format&fit=crop") center/cover no-repeat;
}

.hero-overlay,
.page-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.10), transparent 52%),
    linear-gradient(90deg, rgba(245, 158, 11, 0.10), transparent 38%);
}

.hero-content,
.page-hero-content {
  position: relative;
  z-index: 1;
}

.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 44px;
  align-items: end;
}

.hero-text,
.page-hero-content {
  max-width: 780px;
}

.hero h1,
.page-hero h1 {
  margin: 22px 0 20px;
  font-size: 64px;
  line-height: 1.04;
  letter-spacing: 0;
}

.page-hero h1 {
  font-size: 56px;
}

.hero p,
.page-hero p {
  max-width: 680px;
  color: var(--muted);
  font-size: 18px;
}

.hero-buttons,
.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.hero-stats {
  display: grid;
  gap: 14px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.stat-card strong {
  display: block;
  color: var(--blue-dark);
  font-size: 32px;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-card span {
  color: var(--muted);
  font-weight: 700;
}

/* =========================
   CARDS
========================= */

.feature-card,
.pool-card,
.trainer-card,
.pool-info-card,
.membership-card,
.contact-card,
.schedule-item,
.contact-form,
.trainer-page-card,
.rules-card {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.feature-card:hover,
.pool-card:hover,
.trainer-card:hover,
.membership-card:hover,
.schedule-item:hover,
.trainer-page-card:hover,
.rules-card:hover,
.contact-card:hover {
  transform: translateY(-5px);
  background: var(--surface-strong);
  border-color: rgba(11, 142, 216, 0.25);
}

.features-grid,
.pools-grid,
.trainers-grid,
.trainers-page-grid,
.memberships-grid,
.rules-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.features-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.features-grid .feature-card:nth-child(4) .card-kicker {
  color: var(--teal);
  background: rgba(15, 118, 110, 0.10);
  border-color: rgba(15, 118, 110, 0.18);
}

.feature-card,
.trainer-card,
.rules-card {
  padding: 28px;
}

.feature-card h3,
.pool-content h3,
.trainer-card h3,
.rules-card h3,
.contact-card h2,
.membership-card h2 {
  margin: 14px 0 10px;
  line-height: 1.2;
}

.feature-card p,
.pool-content p,
.trainer-card p,
.rules-card p,
.membership-card li,
.contact-form p {
  color: var(--muted);
}

.card-kicker {
  margin-bottom: 10px;
}

/* =========================
   POOLS
========================= */

.pool-card {
  overflow: hidden;
}

.pool-image,
.pool-section-image {
  background:
    linear-gradient(180deg, rgba(11, 142, 216, 0.05), rgba(7, 89, 133, 0.20)),
    url("https://images.unsplash.com/photo-1576013551627-0b744bca024d?q=80&w=1974&auto=format&fit=crop") center/cover no-repeat;
}

.pool-image {
  min-height: 240px;
}

.pool-image.second,
.pool-section-image.kids {
  background:
    linear-gradient(180deg, rgba(11, 142, 216, 0.05), rgba(7, 89, 133, 0.18)),
    url("https://images.unsplash.com/photo-1518611012118-696072aa579a?q=80&w=1974&auto=format&fit=crop") center/cover no-repeat;
}

.pool-image.third,
.pool-section-image.diving,
.pool-section-image.gym {
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.04), rgba(16, 38, 58, 0.24)),
    url("https://images.unsplash.com/photo-1560090995-01632a28895b?q=80&w=1974&auto=format&fit=crop") center/cover no-repeat;
}

.pool-content {
  padding: 26px;
}

.pools-page {
  padding-bottom: 40px;
}

.pool-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 44px;
  align-items: center;
  margin-bottom: 86px;
}

.pool-section.reverse .pool-section-image {
  order: 2;
}

.pool-section-image {
  min-height: 430px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.pool-section-content span {
  color: var(--blue-dark);
  font-weight: 800;
}

.pool-section-content h2 {
  font-size: 40px;
  line-height: 1.12;
  margin: 12px 0 18px;
}

.pool-section-content > p {
  color: var(--muted);
  margin-bottom: 26px;
}

.pool-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.pool-info-card {
  padding: 20px;
}

.pool-info-card h3 {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.pool-info-card p {
  font-weight: 800;
  color: var(--text);
}

/* =========================
   TRAINERS
========================= */

.trainers-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 820px;
  margin: 0 auto;
}

.trainer-card {
  text-align: center;
}

.trainer-avatar,
.trainer-page-photo.initials {
  display: grid;
  place-items: center;
  color: #fff;
  background:
    linear-gradient(135deg, var(--blue-dark), var(--teal));
  font-weight: 800;
  box-shadow: 0 16px 30px rgba(7, 89, 133, 0.24);
}

.trainer-avatar {
  width: 92px;
  height: 92px;
  margin: 0 auto 18px;
  border-radius: 50%;
  font-size: 28px;
}

.trainer-card span {
  display: block;
  color: var(--blue-dark);
  font-weight: 800;
  margin-bottom: 10px;
}

.trainers-page-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.trainer-page-card {
  overflow: hidden;
}

.trainer-page-photo {
  min-height: 240px;
  font-size: 54px;
}

.trainer-page-content {
  padding: 30px;
}

.trainer-page-content p {
  color: var(--muted);
  margin: 14px 0 18px;
}

.trainer-info-list {
  display: grid;
  gap: 12px;
  margin: 22px 0 26px;
}

.trainer-info-item {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.trainer-info-item span {
  text-align: right;
  color: var(--muted);
}

/* =========================
   SCHEDULE
========================= */

.schedule-table {
  display: grid;
  gap: 18px;
}

.schedule-item {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 160px 150px 130px;
  gap: 18px;
  align-items: center;
  padding: 24px;
}

.schedule-time {
  color: var(--blue-dark);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.15;
}

.schedule-info h3 {
  margin-bottom: 6px;
}

.schedule-info p,
.schedule-trainer,
.schedule-days {
  color: var(--muted);
  font-weight: 700;
}

/* =========================
   MEMBERSHIPS
========================= */

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

.membership-card {
  display: flex;
  flex-direction: column;
  padding: 30px;
}

.membership-card .btn {
  margin-top: auto;
}

.membership-price {
  margin: 18px 0 8px;
  color: var(--blue-dark);
  font-size: 42px;
  line-height: 1;
  font-weight: 800;
}

.membership-period {
  color: var(--teal);
  font-weight: 800;
  margin-bottom: 22px;
}

.membership-list {
  display: grid;
  gap: 12px;
  list-style: none;
  margin-bottom: 28px;
}

.membership-list li {
  position: relative;
  padding-left: 22px;
}

.membership-list li::before,
.rules-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
}

/* =========================
   RULES
========================= */

.rules-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.rules-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rules-list {
  display: grid;
  gap: 12px;
  list-style: none;
}

.rules-list li {
  position: relative;
  padding-left: 22px;
  color: var(--muted);
}

/* =========================
   CONTACTS
========================= */

.contacts-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 28px;
  align-items: start;
}

.contacts-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.contact-card {
  padding: 26px;
}

.contact-card span {
  display: block;
  color: var(--blue-dark);
  font-weight: 800;
  margin-bottom: 10px;
}

.contact-card h2 {
  font-size: 24px;
}

.contact-card a,
.footer a {
  text-decoration: none;
}

.contact-card a[href^="mailto:"] {
  font-size: 20px;
}

.contact-card a:hover,
.footer a:hover {
  color: var(--blue-dark);
}

.contact-form {
  padding: 30px;
}

.contact-panel {
  position: sticky;
  top: 104px;
}

.contact-form h2 {
  margin-bottom: 12px;
}

.map-section {
  padding-top: 0;
}

.map-wrapper {
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  background: var(--surface);
}

.map-wrapper iframe {
  display: block;
  width: 100%;
  height: 460px;
  border: 0;
}

/* =========================
   CTA
========================= */

.cta {
  background:
    linear-gradient(135deg, rgba(11, 142, 216, 0.10), rgba(15, 118, 110, 0.11)),
    #ffffff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.cta-content {
  max-width: 820px;
  text-align: center;
}

.cta-content h2 {
  font-size: 44px;
  line-height: 1.15;
  margin-bottom: 16px;
}

.cta-content p {
  color: var(--muted);
  margin-bottom: 28px;
}

/* =========================
   FOOTER
========================= */

.footer {
  padding: 64px 0;
  background: #0f2435;
  color: #fff;
}

.footer-content {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 1fr;
  gap: 32px;
}

.footer h2,
.footer h3 {
  margin-bottom: 12px;
}

.footer p {
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 8px;
}

.footer a {
  color: rgba(255, 255, 255, 0.84);
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1180px) {
  .features-grid,
  .rules-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .memberships-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .schedule-item {
    grid-template-columns: 150px minmax(0, 1fr) 140px;
  }

  .schedule-item .btn {
    grid-column: 1 / -1;
    width: fit-content;
  }
}

@media (max-width: 980px) {
  .nav {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .logo {
    align-self: center;
    text-align: center;
  }

  .nav-cta {
    align-self: center;
  }

  .hero-content,
  .pool-section,
  .contacts-grid,
  .footer-content,
  .trainers-page-grid.two {
    grid-template-columns: 1fr;
  }

  .pool-section.reverse .pool-section-image {
    order: 0;
  }

  .hero {
    min-height: auto;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 48px;
  }

  .pool-section-content h2,
  .section-title h2,
  .cta-content h2 {
    font-size: 36px;
  }

  .contact-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 28px, 1180px);
  }

  section,
  .hero,
  .page-hero {
    padding: 72px 0;
  }

  .page-hero {
    min-height: 320px;
  }

  .menu {
    gap: 6px;
  }

  .menu a {
    font-size: 13px;
    padding: 9px 10px;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 40px;
  }

  .hero p,
  .page-hero p {
    font-size: 16px;
  }

  .features-grid,
  .pools-grid,
  .trainers-grid,
  .memberships-grid,
  .rules-grid,
  .rules-grid.three,
  .contacts-info {
    grid-template-columns: 1fr;
  }

  .pool-section {
    gap: 24px;
    margin-bottom: 64px;
  }

  .pool-section-image {
    min-height: 320px;
  }

  .schedule-item {
    grid-template-columns: 1fr;
  }

  .schedule-item .btn {
    width: 100%;
  }

  .trainer-info-item {
    display: grid;
    gap: 4px;
  }

  .trainer-info-item span {
    text-align: left;
  }

  .map-wrapper iframe {
    height: 360px;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .nav-cta {
    display: none;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 34px;
  }

  .section-title h2,
  .pool-section-content h2,
  .cta-content h2 {
    font-size: 30px;
  }

  .hero-buttons,
  .quick-links {
    flex-direction: column;
  }

  .btn,
  .btn-outline {
    width: 100%;
    padding-left: 16px;
    padding-right: 16px;
  }

  .feature-card,
  .trainer-card,
  .rules-card,
  .membership-card,
  .contact-card,
  .contact-form,
  .trainer-page-content,
  .pool-content,
  .schedule-item {
    padding: 22px;
  }

  .membership-price {
    font-size: 34px;
  }

  .stat-card strong {
    font-size: 28px;
  }
}

@media (max-width: 380px) {
  .menu a {
    font-size: 12px;
    padding: 8px;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 30px;
  }

  .pool-info-grid {
    grid-template-columns: 1fr;
  }

  .pool-section-image {
    min-height: 260px;
  }
}

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