/* Variables */
:root {
  --royal-blue: #1b264f;
  --royal-red: #d62828;
  --white: #ffffff;
  --off-white: #f5f7fa;
  --text-dark: #2c3e50;
  --text-gray: #57606f;
  --border: #e1e8ed;
  --font-head: "Libre Baskerville", serif;
  --font-body: "Montserrat", sans-serif;
  --container: 1200px;
  --radius: 8px;
  --shadow: 0 4px 20px rgba(27, 38, 79, 0.1);
}

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

body {
  font-family: var(--font-body);
  background-color: var(--white);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.3s ease;
}

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 100px 0;
}

/* Typography */
h1,
h2,
h3,
h4 {
  font-family: var(--font-head);
  color: var(--royal-blue);
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 24px;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 16px;
}

p {
  color: var(--text-gray);
  margin-bottom: 24px;
  font-size: 1rem;
}

.serif-italic {
  font-style: italic;
  color: var(--royal-red);
}

.center {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 60px;
}

/* Buttons */
.btn-royal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--royal-blue);
  color: #fff;
  padding: 14px 30px;
  font-weight: 600;
  border-radius: 4px;
  border: 1px solid var(--royal-blue);
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: 0.3s;
}

.btn-royal:hover {
  background: var(--royal-red);
  border-color: var(--royal-red);
}

.btn-royal-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--royal-blue);
  padding: 12px 25px;
  border: 1px solid var(--royal-blue);
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
  cursor: pointer;
}

.btn-royal-outline:hover {
  background: var(--royal-blue);
  color: #fff;
}

.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--royal-blue);
  font-weight: 600;
}

.btn-text:hover {
  color: var(--royal-red);
  gap: 10px;
}

.full {
  width: 100%;
}

.sm {
  padding: 8px 20px;
  font-size: 12px;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 15px 0;
  border-bottom: 3px solid var(--royal-blue);
}

.header__grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo__text {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 20px;
  color: var(--royal-blue);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.desktop-nav {
  display: flex;
  gap: 30px;
}

.desktop-nav a {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-dark);
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: var(--royal-red);
}

.header__act {
  display: flex;
  align-items: center;
  gap: 20px;
}

.link-simple {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
}

.burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--royal-blue);
}

/* Mobile Menu */
.nav-overlay {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100vh;
  background: var(--royal-blue);
  z-index: 2000;
  padding: 30px;
  transform: translateX(100%);
  transition: 0.4s ease;
  display: flex;
  flex-direction: column;
}

.nav-overlay.active {
  transform: translateX(0);
}

.nav-overlay__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.nav-overlay__logo {
  color: #fff;
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
}

.icon-btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
}

.nav-overlay__list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.nav-overlay__list a {
  font-family: var(--font-head);
  font-size: 24px;
  color: #fff;
}

.nav-overlay__foot {
  margin-top: auto;
}

/* Hero */
.hero {
  padding-top: 140px;
  min-height: 90vh;
  display: flex;
  align-items: center;
  background: #fff;
}

.hero__wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f0f0f0;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--royal-blue);
  margin-bottom: 24px;
}

.hero__desc {
  font-size: 18px;
  margin-bottom: 32px;
}

.hero__btns {
  display: flex;
  gap: 24px;
  align-items: center;
  margin-bottom: 24px;
}

.hero__sub {
  font-size: 12px;
  color: #999;
  font-style: italic;
}

.code-card {
  background: var(--royal-blue);
  border-radius: 8px;
  padding: 30px;
  box-shadow: 20px 20px 0px var(--royal-red);
  color: #fff;
  font-family: monospace;
  position: relative;
}

.cc-header {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.cc-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.cc-body p {
  color: #e0e0e0;
  margin-bottom: 5px;
  font-size: 14px;
}

.kwd {
  color: #ff79c6;
}
.str {
  color: #f1fa8c;
}
.num {
  color: #bd93f9;
}
.comment {
  color: #6272a4;
  margin-top: 10px;
}
.indent {
  padding-left: 20px;
}

.cc-badge {
  position: absolute;
  top: -15px;
  right: -15px;
  background: #fff;
  color: var(--royal-blue);
  padding: 5px 15px;
  font-weight: 700;
  font-size: 12px;
  border: 1px solid var(--royal-blue);
}

/* Stats */
.bg-light {
  background: var(--off-white);
}
.bg-navy {
  background: var(--royal-blue);
  color: #fff;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
}

.stat-num {
  display: block;
  font-family: var(--font-head);
  font-size: 48px;
  color: var(--royal-red);
  font-weight: 700;
  margin-bottom: 10px;
}

.stat-item p {
  font-size: 14px;
  margin-bottom: 0;
}

/* Courses */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.course-card {
  background: #fff;
  border: 1px solid var(--border);
  padding: 32px;
  border-radius: var(--radius);
  transition: 0.3s;
  position: relative;
}

.course-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: var(--royal-blue);
}

.course-card.highlight {
  border-color: var(--royal-red);
  background: #fffafa;
}

.cc-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--royal-red);
  color: #fff;
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 2px;
  text-transform: uppercase;
}

.cc-icon {
  width: 50px;
  height: 50px;
  background: var(--off-white);
  color: var(--royal-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  margin-bottom: 20px;
}

.cc-meta {
  display: flex;
  gap: 15px;
  font-size: 12px;
  color: var(--text-gray);
  margin-bottom: 20px;
  font-weight: 600;
  text-transform: uppercase;
}

.cc-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--royal-blue);
}

/* Split Layout */
.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.split-layout.reverse .sl-content {
  order: 1; /* For simple grid reversal if supported, or just rely on DOM order */
}

.bg-navy h2 {
  color: #fff;
}
.bg-navy p {
  color: #ccc;
}

.check-list {
  margin-top: 30px;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 25px;
  margin-bottom: 10px;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #4caf50;
}

.sl-img img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Quiz Banner */
.quiz-banner {
  background: linear-gradient(135deg, var(--royal-blue), #2c3e50);
  padding: 60px;
  border-radius: var(--radius);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.qb-text h3 {
  color: #fff;
  margin-bottom: 10px;
}
.qb-text p {
  color: #ddd;
  margin-bottom: 0;
  max-width: 600px;
}

/* Info Cards */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.info-card {
  background: #fff;
  padding: 30px;
  border-left: 4px solid var(--royal-red);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.ic-icon {
  color: var(--royal-red);
  margin-bottom: 15px;
}

/* FAQ */
.narrow {
  max-width: 800px;
  margin: 0 auto;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

.faq-head {
  width: 100%;
  text-align: left;
  padding: 20px;
  background: none;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  color: var(--royal-blue);
}

.faq-body {
  max-height: 0;
  overflow: hidden;
  transition: 0.3s;
}

.faq-body p {
  padding: 0 20px 20px;
  margin: 0;
}

/* Form */
.form-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.contact-details {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cd-row {
  display: flex;
  align-items: center;
  gap: 15px;
  font-weight: 500;
}

.cd-row i {
  color: var(--royal-red);
}

.fw-form {
  background: #fff;
  padding: 40px;
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  border-top: 5px solid var(--royal-blue);
}

.inp-grp {
  margin-bottom: 20px;
  position: relative;
}

.inp-grp label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--royal-blue);
}

.inp-grp input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--font-body);
}

.inp-grp input:focus {
  outline: none;
  border-color: var(--royal-blue);
}

.err {
  position: absolute;
  bottom: -20px;
  left: 0;
  font-size: 11px;
  color: var(--royal-red);
  display: none;
}

.inp-grp.error input {
  border-color: var(--royal-red);
}
.inp-grp.error .err {
  display: block;
}

.chk-grp {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
}

.chk-grp label {
  font-size: 12px;
}

.chk-grp a {
  text-decoration: underline;
  color: var(--royal-blue);
}

/* Footer */
.footer {
  background: var(--royal-blue);
  color: #fff;
  padding: 80px 0 20px;
}

.f-layout {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 60px;
}

.f-logo {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 15px;
}

.brand-col p {
  color: #ccc;
}

.f-contacts {
  margin-top: 20px;
}
.f-contacts a,
.f-contacts p {
  display: block;
  color: #ccc;
  font-size: 14px;
  margin-bottom: 8px;
}
.f-contacts a:hover {
  color: #fff;
}

.f-col h5 {
  font-family: var(--font-head);
  margin-bottom: 20px;
  color: #fff;
}

.f-col a {
  display: block;
  color: #aaa;
  margin-bottom: 10px;
  font-size: 14px;
}

.f-col a:hover {
  color: #fff;
}

.f-btm {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  color: #666;
  font-size: 12px;
}

/* Cookie */
.cookie-notif {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #fff;
  padding: 20px;
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  border-left: 4px solid var(--royal-blue);
  display: none;
  z-index: 5000;
  max-width: 300px;
}

.cn-text p {
  margin-bottom: 15px;
  font-size: 14px;
}

/* Responsive */
@media (max-width: 1024px) {
  .desktop-nav,
  .header__act > a {
    display: none;
  }
  .burger {
    display: block;
    margin-left: auto;
  }
  .hero__wrap,
  .split-layout,
  .form-wrap,
  .f-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero__media {
    order: -1;
  }
  .courses-grid,
  .stats-row {
    grid-template-columns: 1fr 1fr;
  }
  .quiz-banner {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }
  .hero__btns {
    justify-content: center;
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .courses-grid,
  .stats-row,
  .grid-2 {
    grid-template-columns: 1fr;
  }
  h1 {
    font-size: 2.5rem;
  }
  .section {
    padding: 60px 0;
  }
}

.pages {
  padding: 120px 0;
}

.pages-wrap {
  max-width: 1000px;
  padding: 0 10px;
  margin: 0 auto 20px;
}

.pages h1 {
  font-size: 40px;
  font-weight: 900;
  color: var(--accent);
  margin-bottom: 40px;
  text-align: center;
}

.text-wrapper {
  background: #f8fafc;
  padding: 50px 40px;
  border-radius: 20px;
  line-height: 1.8;
}

.text-wrapper h2 {
  font-size: 28px;
  font-weight: 700;
  color: #1e293b;
  margin-top: 40px;
  margin-bottom: 15px;
  border-bottom: 2px solid rgba(99, 102, 241, 0.2);
  padding-bottom: 5px;
}

.text-wrapper h3 {
  color: #000000;
  margin-bottom: 20px;
}

.text-wrapper p {
  color: #64748b;
  margin-bottom: 20px;
}

.text-wrapper ul {
  list-style-type: none;
  padding-left: 0;
  margin-bottom: 20px;
}

.text-wrapper ul li {
  position: relative;
  padding-left: 25px;
  margin-bottom: 15px;
  color: #1e293b;
}

.text-wrapper ul li::before {
  content: "•";
  position: absolute;
  left: 0;
  font-size: 20px;
  line-height: 1;
  color: var(--primary);
  top: 0;
}

.text-wrapper strong {
  color: var(--color-error);
}

.text-wrapper a {
  color: #001eff;
  text-decoration: underline;
  font-weight: 600;
}

.text-wrapper ol {
  display: flex;
  flex-direction: column;
  padding: 20px;
  color: #000000;
}

.margin {
  margin: 120px 0 50px;
  font-size: 40px;
  color: var(--accent);
}

@media (max-width: 768px) {
  .pages {
    padding: 100px 0 60px;
  }
  .pages h1 {
    font-size: 28px;
    margin-bottom: 30px;
  }
  .text-wrapper {
    padding: 30px 20px;
  }
  .text-wrapper h2 {
    font-size: 22px;
    margin-top: 25px;
  }
  .margin {
    font-size: 32px;
  }
}

@media (max-width: 600px) {
  .pages {
    padding: 90px 0 50px;
  }
  .pages h1 {
    font-size: 24px;
    margin-bottom: 25px;
  }
  .text-wrapper {
    padding: 20px 15px;
    border-radius: 10px;
  }
  .text-wrapper h2 {
    font-size: 18px;
    margin-top: 20px;
    margin-bottom: 10px;
  }
  .text-wrapper h3 {
    font-size: 16px;
  }
  .text-wrapper p {
    font-size: 13px;
    line-height: 1.6;
  }
  .margin {
    font-size: 24px;
    margin: 80px 0 30px;
  }
  .split-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .pages {
    padding: 80px 0 40px;
  }
  .pages h1 {
    font-size: 20px;
    margin-bottom: 20px;
  }
  .text-wrapper {
    padding: 15px 10px;
  }
  .text-wrapper h2 {
    font-size: 16px;
    margin-top: 15px;
  }
  .text-wrapper h3 {
    font-size: 14px;
  }
  .text-wrapper p {
    font-size: 12px;
  }
  .margin {
    font-size: 20px;
    margin: 60px 0 20px;
  }
}

/* --- CONTACT PAGE SPECIFIC STYLES --- */
.contact-page-main {
  padding-top: 180px;
  padding-bottom: 120px;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cp-title {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 400;
  letter-spacing: -2px;
  color: var(--accent);
  margin-bottom: 30px;
  line-height: 1;
}

.cp-divider {
  width: 60px;
  height: 1px;
  background-color: var(--accent);
  margin: 0 auto 40px auto;
}

.cp-status {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--text-muted);
  border: 1px solid var(--line);
  display: inline-block;
  padding: 10px 20px;
  margin-bottom: 60px;
  background: #fcfcfc;
}

.cp-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.cp-label {
  font-family: var(--font-sans);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 2px;
  color: var(--text-muted);
}

.cp-phone-link {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  color: var(--accent);
  line-height: 1.2;
  border-bottom: 2px solid transparent;
  transition: 0.3s;
  margin-bottom: 40px;
}

.cp-phone-link:hover {
  border-bottom-color: var(--accent);
  opacity: 0.8;
}

.cp-address-box {
  border-top: 1px solid var(--line);
  padding-top: 40px;
  width: 100%;
  max-width: 400px;
}

.cp-addr {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 10px;
}

.cp-email {
  font-family: var(--font-sans);
  color: var(--text-muted);
  font-size: 1rem;
}

.cp-email a {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.cp-email a:hover {
  color: var(--accent);
}

@media (max-width: 768px) {
  .contact-page-main {
    padding-top: 140px;
    padding-bottom: 80px;
  }

  .cp-title {
    font-size: clamp(2rem, 6vw, 4rem);
  }

  .cp-phone-link {
    font-size: clamp(1.8rem, 5vw, 3rem);
  }
}

@media (max-width: 600px) {
  .contact-page-main {
    padding-top: 120px;
    text-align: center;
  }

  .cp-title {
    font-size: 28px;
    margin-bottom: 20px;
  }

  .cp-divider {
    margin: 0 auto 30px auto;
  }

  .cp-status {
    font-size: 14px;
    padding: 8px 16px;
    margin-bottom: 40px;
  }

  .cp-phone-link {
    font-size: 24px;
    margin-bottom: 30px;
  }

  .cp-details {
    gap: 8px;
  }

  .cp-label {
    font-size: 12px;
  }

  .cp-address-box {
    padding-top: 20px;
    max-width: 100%;
  }

  .cp-addr {
    font-size: 16px;
  }

  .cp-email {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .contact-page-main {
    padding-top: 100px;
    min-height: 70vh;
  }

  .cp-title {
    font-size: 22px;
  }

  .cp-divider {
    width: 50px;
  }

  .cp-status {
    font-size: 12px;
  }

  .cp-phone-link {
    font-size: 20px;
  }

  .cp-addr {
    font-size: 14px;
  }

  .cp-email {
    font-size: 12px;
  }
}
