:root {
  --bg: #f8f9fa;
  --surface: #ffffff;
  --surface-soft: #fbfbfc;
  --text: #23272b;
  --muted: #5f6770;
  --border: rgba(94, 100, 108, 0.12);
  --shadow: 0 26px 60px rgba(24, 31, 40, 0.08);
  --radius: 24px;
  --radius-sm: 18px;
  --gradient: linear-gradient(135deg, #ef557a 0%, #f8a25f 100%);
  --gradient-soft: linear-gradient(180deg, rgba(239, 85, 122, 0.12), rgba(248, 162, 95, 0.12));
  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background-image: url('images/hero.svg');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-color: var(--bg);
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
  padding: 0 0 48px;
}

.site-header {
  position: sticky;
  top: 20px;
  z-index: 20;
  margin: 0 auto 32px;
  padding: 18px 26px;
  border-radius: 28px;
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 28px 60px rgba(20, 28, 45, 0.08);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.site-logo {
  width: 36px;
  max-height: 40px;
  height: auto;
  display: block;
  border-radius: 4px;
  object-fit: contain;
}

.brand-text {
  display: inline-block;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: center;
}

.site-nav a {
  color: var(--muted);
  font-weight: 500;
  transition: color 0.25s ease;
}

.site-nav a:hover {
  color: var(--text);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}

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

.button-solid {
  color: #ffffff;
  background: var(--text);
  box-shadow: 0 14px 30px rgba(35, 39, 43, 0.18);
}

.button-primary {
  color: #ffffff;
  background: var(--gradient);
  box-shadow: 0 18px 40px rgba(239, 85, 122, 0.18);
}

.section {
  margin-bottom: 48px;
}

.section-header {
  max-width: 720px;
  margin-bottom: 28px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  color: #8e95a0;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.hero-card {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  padding: 42px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  min-height: 420px;
}

.hero-copy h1 {
  margin: 0 0 24px;
  font-size: clamp(2.6rem, 4vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy p {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 640px;
}

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.hero-visual-panel {
  width: 100%;
  min-height: 320px;
  padding: 32px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 24px 60px rgba(43, 49, 63, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.visual-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #d23c60;
  background: rgba(242, 95, 136, 0.14);
  width: fit-content;
}

.hero-visual-panel h2 {
  margin: 0;
  font-size: 1.4rem;
  color: #33343a;
  line-height: 1.5;
}

.content-card {
  padding: 38px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.content-card h2 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 2.6vw, 2.7rem);
  line-height: 1.08;
}

.content-card p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.cidesco-card {
  padding: 40px;
  border-radius: calc(var(--radius) + 4px);
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,255,255,0.92));
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 32px 90px rgba(239, 85, 122, 0.12);
  overflow: hidden;
}

.cidesco-card::before {
  content: '';
  position: absolute;
  inset: 0;
  margin: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(239, 85, 122, 0.14), rgba(248, 162, 95, 0.14));
  pointer-events: none;
}

.cidesco-card > * {
  position: relative;
  z-index: 1;
}

.premium-label {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: rgba(239, 85, 122, 0.12);
  color: #d63a5f;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 18px;
}

.cidesco-card h3 {
  margin: 0;
  font-size: clamp(2rem, 2.4vw, 2.5rem);
  line-height: 1.04;
}

.subline {
  margin: 18px 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.premium-copy {
  margin: 0 0 28px;
  font-size: 1rem;
  color: #4d535d;
  max-width: 680px;
}

.program-grid,
.contact-grid,
.course-grid {
  display: grid;
  gap: 24px;
}

.program-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 28px;
}

.course-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 28px;
}

.course-card {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.course-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.course-duration {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.why-list,
.course-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
  list-style-type: disc;
}

.why-list li,
.course-list li {
  margin-bottom: 0.75rem;
  line-height: 1.55;
}

.program-card {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: grid;
  gap: 20px;
}

.program-image {
  min-height: 180px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(239, 85, 122, 0.16), rgba(248, 162, 95, 0.12));
  display: grid;
  place-items: center;
  overflow: hidden;
}

.program-image-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Inline fallback image inside hero visual panel (hidden on desktop) */
.hero-visual-image {
  display: none;
  width: 100%;
  height: auto;
  border-radius: 18px;
  object-fit: cover;
  margin-bottom: 16px;
}

.program-card h4 {
  margin: 0;
  font-size: 1.2rem;
}

.link-secondary {
  color: #c75176;
  font-weight: 600;
  transition: color 0.2s ease;
}

.link-secondary:hover {
  color: #ee7a9e;
}

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

.forms-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 24px;
}

.form-card {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.site-form {
  display: grid;
  gap: 18px;
}

.form-row {
  display: grid;
  gap: 10px;
}

.site-form label {
  font-weight: 700;
  color: var(--text);
}

.site-form input,
.site-form select,
.site-form textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(94, 100, 108, 0.16);
  background: #ffffff;
  box-shadow: inset 0 1px 2px rgba(17, 24, 39, 0.04);
  color: var(--text);
  font: inherit;
}

.site-form textarea {
  resize: vertical;
  min-height: 120px;
}

.form-error {
  min-height: 1.5rem;
  color: #b00020;
  font-size: 0.95rem;
  margin-top: -8px;
  margin-bottom: 8px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.form-error.visible {
  opacity: 1;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

.contact-card h4,
.form-card h4 {
  margin-top: 0;
}

.contact-card h4 {
  margin-top: 0;
  font-size: 1.15rem;
}

.contact-card p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.contact-highlight a {
  color: #d63a5f;
  text-decoration: none;
}

.contact-highlight a:hover {
  text-decoration: underline;
}

@media (max-width: 1024px) {
  .hero-card {
    grid-template-columns: 1fr;
  }

  .program-grid,
  .contact-grid,
  .course-grid,
  .forms-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: 100%;
    padding: 0 18px 32px;
  }

  .header-inner {
    justify-content: center;
  }

  .site-nav {
    gap: 16px;
    justify-content: center;
  }

  .button-solid {
    width: 100%;
    justify-content: center;
  }

  .hero-card {
    padding: 20px;
    gap: 18px;
    min-height: auto;
  }

  .hero-copy h1 {
    font-size: 2.3rem;
  }

  .hero-visual-panel {
    min-height: auto;
    padding: 18px;
  }

  .program-grid,
  .contact-grid,
  .course-grid,
  .forms-grid {
    grid-template-columns: 1fr;
  }

  /* Mobile: many browsers ignore fixed backgrounds — fall back to scroll */
  body {
    background-attachment: scroll;
    background-position: top center;
    background-size: cover;
  }

  /* Show inline hero image on small screens as a reliable fallback */
  .hero-visual-image {
    display: block;
    width: 100%;
    max-height: 320px;
    height: auto;
    border-radius: 14px;
  }
  
  /* Revert to a plain background on mobile to avoid layout issues */
  body {
    background-image: none;
    background-color: var(--bg);
  }
  
  /* Hide inline hero image on mobile to preserve original layout */
  .hero-visual-image {
    display: none;
  }
}