/* ===========================
   Base / Theme (unchanged top portion)
   =========================== */
:root {
  --leaf: #16A34A;
  --leaf-700: #0f6f2e;
  --brown: #2c7d36;
  --bg: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --card: #ffffff;
  --shadow: 0 4px 14px rgba(0,0,0,.1), 0 2px 6px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.06);
  --radius: 16px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

/* --- visual background layers unchanged --- */
.bg-sketch { position: fixed; inset: 0; pointer-events: none; opacity: .16; background-image: radial-gradient(120px 80px at 10% 20%, rgba(0,0,0,.04) 0, transparent 70%), radial-gradient(160px 100px at 80% 10%, rgba(0,0,0,.04) 0, transparent 70%), url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400' viewBox='0 0 400 400'%3E%3Cg fill='none' stroke='%23cbd5e1' stroke-opacity='0.35'%3E%3Ccircle cx='60' cy='60' r='24'/%3E%3Ccircle cx='300' cy='120' r='18'/%3E%3Cpath d='M20 200 Q 100 120 180 200 T 340 200'/%3E%3C/g%3E%3C/svg%3E"); background-repeat: repeat; background-size: auto, auto, 400px 400px; z-index: 0; }

.site-gradient { position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: 0.18; mix-blend-mode: screen; filter: blur(36px) saturate(1.05); background: linear-gradient(120deg, rgba(22,163,74,0.07) 0%, rgba(99,102,241,0.05) 30%, rgba(14,165,233,0.04) 60%, rgba(245,158,11,0.03) 100%); background-image: radial-gradient(600px 400px at 10% 20%, rgba(139,92,246,0.06), transparent 20%), radial-gradient(500px 300px at 80% 10%, rgba(34,197,94,0.05), transparent 20%), linear-gradient(120deg, rgba(22,163,74,0.06) 0%, rgba(99,102,241,0.04) 30%, rgba(14,165,233,0.03) 60%, rgba(245,158,11,0.02) 100%); background-size: 160% 160%, 140% 140%, 300% 300%; animation: hueShift 18s ease-in-out infinite; }

.container { width: min(1180px, 92%); margin-inline: auto; }

.section { padding: 64px 0; position: relative; z-index: 1; }
.short-section { padding: 28px 0; }
.section-alt { padding-block: 72px; }

.section-header { text-align: center; margin-bottom: 24px; }

.h1, .h2, .h3, .h4, .h5 { font-family: 'Poppins', 'Inter', system-ui, sans-serif; line-height: 1.2; margin: 0 0 12px; }
.h1, .hero-title { font-size: clamp(2rem, 2.8vw + 1rem, 3.2rem); font-weight: 700; color: var(--leaf-700); }
.h2 { font-size: clamp(1.6rem, 1.4vw + 1rem, 2.2rem); font-weight: 700; color: var(--leaf-700); }
.h3 { font-size: 1.5rem; font-weight: 700; color: #fff; }
.h4 { font-size: 1.125rem; font-weight: 600; color: var(--ink); }
.h5 { font-size: 1rem; font-weight: 700; color: var(--ink); }

.muted { color: var(--muted); }
.muted-l { color: #4b5563; }

.stack { display: grid; }
.gap-16 { gap: 16px; }

.site-header {
  position: sticky;
  top: 0;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(8px);
  z-index: 10;
  width: 100%;
  left: 0;
  right: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
  padding: 10px 0;
}

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

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-name { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1.5rem; color: var(--leaf-700); text-decoration: none; }
.brand-logo { width: 42px; height: 42px; object-fit: contain; object-position: center; border-radius: 0; box-shadow: none; background: transparent; display: block; }
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-tagline {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: -2px; /* fine-tune spacing */
  font-weight: 500;
  letter-spacing: .3px;
}


.nav-actions { display: flex; gap: 5px; align-items: center; }
.capsule { --ring: rgba(46,125,50,.2); display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 16px; border-radius: 999px; background: #f1f5f9; color: #0f172a; text-decoration: none; font-weight: 600; font-size: .95rem; border: 1px solid #e2e8f0; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.capsule:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); background: #e8f5e9; }
.capsule:active { transform: translateY(0); }

.hero { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 32px; position: relative; z-index: 2; overflow: visible; }
.hero::before { content: ""; position: fixed; left: 0; right: 0; top: 0; bottom: 0; z-index: -1; pointer-events: none; background: linear-gradient(120deg, rgba(22,163,74,0.08) 0%, rgba(34,197,94,0.06) 40%, rgba(14,165,233,0.04) 100%); background-size: 300% 300%; filter: blur(30px) saturate(1.05); opacity: 0.9; animation: hueShift 12s ease-in-out infinite; mix-blend-mode: screen; }
@keyframes hueShift { 0% { background-position: 0% 50% } 50% { background-position: 100% 50% } 100% { background-position: 0% 50% } }

.hero .hero-wave { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -1; pointer-events: none; opacity: 0.98; transform: translateZ(0); }
.hero-left, .hero-right { position: relative; z-index: 2; }

.hero-copy { max-width: 52ch; color: var(--muted); }
.hero-cta { display: flex; gap: 12px; margin-top: 20px; }

.btn { display: inline-block; padding: 12px 18px; border-radius: 999px; text-decoration: none; font-weight: 700; border: 1px solid transparent; transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease; box-shadow: var(--shadow); will-change: transform; cursor: pointer; font-family: inherit; font-size: inherit; }
.btn.primary { background: var(--leaf); color: #fff; }
.btn.primary:hover { background: var(--leaf-700); transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn.ghost { background: #fff; color: var(--leaf-700); border-color: rgba(27,94,32,.2); }
.btn.ghost:hover { background: #e8f5e9; transform: translateY(-1px); box-shadow: var(--shadow-lg); }

.btn.white-capsule { background: #fff; color: var(--leaf); border: 1px solid rgba(16,97,39,0.06); box-shadow: var(--shadow); }
.btn.white-capsule:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }

/* Original two-col usage retained elsewhere */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
}
.two-col.reverse { grid-template-columns: 1fr 1fr; }
.left-col .card, .right-col .card { height: 100%; }

/* --- Cards base (unchanged) --- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 18px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transform: translateZ(0);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card-tight { padding: 14px; }

.card.glow::before {
  content: "";
  position: absolute;
  inset: -60%;
  background: radial-gradient(180px 180px at var(--x,50%) var(--y,50%), rgba(22,163,74,0.12), transparent 60%);
  opacity: 0;
  transition: opacity .25s ease;
  z-index: -1;
}
.card.glow:hover::before { opacity: 1; }

.card-image { padding: 8px; background: #fff; overflow: hidden; }
.card-image img {
  width: 100%;
  height: 200px;
  display: block;
  object-fit: cover;
  object-position: center;
  border-radius: calc(var(--radius) - 4px);
}

/* ---------------------------------------------------------
   NEW: Two-column single-rectangle layout for QR + content
   --------------------------------------------------------- */
.two-column-card {
  display: flex;
  gap: 20px;
  align-items: stretch;
  margin: 12px 0;
}

/* Left card: square 1:1 for QR */
.two-column-card .left-card {
  flex: 0 0 46%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

/* Use aspect-ratio to force a true square on modern browsers */
.two-column-card .left-card::before{
  content: "";
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  pointer-events: none;
  visibility: hidden;
}

/* QR image should fit inside the square without distortion */
.two-column-card .qr-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  width: auto;
  height: auto;
  border-radius: calc(var(--radius) - 6px);
}

/* Right card: holds the original content */
.two-column-card .right-card {
  flex: 1 1 54%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 18px;
}

/* Ensure existing .card-image rules don't force unwanted behavior on the new layout */
.two-column-card .card-image { padding: 0; background: transparent; box-shadow: none; }
.two-column-card .card-image img { height: auto; width: 100%; object-fit: contain; object-position: center; border-radius: 8px; }

/* Small refinements for titles/body in right-card (keeps theme) */
.two-column-card .right-card .h3 { color: var(--leaf-700); margin-bottom: 6px; }
.two-column-card .right-card .muted-l { color: #4b5563; }

/* Media: stack on smaller screens */
@media (max-width: 1024px) {
  .two-column-card {
    flex-direction: column;
  }
  .two-column-card .left-card,
  .two-column-card .right-card {
    flex-basis: auto;
    width: 100%;
  }
  /* keep square QR when stacked */
  .two-column-card .left-card::before { visibility: visible; }
}

/* Keep older contribute/join override removed (we now rely on .two-column-card rules) */

/* Brown left cards */
.card.brown {
  background: var(--brown);
  color: #fff;
  border: 1px solid rgba(0,0,0,.06);
}
.card.brown .h4,
.card.brown p,
.card.brown .muted-l,
.card.brown .h3 {
  color: #fff;
}

/* Grid lines for Problems */
.grid-line {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

/* Our Work */
#our-work { background: linear-gradient(180deg, rgba(22,163,74,0.03), rgba(22,163,74,0.02)); border-radius: 8px; padding: 28px; }
#our-work .section-header .h2 { color: var(--leaf); }
#our-work .muted { color: rgba(0,0,0,0.6); }

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 12px;
}
.work-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  min-height: 220px;
}
.work-card .work-img {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
}
.work-card .work-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.work-title {
  padding: 12px 14px;
  font-weight: 700;
  font-size: 1rem;
  background: #fff;
  color: var(--ink);
}

/* Achievements */
#achievements .card { background: var(--leaf); color: #fff; border: none; }
#achievements .card .h4, #achievements .card .tick-list { color: #fff; }
#achievements .tick-list li::before { background: radial-gradient(closest-side, #fff, rgba(255,255,255,0.9)); box-shadow: none; }

.cards-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.presented-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}
.presented-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  min-height: 320px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.presented-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.presented-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 0;
  background: #f8fafc;
}
.presented-card .caption {
  padding: 16px 14px;
  background: linear-gradient(to bottom, #fff, #fafafa);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  line-height: 1.5;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Tick list */
.tick-list { padding-left: 0; list-style: none; margin: 0; }
.tick-list li { position: relative; padding-left: 28px; margin: 10px 0; }
.tick-list li::before { content: ""; position: absolute; left: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(closest-side, var(--leaf), var(--leaf-700)); box-shadow: 0 0 0 3px rgba(46,125,50,.15); }

/* Sub tick list (nested) */
.sub-tick-list {
  padding-left: 0;
  list-style: none;
  margin: 8px 0 0 0;
}
.sub-tick-list li {
  position: relative;
  padding-left: 24px;
  margin: 6px 0;
  font-size: 0.95em;
}
.sub-tick-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--leaf);
  opacity: 0.7;
}

/* Key-Value rows */
.kv { display: grid; gap: 8px; margin: 16px 0 20px; }
.kv-row { display: grid; grid-template-columns: 120px 1fr; background: #f8fafc; padding: 10px 12px; border-radius: 12px; border: 1px solid #e2e8f0; }

/* Contact grid */
.contact-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; align-items: center; }

/* Contact card layout and icons */
.contact-card { display: grid; grid-template-columns: 48px 1fr; align-items: center; gap: 12px; padding: 8px 10px; }
.contact-card, .contact-card:link, .contact-card:visited, .contact-card:hover, .contact-card:active { text-decoration: none; }
.contact-card .contact-label, .contact-card .muted-l { text-decoration: none; }
.contact-card .icon { width: 48px; height: 48px; border-radius: 8px; background: #fff; box-shadow: var(--shadow); display: inline-grid; place-items: center; overflow: hidden; }
.contact-card .icon img { width: 28px; height: 28px; object-fit: contain; object-position: center; display: block; }

.contact-label { color: var(--leaf); font-weight: 700; font-size: 0.98rem; margin-bottom: 2px; }
.contact-card .muted-l { margin: 0; color: #4b5563; font-size: 0.9rem; }

/* Video wrap */
.video-wrap { border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); position: relative; width: 100%; height: 100%; max-height: 360px; background: #000; }
.video-wrap video { width: 100%; height: 100%; display: block; object-fit: contain; object-position: center; }

.contribute-actions { display: flex; gap: 12px; margin-top: 10px; }
.join-actions { margin-bottom: 12px; }

.site-footer { padding: 40px 0 64px; text-align: center; color: var(--muted); font-size: .95rem; }
.site-footer p { margin: 8px 0; }
.developer-credit { font-size: 0.9rem; color: #6b7280; font-weight: 500; margin-top: 12px; }
.brand-highlight { color: var(--leaf-700); font-weight: 700; letter-spacing: 0.3px; transition: color 0.2s ease; }
.contact-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); transition: transform .18s ease, box-shadow .18s ease; }

/* Responsive - Tablet */
@media (max-width: 1024px) {
  .container { width: min(1180px, 95%); }

  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 32px 0;
  }

  .hero-cta {
    flex-wrap: wrap;
  }

  .two-col, .two-col.reverse { grid-template-columns: 1fr; }
  .mission-two-col { grid-template-columns: 1fr; gap: 20px; }

  .cards-grid-4, .grid-line { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .presented-grid { grid-template-columns: repeat(2, 1fr); }

  .section { padding: 48px 0; }
  .section-alt { padding-block: 56px; }

  .video-wrap { max-height: 300px; }
}

/* Responsive - Mobile */
@media (max-width: 640px) {
  .container { width: 92%; }

  /* Header */
  .site-header {
    padding: 12px 0;
  }

  .header-content {
    flex-wrap: wrap;
    gap: 12px;
  }

  .brand {
    flex: 1;
    padding: 0 8px;
  }

  .brand-name { font-size: 1.5rem; }
  .brand-logo { width: 36px; height: 36px; }

  .brand-tagline {
    font-size: 0.72rem;
  }


  .nav-actions {
    display: flex;
    width: calc(100% + 16px);
    margin-left: -8px;
    margin-right: -8px;
    justify-content: space-evenly;
    gap: 4px;
    flex-wrap: nowrap;
    padding: 0 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .nav-actions::-webkit-scrollbar {
    display: none;
  }

  .capsule {
    font-size: 0.8rem;
    padding: 0 12px;
    height: 34px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Hero Section */
  .hero {
    padding: 24px 0;
    gap: 20px;
  }

  .hero-title {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    margin-bottom: 16px;
  }

  .hero-copy {
    font-size: 0.95rem;
    margin-bottom: 16px;
  }

  .hero-cta {
    flex-direction: column;
    gap: 10px;
  }

  .hero-cta .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .video-wrap {
    max-height: 250px;
    border-radius: 16px;
  }

  /* Typography */
  .h2 { font-size: clamp(1.4rem, 4vw, 1.8rem); }
  .h3 { font-size: 1.25rem; }
  .h4 { font-size: 1rem; }
  .h5 { font-size: 0.95rem; }

  .section { padding: 32px 0; }
  .section-alt { padding-block: 40px; }
  .short-section { padding: 20px 0; }
  .section-header { margin-bottom: 20px; }

  /* Grids */
  .cards-grid-4, .grid-line, .contact-grid { grid-template-columns: 1fr; gap: 12px; }
  .work-grid { grid-template-columns: 1fr; gap: 14px; }
  .presented-grid { grid-template-columns: 1fr; gap: 16px; }

  /* Cards */
  .card {
    padding: 16px;
  }

  .card-tight { padding: 12px; }

  .card-image img {
    height: 180px;
  }

  /* Mission Section - Mobile Layout */
  .mission-two-col {
    display: block !important;
  }

  .mission-two-col .left-col {
    width: 100%;
    margin-bottom: 12px;
  }

  .mission-two-col .left-col .stack {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }

  .mission-two-col .left-col .card.brown {
    padding: 12px;
    margin: 0;
  }

  .mission-two-col .left-col .card.brown .h3 {
    font-size: 1rem;
    margin-bottom: 6px;
  }

  .mission-two-col .left-col .card.brown p {
    font-size: 0.8rem;
    line-height: 1.4;
    margin: 0;
  }

  .mission-two-col .right-col {
    width: 100%;
  }

  .mission-image-card {
    height: auto !important;
    min-height: 200px;
    padding: 0 !important;
  }

  .mission-image-card img {
    width: 100%;
    height: 200px;
    object-fit: cover !important;
    object-position: center;
    border-radius: calc(var(--radius) - 6px);
  }

  /* Work Cards */
  .work-card {
    min-height: 200px;
  }

  .work-card .work-img {
    height: 180px;
  }

  .work-title {
    font-size: 0.95rem;
    padding: 10px 12px;
  }

  /* Presented Cards */
  .presented-card {
    min-height: 280px;
  }

  .presented-card img {
    height: 200px;
  }

  .presented-card .caption {
    padding: 12px;
    font-size: 0.9rem;
  }

  /* Buttons */
  .btn {
    padding: 10px 16px;
    font-size: 0.95rem;
  }

  /* Key-Value */
  .kv-row {
    grid-template-columns: 100px 1fr;
    padding: 8px 10px;
    font-size: 0.9rem;
  }

  /* Contact Cards */
  .contact-card {
    padding: 10px 12px;
    gap: 10px;
  }

  .contact-card .icon {
    width: 40px;
    height: 40px;
  }

  .contact-card .icon img {
    width: 24px;
    height: 24px;
  }

  .contact-label {
    font-size: 0.9rem;
  }

  /* Contribute Actions */
  .contribute-actions {
    flex-direction: column;
    gap: 10px;
  }

  .contribute-actions .btn {
    width: 100%;
    text-align: center;
  }

  /* Join Actions */
  .join-actions .btn {
    width: 100%;
    text-align: center;
  }

  /* Single Rect (QR Sections) */
  .single-rect .rect-right .h3 {
    font-size: 1.25rem;
  }

  .single-rect .qr-wrap {
    max-width: 250px;
  }

  /* Tick List */
  .tick-list {
    font-size: 0.9rem;
  }

  .tick-list li {
    padding-left: 24px;
    margin: 8px 0;
  }

  .tick-list li::before {
    width: 14px;
    height: 14px;
    top: 4px;
  }

  /* Footer */
  .site-footer {
    padding: 32px 0 48px;
    font-size: 0.9rem;
  }

  .developer-credit {
    font-size: 0.85rem;
  }

  /* Our Work Section */
  #our-work {
    padding: 20px 16px;
  }

  /* Achievements */
  #achievements .card {
    padding: 16px;
  }
}

/* --- Mission specific layout: make image span the combined height of left vision+mission cards --- */
.mission-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: stretch; /* ensure right image matches left combined height */
}

/* make the left stack use natural flow */
.mission-two-col .left-col .stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ensure mission image card stretches to fill height */
.mission-two-col .right-col .mission-image-card {
  height: 100%;
  padding: 0;
  display: flex;
  align-items: stretch;
}

/* mission image fills the card while preserving rounded corners */
.mission-image-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  border-radius: calc(var(--radius) - 6px);
}

/* --- Single rectangular card for Join / Contribute (one .card with left QR and right content) --- */
.single-rect {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius);
}

/* Left: container that holds portrait QR */
.single-rect .rect-left {
  flex: 0 0 35%;
  max-width: 320px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

/* qr-wrap for portrait images */
.single-rect .qr-wrap {
  width: 100%;
  position: relative;
  max-width: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.single-rect .qr-wrap img {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  object-position: center;
  display: block;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.single-rect .qr-wrap img:hover {
  transform: scale(1.03);
  opacity: 0.95;
}

/* Right: content area */
.single-rect .rect-right {
  flex: 1 1 auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

/* keep buttons etc aligned to start */
.single-rect .btn { margin: 0; }

/* Responsive: stack on small screens */
@media (max-width: 800px) {
  .single-rect {
    flex-direction: column;
    align-items: center;
  }
  .single-rect .rect-left,
  .single-rect .rect-right {
    width: 100%;
    max-width: none;
  }
  .single-rect .rect-left {
    padding: 24px;
    flex: 0 0 auto;
  }
  .single-rect .qr-wrap {
    max-width: 300px;
  }
  .single-rect .rect-right { padding: 20px; }
}

/* ===========================
   Image Modal / Lightbox
   =========================== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.active {
  display: flex;
  opacity: 1;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  cursor: pointer;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  position: relative;
  max-width: 85vw;
  max-height: 85vh;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding-top: 60px;
  animation: zoomIn 0.3s ease;
}

.modal-content img {
  max-width: 100%;
  max-height: calc(85vh - 60px);
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  display: block;
}

.modal-close {
  position: absolute;
  top: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 2rem;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: transform 0.2s ease, background 0.2s ease;
  z-index: 10001;
}

.modal-close:hover {
  background: #fff;
  transform: scale(1.1) rotate(90deg);
}

.modal-close:active {
  transform: scale(0.95) rotate(90deg);
}

/* Add cursor pointer to clickable images */
.card-image img,
.work-card .work-img img,
.presented-card img,
.mission-image-card img {
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.card-image img:hover,
.work-card .work-img img:hover,
.presented-card img:hover,
.mission-image-card img:hover {
  transform: scale(1.02);
  opacity: 0.9;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes zoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Responsive modal adjustments */
@media (max-width: 640px) {
  .modal-content {
    max-width: 95vw;
    max-height: 90vh;
    padding-top: 56px;
  }

  .modal-close {
    top: 0;
    right: 0;
    width: 44px;
    height: 44px;
    font-size: 1.75rem;
  }

  .modal-content img {
    max-height: calc(90vh - 56px);
    border-radius: 12px;
  }
}

