/* ===== BAIDU SCHOOL - СТИЛІ ===== */
/* Тепла палітра: помаранчевий + бежевий + білий для людей 60+ */

:root {
  --primary: #e07b39;
  --primary-dark: #c4622a;
  --primary-light: #f4a86a;
  --secondary: #f5ede0;
  --accent: #8b6914;
  --bg: #fff9f3;
  --white: #ffffff;
  --text: #3a2a1a;
  --text-light: #6b5744;
  --border: #e0c9b0;
  --card-bg: #ffffff;
  --shadow: rgba(180, 100, 40, 0.12);
  --ad-bg: #e8e8e8;
}

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

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", "Arial", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-width: 320px;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

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

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== HEADER ===== */
header {
  background: var(--white);
  border-bottom: 3px solid var(--primary);
  box-shadow: 0 2px 8px var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  flex-wrap: wrap;
  gap: 12px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  line-height: 1.2;
}
.logo span {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-light);
  letter-spacing: 0.03em;
}

nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

nav a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  padding: 8px 14px;
  border-radius: 6px;
  transition:
    background 0.2s,
    color 0.2s;
  text-decoration: none;
}
nav a:hover,
nav a.active {
  background: var(--secondary);
  color: var(--primary-dark);
  text-decoration: none;
}

.btn-register {
  background: var(--primary);
  color: var(--white) !important;
  border-radius: 8px;
  padding: 10px 22px !important;
  font-weight: 700 !important;
  font-size: 1rem !important;
  border: none;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.1s;
}
.btn-register:hover {
  background: var(--primary-dark) !important;
  color: var(--white) !important;
  text-decoration: none !important;
  transform: translateY(-1px);
}

/* ===== HAMBURGER (mobile) ===== */
.menu-toggle {
  display: none;
  background: none;
  border: 2px solid var(--primary);
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 1.4rem;
  color: var(--primary);
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-light) 60%,
    var(--secondary) 100%
  );
  color: var(--white);
  padding: 70px 20px 60px;
  text-align: center;
}
.hero h1 {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 18px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}
.hero p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto 30px;
  opacity: 0.95;
}
.btn-hero {
  display: inline-block;
  background: var(--white);
  color: var(--primary-dark);
  font-size: 1.15rem;
  font-weight: 700;
  padding: 14px 38px;
  border-radius: 40px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  transition:
    background 0.2s,
    transform 0.1s;
  text-decoration: none;
}
.btn-hero:hover {
  background: var(--secondary);
  color: var(--primary-dark);
  text-decoration: none;
  transform: translateY(-2px);
}

/* ===== SECTIONS ===== */
section {
  padding: 56px 20px;
}
section:nth-child(even) {
  background: var(--secondary);
}

.section-title {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 10px;
}
.section-subtitle {
  text-align: center;
  color: var(--text-light);
  font-size: 1.05rem;
  margin-bottom: 38px;
}

/* ===== CARDS GRID ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 30px;
}

.card {
  background: var(--card-bg);
  border-radius: 14px;
  box-shadow: 0 3px 16px var(--shadow);
  padding: 28px 24px;
  border: 1px solid var(--border);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px var(--shadow);
}

.card-icon {
  font-size: 2.4rem;
  margin-bottom: 14px;
  display: block;
}
.card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 10px;
}
.card p {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.65;
}

.card-date {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 8px;
}

.btn {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  margin-top: 14px;
  transition: background 0.2s;
  text-decoration: none;
}
.btn:hover {
  background: var(--primary-dark);
  color: var(--white);
  text-decoration: none;
}

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

/* ===== AD BANNERS ===== */
.ad-banner {
  background: var(--ad-bg);
  border: 2px dashed #b0b0b0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin: 24px auto;
  text-align: center;
  line-height: 1.4;
}
.ad-banner-728 {
  width: 100%;
  max-width: 728px;
  height: 90px;
}
.ad-banner-300x250 {
  width: 300px;
  height: 250px;
}
.ad-banner-300x600 {
  width: 300px;
  height: 600px;
}

.ad-label {
  display: block;
  font-size: 0.75rem;
  color: #aaa;
  text-align: center;
  margin-bottom: 4px;
}

/* ===== MODAL ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 999;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--white);
  border-radius: 16px;
  padding: 40px 32px 32px;
  width: 100%;
  max-width: 440px;
  position: relative;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.22);
}
.modal h2 {
  font-size: 1.5rem;
  color: var(--primary-dark);
  margin-bottom: 6px;
}
.modal p.sub {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 24px;
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  font-size: 1.7rem;
  cursor: pointer;
  color: var(--text-light);
  line-height: 1;
}
.modal-close:hover {
  color: var(--primary);
}

/* ===== FORMS ===== */
.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
}
.form-group textarea {
  min-height: 110px;
  resize: vertical;
}

.form-error {
  display: none;
  background: #fff3f0;
  border: 1px solid #f0a090;
  border-radius: 8px;
  color: #c0392b;
  padding: 12px 16px;
  font-size: 0.95rem;
  margin-top: 12px;
  text-align: center;
}
.form-error.visible {
  display: block;
}

/* ===== PAGE HEADER ===== */
.page-header {
  background: linear-gradient(
    135deg,
    var(--primary-dark) 0%,
    var(--primary) 100%
  );
  color: var(--white);
  padding: 50px 20px 40px;
  text-align: center;
}
.page-header h1 {
  font-size: 2rem;
  font-weight: 800;
}
.page-header p {
  margin-top: 10px;
  font-size: 1.05rem;
  opacity: 0.9;
}

/* ===== BLOG ===== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 26px;
}
.blog-card {
  background: var(--white);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 3px 16px var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s;
}
.blog-card:hover {
  transform: translateY(-4px);
}
.blog-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}
.blog-card-body {
  padding: 22px 20px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.blog-card-body h3 {
  font-size: 1.1rem;
  color: var(--primary-dark);
  margin-bottom: 8px;
}
.blog-card-body p {
  color: var(--text-light);
  font-size: 0.92rem;
  flex: 1;
}
.blog-card-meta {
  font-size: 0.82rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 6px;
}

/* ===== EVENTS ===== */
.events-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.event-item {
  background: var(--white);
  border-radius: 14px;
  border-left: 5px solid var(--primary);
  padding: 22px 24px;
  box-shadow: 0 2px 12px var(--shadow);
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.event-date-box {
  background: var(--primary);
  color: var(--white);
  border-radius: 10px;
  text-align: center;
  min-width: 66px;
  padding: 10px 8px;
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.3;
  flex-shrink: 0;
}
.event-date-box .day {
  font-size: 1.8rem;
  display: block;
}
.event-body h3 {
  font-size: 1.1rem;
  color: var(--primary-dark);
  margin-bottom: 6px;
}
.event-body p {
  color: var(--text-light);
  font-size: 0.92rem;
}
.event-meta {
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 4px;
}

.event-form-box {
  background: var(--white);
  border-radius: 14px;
  padding: 32px 28px;
  box-shadow: 0 3px 16px var(--shadow);
  max-width: 480px;
  margin: 0 auto;
}
.event-form-box h3 {
  font-size: 1.3rem;
  color: var(--primary-dark);
  margin-bottom: 16px;
}

/* ===== ABOUT ===== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}
.team-card {
  background: var(--white);
  border-radius: 14px;
  padding: 0;
  text-align: center;
  box-shadow: 0 3px 14px var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}
.team-avatar {
  width: 90px;
  height: 90px;
  background: var(--secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  margin: 0 auto 14px;
  border: 3px solid var(--primary-light);
}
.team-card h3 {
  font-size: 1rem;
  color: var(--primary-dark);
  margin-bottom: 4px;
}
.team-card .role {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 8px;
}
.team-card p {
  font-size: 0.88rem;
  color: var(--text-light);
}

.partners-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-top: 20px;
}
.partner-badge {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 14px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-light);
  text-align: center;
}

/* ===== DISCOUNTS ===== */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 30px;
}
.tab-btn {
  padding: 14px 30px;
  font-size: 1rem;
  font-weight: 700;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  color: var(--text-light);
  transition:
    color 0.2s,
    border-color 0.2s;
  margin-bottom: -2px;
}
.tab-btn.active {
  color: var(--primary-dark);
  border-bottom-color: var(--primary);
}
.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}

.discount-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.discount-card {
  background: var(--white);
  border-radius: 14px;
  padding: 24px 20px;
  box-shadow: 0 3px 14px var(--shadow);
  border: 1px solid var(--border);
  text-align: center;
}
.discount-logo {
  width: 70px;
  height: 70px;
  background: var(--secondary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 12px;
  border: 2px solid var(--border);
}
.discount-card h3 {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 6px;
}
.discount-pct {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  margin: 8px 0;
}
.discount-card p {
  font-size: 0.88rem;
  color: var(--text-light);
}

.how-to-box {
  background: var(--white);
  border-radius: 14px;
  padding: 30px 28px;
  box-shadow: 0 3px 14px var(--shadow);
  max-width: 700px;
  margin: 40px auto 0;
  border-left: 5px solid var(--primary);
}
.how-to-box h3 {
  font-size: 1.2rem;
  color: var(--primary-dark);
  margin-bottom: 14px;
}
.how-to-box ol {
  padding-left: 22px;
}
.how-to-box li {
  margin-bottom: 10px;
  color: var(--text-light);
}

/* ===== CONTACT ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.contact-info h2 {
  font-size: 1.5rem;
  color: var(--primary-dark);
  margin-bottom: 20px;
}
.contact-info-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 20px;
}
.contact-info-item .ico {
  font-size: 1.8rem;
  flex-shrink: 0;
}
.contact-info-item p {
  color: var(--text-light);
  font-size: 0.95rem;
}
.contact-info-item strong {
  color: var(--text);
}

.map-placeholder {
  background: #ddd;
  border-radius: 12px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  font-size: 1rem;
  margin-top: 20px;
  border: 2px dashed #bbb;
}

/* ===== BLOG POST ===== */
.post-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 36px;
  align-items: start;
}
.post-content h2 {
  font-size: 1.4rem;
  color: var(--primary-dark);
  margin: 24px 0 10px;
}
.post-content p {
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.8;
}
.post-content ul {
  padding-left: 24px;
  margin-bottom: 16px;
}
.post-content li {
  margin-bottom: 8px;
  color: var(--text-light);
}
.post-meta {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 22px;
}

/* ===== FOOTER ===== */
footer {
  background: #2d1f10;
  color: #c9b8a6;
  padding: 48px 20px 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 36px;
  margin-bottom: 36px;
}
.footer-col h3 {
  color: var(--primary-light);
  font-size: 1.05rem;
  margin-bottom: 14px;
  font-weight: 700;
}
.footer-col ul {
  list-style: none;
}
.footer-col li {
  margin-bottom: 8px;
}
.footer-col a {
  color: #c9b8a6;
  font-size: 0.9rem;
}
.footer-col a:hover {
  color: var(--primary-light);
}
.footer-col p {
  font-size: 0.9rem;
  line-height: 1.65;
}
.footer-bottom {
  border-top: 1px solid #4a3520;
  padding-top: 20px;
  text-align: center;
  font-size: 0.85rem;
  color: #9a8878;
}

/* ===== MISSION ===== */
.mission-box {
  background: var(--white);
  border-radius: 14px;
  padding: 36px 32px;
  box-shadow: 0 3px 14px var(--shadow);
  max-width: 800px;
  margin: 0 auto 50px;
  border-top: 5px solid var(--primary);
}
.mission-box h2 {
  font-size: 1.5rem;
  color: var(--primary-dark);
  margin-bottom: 14px;
}
.mission-box p {
  color: var(--text);
  line-height: 1.8;
  font-size: 1rem;
}

/* ===== UTILS ===== */
.text-center {
  text-align: center;
}
.mt-20 {
  margin-top: 20px;
}
.mt-30 {
  margin-top: 30px;
}
.mb-0 {
  margin-bottom: 0;
}

.with-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 36px;
  align-items: start;
}
.sidebar {
  position: sticky;
  top: 100px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .contact-grid,
  .post-layout,
  .with-sidebar {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
  }
  .ad-banner-300x600 {
    width: 100%;
    max-width: 300px;
    height: 300px;
  }
}
@media (max-width: 700px) {
  html {
    font-size: 16px;
  }
  .hero h1 {
    font-size: 1.7rem;
  }
  nav {
    display: none;
    flex-direction: column;
    width: 100%;
  }
  nav.open {
    display: flex;
  }
  .menu-toggle {
    display: block;
  }
  .header-inner {
    flex-wrap: wrap;
  }
  .ad-banner-728 {
    height: 60px;
    font-size: 0.8rem;
  }
  .tabs {
    flex-direction: column;
    border-bottom: none;
  }
  .tab-btn {
    border-bottom: none;
    border-left: 3px solid transparent;
  }
  .tab-btn.active {
    border-left-color: var(--primary);
  }
  .event-item {
    flex-direction: column;
  }
}
@media (max-width: 480px) {
  .modal {
    padding: 28px 18px 22px;
  }
  .cards-grid {
    grid-template-columns: 1fr;
  }
}
