@import url("https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Josefin+Sans:wght@300;400;600&family=Rajdhani:wght@500;600;700&family=Source+Sans+3:wght@300;400;600&family=Covered+By+Your+Grace&display=swap");

:root {
  --py-yellow: #FFD43B;
  --py-yellow-dark: #C9A227;
  --py-navy: #16213e;
  --py-blue: #4B8BBE;
  --py-blue-dark: #306998;
  --py-body: #4a4a4a;
  --py-muted: #6c757d;
  --py-light: #f8f9fa;
  --py-code-bg: #1e1e2e;
  --py-border: rgba(75, 139, 190, 0.25);
  --py-orange: #ff9400;
}

body {
  font-family: "Source Sans 3", system-ui, sans-serif;
  color: var(--py-body);
  background-color: #ffffff;
}

h1,
h2,
h3,
h4,
h5 {
  font-family: "Rajdhani", "Source Sans 3", sans-serif;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--py-navy);
}

a {
  color: var(--py-blue);
}

a:hover {
  color: var(--py-yellow-dark);
}

::selection {
  background: rgba(75, 139, 190, 0.25);
  color: var(--py-navy);
}

/* ── Handwriting hero font ────────────────────────────── */
.font-handwriting {
  font-family: "Covered By Your Grace", cursive;
  line-height: 1.2;
}

/* ── Hero section ─────────────────────────────────────── */
.hero-dg {
  position: relative;
  overflow: hidden;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-dg__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-dg__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.hero-dg__content {
  position: relative;
  z-index: 10;
  max-width: 800px;
  padding: 4rem 1.5rem;
}

.hero-dg__title {
  font-family: "Covered By Your Grace", cursive;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  color: #fff;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero-dg__subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-style: italic;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── Two-column "about" section ───────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

.about-grid h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.about-grid p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--py-body);
  margin-bottom: 0.75rem;
}

.about-grid img {
  width: 100%;
  border-radius: 0.5rem;
}

/* ── Stat badges ──────────────────────────────────────── */
.stat-badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 1rem;
  margin: 0.4rem 0.1rem;
  white-space: nowrap;
}

.stat-badge--orange {
  background: var(--py-blue);
  color: #fff;
}

.stat-badge--blue {
  background: var(--py-blue);
  color: #fff;
}

/* ── Impact / Organise two-col ────────────────────────── */
.impact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 768px) {
  .impact-grid {
    grid-template-columns: 1fr;
  }
}

.impact-grid h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.impact-grid p {
  font-size: 1.05rem;
  line-height: 1.7;
}

/* ── Event overlay cards ──────────────────────────────── */
.event-card-overlay {
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
  height: 220px;
  display: flex;
  align-items: flex-end;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-card-overlay:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.event-card-overlay__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s ease;
}

.event-card-overlay:hover .event-card-overlay__bg {
  transform: scale(1.05);
}

.event-card-overlay__gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.05) 100%);
}

.event-card-overlay__text {
  position: relative;
  z-index: 10;
  padding: 1.25rem;
}

.event-card-overlay__city {
  font-family: "Covered By Your Grace", cursive;
  font-size: 2rem;
  color: #fff;
  line-height: 1;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.event-card-overlay__date {
  font-family: "Covered By Your Grace", cursive;
  font-size: 1.25rem;
  color: var(--py-blue);
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* ── Event grid ───────────────────────────────────────── */
.events-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .events-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .events-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Coaches + Blog two-col ───────────────────────────── */
.community-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 768px) {
  .community-grid {
    grid-template-columns: 1fr;
  }
}

.coach-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.coach-photo:hover {
  transform: scale(1.02);
}

.coach-photos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 480px) {
  .coach-photos-grid {
    grid-template-columns: 1fr;
  }
}

.blog-link-item {
  border-bottom: 1px solid #eee;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.blog-link-item:last-child {
  border-bottom: none;
}

.blog-link-item a {
  font-size: 1.05rem;
  color: var(--py-navy);
  text-decoration: underline;
  transition: color 0.2s;
}

.blog-link-item a:hover {
  color: var(--py-blue);
}

.blog-link-item p {
  color: var(--py-muted);
  font-size: 0.95rem;
  margin-top: 0.35rem;
  line-height: 1.6;
}

.blog-link-item .read-all {
  color: var(--py-blue);
  text-decoration: underline;
  font-size: 0.9rem;
}

/* ── Support + Newsletter two-col ─────────────────────── */
.support-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 768px) {
  .support-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Progress bar ─────────────────────────────────────── */
.progress-bar-wrap {
  width: 100%;
  background: #eee;
  border-radius: 4px;
  height: 28px;
  overflow: hidden;
  margin: 0.75rem 0;
}

.progress-bar-fill {
  height: 100%;
  background: #2ecc71;
  border-radius: 4px;
  display: flex;
  align-items: center;
  padding-left: 0.75rem;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  transition: width 1.5s ease;
}

/* ── CTA Button (blue) ──────────────────────────────── */
.btn-blue {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  background: var(--py-blue);
  color: #fff;
  font-weight: 600;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  text-decoration: none;
  font-size: 0.95rem;
}

.btn-blue:hover {
  background: var(--py-blue-dark);
  transform: translateY(-1px);
  color: #fff;
}

.btn-blue-outline {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  background: transparent;
  color: var(--py-blue);
  font-weight: 600;
  border-radius: 4px;
  border: 2px solid var(--py-blue);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  font-size: 0.95rem;
}

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

/* ── Newsletter form ──────────────────────────────────── */
.newsletter-form {
  display: flex;
  gap: 0;
  margin-top: 1rem;
}

.newsletter-form input[type="email"] {
  flex: 1;
  padding: 0.6rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px 0 0 4px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.newsletter-form input[type="email"]:focus {
  border-color: var(--py-blue);
}

.newsletter-form button {
  padding: 0.6rem 1.25rem;
  background: var(--py-blue);
  color: #fff;
  font-weight: 600;
  border: 1px solid var(--py-blue);
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 0.95rem;
}

.newsletter-form button:hover {
  background: #e08600;
}

/* ── Sponsor logos row ────────────────────────────────── */
.sponsor-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  justify-content: center;
}

.sponsor-row img {
  height: 50px;
  max-width: 140px;
  object-fit: contain;
  filter: grayscale(30%);
  opacity: 0.85;
  transition: all 0.3s ease;
}

.sponsor-row img:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.08);
}

/* ── Section spacing ──────────────────────────────────── */
.section-dg {
  padding: 3.5rem 0;
}

.section-dg--bordered {
  border-top: 1px solid #eee;
}

.container-dg {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Prose DG (kept from original) ────────────────────── */
.prose-dg {
  font-size: 18px;
  line-height: 1.7;
  font-weight: 300;
  color: var(--py-body);
}

.prose-dg h2,
.prose-dg h3 {
  color: var(--py-navy);
}

.prose-dg pre {
  overflow-x: auto;
  padding: 1rem;
  border: 1px solid var(--py-border);
  border-radius: 0.5rem;
  background: var(--py-code-bg);
  color: #e2e8f0;
}

.prose-dg code:not(pre code) {
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
  background: rgba(75, 139, 190, 0.1);
  color: var(--py-blue);
}

.hljs {
  background: var(--py-code-bg) !important;
  color: #e2e8f0;
}

.hljs-keyword {
  color: var(--py-yellow) !important;
}

.hljs-string {
  color: var(--py-blue) !important;
}

.hljs-number {
  color: var(--py-light) !important;
}

.hljs-comment {
  color: #64748b !important;
  font-style: italic;
}

/* ── Small orange tag badges (like ICAL, MAP) ─────────── */
.tag-badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  background: var(--py-blue);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  vertical-align: middle;
  margin-left: 0.35rem;
}


/* ══════════════════════════════════════════════════════════
   NAVBAR — Django Girls style
   ══════════════════════════════════════════════════════════ */

.dg-navbar {
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  position: sticky;
  top: 0;
  z-index: 100;
}

.dg-navbar__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

/* ── Logo ──────────────────────────────────────────────── */
.dg-navbar__logo {
  display: flex;
  align-items: baseline;
  text-decoration: none;
  font-size: 1.7rem;
  line-height: 1;
}

.dg-navbar__logo-python {
  color: var(--py-blue);
  font-weight: 700;
  font-family: "Source Sans 3", system-ui, sans-serif;
  letter-spacing: -0.02em;
}

.dg-navbar__logo-weekend {
  color: var(--py-blue);
  font-weight: 400;
  font-family: "Covered By Your Grace", cursive;
  font-size: 1.35em;
  margin-left: 0.1rem;
}

/* ── Desktop links container ──────────────────────────── */
.dg-navbar__links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

@media (max-width: 768px) {
  .dg-navbar__links {
    display: none;
  }
}

/* ── Individual link ──────────────────────────────────── */
.dg-navbar__link {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--py-blue);
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  transition: opacity 0.2s;
  font-family: "Source Sans 3", system-ui, sans-serif;
}

.dg-navbar__link:hover {
  opacity: 0.8;
}

/* ── Dropdown arrow icon ──────────────────────────────── */
.dg-navbar__arrow {
  width: 12px;
  height: 12px;
  opacity: 0.5;
  transition: transform 0.2s;
}

/* ── Dropdown container ───────────────────────────────── */
.dg-navbar__dropdown {
  position: relative;
}

.dg-navbar__dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: all 0.2s ease;
  z-index: 200;
}

.dg-navbar__dropdown:hover .dg-navbar__dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dg-navbar__dropdown:hover .dg-navbar__arrow {
  transform: rotate(180deg);
}

.dg-navbar__dropdown-item {
  display: block;
  padding: 0.6rem 1.25rem;
  font-size: 0.9rem;
  color: #555;
  text-decoration: none;
  transition: all 0.15s;
}

.dg-navbar__dropdown-item:hover {
  background: #fafafa;
  color: var(--py-blue);
  padding-left: 1.5rem;
}

/* ── Hamburger (mobile) ───────────────────────────────── */
.dg-navbar__hamburger {
  display: none;
  background: none;
  border: none;
  color: #555;
  cursor: pointer;
  padding: 0.25rem;
}

@media (max-width: 768px) {
  .dg-navbar__hamburger {
    display: block;
  }
}

/* ── Mobile menu ──────────────────────────────────────── */
.dg-navbar__mobile {
  background: #fff;
  border-top: 1px solid #e5e5e5;
}

@media (min-width: 769px) {
  .dg-navbar__mobile {
    display: none !important;
  }
}

.dg-navbar__mobile-inner {
  padding: 0.75rem 1.5rem 1.25rem;
}

.dg-navbar__mobile-heading {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--py-blue);
  padding: 0.85rem 0 0.25rem;
  margin: 0;
}

.dg-navbar__mobile-link {
  display: block;
  padding: 0.5rem 0 0.5rem 0.75rem;
  font-size: 0.95rem;
  color: #555;
  text-decoration: none;
  transition: color 0.15s;
}

.dg-navbar__mobile-link:hover {
  color: var(--py-blue);
}

.dg-navbar__mobile-link--top {
  padding-left: 0;
  padding-top: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
}

/* ── Ensure .hidden works ─────────────────────────────── */
.hidden {
  display: none !important;
}