/* The Young People in Malaysia — site styles.
   Colours come from Site settings in the editor (set as CSS variables in the page head). */
@font-face { font-family: "Poppins"; font-weight: 300; font-style: normal; font-display: swap; src: url("/fonts/poppins-300.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/poppins-400.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-style: normal; font-display: swap; src: url("/fonts/poppins-500.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/poppins-600.woff2") format("woff2"); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-weight: 300; font-size: 16px; line-height: 1.8; color: #000; background: #fff; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-weight: 500; line-height: 1.4; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(28px, 3.4vw, 46px); } h2 { font-size: clamp(24px, 2.4vw, 32px); } h3 { font-size: clamp(20px, 2vw, 26px); } h4 { font-size: 20px; }
p { margin: 0 0 1.1em; }
[hidden] { display: none !important; }
.center { text-align: center; }
.muted { opacity: .65; }
.small { font-size: 14px; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 200; background: #fff; padding: 10px 16px; }
.hp { position: absolute; left: -9999px; }
.wrap { width: 100%; max-width: 1500px; margin-inline: auto; padding-inline: 6vw; }
.wrap.narrow { max-width: 1040px; }

/* ---------- header / nav ---------- */
.site-header { background: var(--accent); position: relative; z-index: 60; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 108px; }
.logo { display: block; width: 247px; flex: none; }
.logo img { width: 100%; height: auto; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 22px; }
.nav-item { position: relative; }
.nav-link { font: inherit; font-size: 18px; font-weight: 300; color: #000; background: none; border: 0; padding: 6px 0; cursor: pointer; text-decoration: none; display: inline-block; border-bottom: 1px solid transparent; line-height: 1.5; }
.nav-item.is-active > .nav-link, .nav-link[aria-current="page"] { border-bottom-color: #000; }
.nav-link:hover { border-bottom-color: #000; }
.nav-sub { list-style: none; margin: 0; padding: 12px 0; position: absolute; top: 100%; left: -18px; min-width: 220px; background: var(--accent); box-shadow: 0 10px 24px rgba(0, 0, 0, .18); border-radius: 0 0 6px 6px; display: none; z-index: 70; }
.nav-sub a { display: block; padding: 7px 22px; text-decoration: none; font-size: 16px; white-space: nowrap; }
.nav-sub a:hover, .nav-sub a[aria-current="page"] { text-decoration: underline; }
@media (hover: hover) { .nav-item.has-children:hover > .nav-sub { display: block; } }
.nav-item.is-open > .nav-sub, .nav-item.has-children:focus-within > .nav-sub { display: block; }
.burger { display: none; width: 48px; height: 40px; background: none; border: 0; padding: 0; cursor: pointer; position: relative; z-index: 80; }
.burger span { position: absolute; left: 6px; right: 6px; height: 2px; background: #000; transition: transform .2s, top .2s; }
.burger span:nth-child(1) { top: 14px; } .burger span:nth-child(2) { top: 24px; }
body.menu-open .burger span:nth-child(1) { top: 19px; transform: rotate(45deg); } body.menu-open .burger span:nth-child(2) { top: 19px; transform: rotate(-45deg); }

@media (max-width: 860px) {
  .header-inner { min-height: 95px; }
  .logo { width: 150px; position: relative; z-index: 80; }
  .burger { display: block; }
  .nav { display: none; position: fixed; inset: 0; background: var(--accent); padding: 120px 6vw 40px; overflow-y: auto; z-index: 70; }
  body.menu-open { overflow: hidden; }
  body.menu-open .nav { display: block; }
  .nav-list { flex-direction: column; gap: 6px; text-align: center; }
  .nav-link { font-size: clamp(26px, 8vw, 36px); padding: 8px 0; }
  .nav-sub { position: static; display: none; box-shadow: none; background: transparent; padding: 0 0 10px; min-width: 0; }
  .nav-item.is-open > .nav-sub { display: block; }
  .nav-item.has-children:focus-within > .nav-sub { display: none; }
  .nav-item.is-open:focus-within > .nav-sub { display: block; }
  .nav-sub a { font-size: 20px; padding: 6px 0; }
  .nav-folder::after { content: ""; display: inline-block; width: 10px; height: 10px; border-right: 1.5px solid #000; border-bottom: 1.5px solid #000; transform: rotate(-45deg); margin-left: 14px; vertical-align: middle; }
  .nav-item.is-open > .nav-folder::after { transform: rotate(45deg); }
}

/* ---------- buttons ---------- */
.btn { display: inline-block; min-width: 190px; padding: 18px 30px; background: var(--accent); color: var(--accent-text); border: 0; border-radius: 6px; font: inherit; font-weight: 500; font-size: 16px; text-align: center; text-decoration: none; cursor: pointer; line-height: 1.3; transition: filter .15s; }
.btn:hover, .btn:focus-visible { filter: brightness(.93); }
.btn--dark, .card-signup .btn { background: #000; color: #fff; }

/* ---------- hero ---------- */
.hero { position: relative; display: grid; place-items: center; text-align: center; overflow: hidden; background: #6b6b6b; color: #fff; min-height: 480px; }
.hero--large { min-height: min(690px, 86vh); } .hero--medium { min-height: 480px; } .hero--short { min-height: 340px; } .hero--small { min-height: 260px; }
.hero--dark { color: #000; }
.hero-bg, .hero-overlay { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-content { position: relative; padding-block: 60px; max-width: 1000px; }
.hero-eyebrow { font-size: 15px; font-weight: 400; margin: 0 0 .6em; }
.hero-title { font-size: clamp(24px, 2.5vw, 34px); font-weight: 500; line-height: 1.5; margin: 0 0 .8em; }
.hero--large .hero-title, .hero--short .hero-title { font-size: clamp(28px, 3.5vw, 48px); }
.hero-text { font-size: 18px; }
.hero-buttons { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 3.2em; }
@media (max-width: 700px) { .hero--large { min-height: 520px; } .hero--medium { min-height: 400px; } .hero-buttons .btn { min-width: 170px; } }

/* ---------- sections ---------- */
.section { padding-block: clamp(48px, 7vw, 100px); }
.section--pale { background: var(--pale); } .section--light { background: var(--light); } .section--dark { background: var(--dark); color: #fff; }
.section--intro { padding-block: clamp(50px, 6vw, 90px); }
.section--intro h2 { margin-bottom: .8em; }
.section-title { margin-bottom: 1.2em; }
.rich > :last-child { margin-bottom: 0; }
.rich a { text-underline-offset: 3px; }
.rich img { margin: 1em auto; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 70px); align-items: stretch; }
.two-col--top { align-items: start; }
.col-events { text-align: center; display: flex; flex-direction: column; align-items: center; }
.ev-mini-list { flex: 1; margin-bottom: 26px; width: 100%; }
.ev-mini { display: block; text-decoration: none; margin-bottom: 18px; line-height: 1.5; }
.ev-mini strong { display: block; font-weight: 400; font-size: 18px; }
.ev-mini span { font-size: 13px; opacity: .8; }
.card-accent { background: var(--accent); border-radius: 8px; padding: clamp(30px, 4vw, 56px); text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.card-accent h3 { font-size: clamp(24px, 2.6vw, 34px); margin-bottom: .5em; }
.card-accent p { margin-bottom: 1.4em; }
.card-signup { justify-content: flex-start; }
.card-signup .signup-form { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.card-signup .signup-form input[type=email] { width: 100%; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 6vw, 90px); align-items: center; }
.feature--right .feature-img { order: 2; }
.feature-text { text-align: center; }
.feature-text h2 { margin-bottom: .6em; }
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; } .feature--right .feature-img { order: 0; } }

.quote-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 60px); }
.quote { margin: 0; font-size: 15px; line-height: 1.75; }
.quote p { margin-bottom: .6em; } .quote cite { display: block; text-align: right; font-style: normal; font-size: 14px; }
@media (max-width: 860px) { .quote-grid { grid-template-columns: 1fr; } }

.cards-intro { margin-bottom: clamp(36px, 5vw, 64px); }
.section:has(> .wrap > .cards-intro) { padding-top: clamp(40px, 5vw, 64px); }
.cards-intro h4 { color: var(--blue); font-size: clamp(18px, 1.7vw, 22px); margin-bottom: 1.2em; }
.info-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 46px 12px; align-items: start; }
.info-card { background: var(--light); padding: 26px 22px 14px; text-align: center; }
.info-card h3 { color: var(--blue); font-size: 20px; margin-bottom: .8em; }
.info-card .rich p { margin-bottom: 1.1em; }
@media (max-width: 1000px) { .info-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .info-grid { grid-template-columns: 1fr; } }

.logos-intro { font-size: clamp(18px, 1.7vw, 22px); margin-bottom: 2.4em; }
.logo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 24px; align-items: center; justify-items: center; max-width: 1060px; margin: 0 auto 3em; }
.logo-item { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 130px; padding: 10px; }
.logo-item img { max-height: 125px; width: auto; max-width: 100%; object-fit: contain; }
@media (max-width: 800px) { .logo-grid { grid-template-columns: repeat(2, 1fr); } }

.map-wrap { display: grid; grid-template-columns: minmax(0, 2.3fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 48px); margin: 2.2em 0 2.8em; align-items: start; }
.map-frame { width: 100%; height: clamp(380px, 52vw, 680px); border: 0; background: #eee; }
.map-legend { list-style: none; margin: 40px 0 0; padding: 0; }
.map-legend li { display: flex; align-items: center; gap: 22px; margin-bottom: 8px; }
.map-legend img { width: 48px; height: 48px; object-fit: contain; flex: none; }
@media (max-width: 860px) { .map-wrap { grid-template-columns: 1fr; } .map-legend { margin-top: 0; } }

/* ---------- forms ---------- */
.signup-form input[type=email] { width: min(100%, 406px); height: 66px; padding: 0 32px; border: 0; background: #fff; color: #000; font: inherit; font-size: 16px; border-radius: 0; }
.signup-form input::placeholder, .contact-form input::placeholder { color: #9a9a9a; }
.signup-form .btn { margin-top: 30px; }
.card-signup .signup-form .btn { margin-top: 0; }
.signup-form .form-msg { margin-top: 18px; }
.contact-form { margin-top: 2em; }
.field { margin: 0 0 1.5em; padding: 0; border: 0; min-width: 0; }
.field label, .field legend { display: block; font-weight: 400; margin-bottom: 6px; padding: 0; }
.field input[type=text], .field input[type=email], .field input[type=tel], .field select, .field textarea { width: 100%; padding: 13px 16px; border: 1px solid #8a8a8a; border-radius: 0; font: inherit; background: #fff; color: #000; }
.field input:focus, .field select:focus, .field textarea:focus, .signup-form input:focus { outline: 2px solid #000; outline-offset: 2px; }
.field .check { display: flex; gap: 12px; align-items: flex-start; font-weight: 300; margin-bottom: 6px; }
.field .check input { margin-top: 8px; }
.req { color: #b3261e; }
.form-msg { font-weight: 400; }

/* ---------- events and posts ---------- */
.list-title { text-align: center; margin-bottom: 1.4em; }
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 70px clamp(28px, 4vw, 54px); }
.card { text-align: center; }
.card-img { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #ddd; margin-bottom: 26px; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card-img:hover img { transform: scale(1.03); }
.card-title { font-size: clamp(22px, 2.2vw, 30px); font-weight: 400; line-height: 1.35; margin-bottom: .7em; }
.card-title a { text-decoration: none; }
.card-excerpt { font-size: 15px; line-height: 1.8; margin-bottom: 1.4em; padding-inline: 4px; }
.card-more { font-size: 15px; font-weight: 400; text-underline-offset: 6px; }
.col-latest .card-img { margin-bottom: 16px; } .col-latest .card-title { font-size: 20px; margin-bottom: .4em; } .col-latest .card-excerpt { font-size: 14px; margin-bottom: .8em; } .col-latest .card-more { font-size: 14px; text-decoration: none; }
.col-latest h2 { text-align: center; margin-bottom: 1em; }
@media (max-width: 760px) { .card-grid { grid-template-columns: 1fr; gap: 56px; } }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 70px; gap: 16px; }
.pager-link { font-weight: 400; } .pager-count { font-size: 14px; opacity: .7; }

.ev-list { margin-block: 10px; }
.ev-item { display: grid; grid-template-columns: 150px 1fr; gap: 30px; padding: 30px 0; border-bottom: 1px solid #e6e6e6; }
.ev-date { font-size: 14px; font-weight: 500; letter-spacing: .06em; margin: 6px 0 0; line-height: 1.5; } .ev-date span { font-weight: 300; }
.ev-title { font-size: clamp(22px, 2.2vw, 30px); font-weight: 400; margin: 0 0 .3em; } .ev-title a { text-decoration: none; }
.ev-time, .ev-place { margin: 0 0 .4em; font-size: 15px; }
.ev-links a { margin-right: 14px; font-size: 14px; text-underline-offset: 3px; }
.ev-view { font-weight: 500; }
.ev-empty { text-align: center; padding: 60px 0; font-size: 18px; }
@media (max-width: 640px) { .ev-item { grid-template-columns: 1fr; gap: 6px; } }

.back { display: inline-block; margin-bottom: 36px; font-size: 15px; text-underline-offset: 4px; }
.event { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr); gap: clamp(30px, 6vw, 90px); align-items: start; }
.event-meta h1 { font-size: clamp(28px, 3vw, 40px); }
.ev-when span { opacity: .75; } .ev-where { font-size: 15px; }
.event-content { min-width: 0; }
@media (max-width: 860px) { .event { grid-template-columns: 1fr; } }
.post { max-width: 960px; }
.post-title { font-size: clamp(28px, 3.4vw, 44px); text-align: center; margin-bottom: .3em; }
.post-meta { text-align: center; font-size: 14px; opacity: .7; margin-bottom: 2.4em; }
.post-body .rich, .event-content .rich { margin-bottom: 1.6em; }
.post-figure { margin: 2em 0; } .post-figure img { width: 100%; } .post-figure figcaption { font-size: 14px; opacity: .75; margin-top: 8px; text-align: center; }
.post-quote { margin: 2em 0; padding: 0 0 0 24px; border-left: 4px solid var(--accent); } .post-quote cite { display: block; font-style: normal; font-size: 14px; }
.post-divider { border: 0; border-top: 1px solid #ccc; margin: 2.4em 0; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin: 2em 0; }
.gallery-item { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #ddd; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery-item:hover img { transform: scale(1.05); }
.item-pager { display: flex; justify-content: space-between; gap: 24px; margin-top: 80px; padding-top: 30px; border-top: 1px solid #e0e0e0; }
.item-pager-link { text-decoration: none; max-width: 46%; display: block; line-height: 1.5; }
.item-pager-link--next { text-align: right; margin-left: auto; }
.item-pager-link small { display: block; font-size: 13px; opacity: .65; } .item-pager-link span { display: block; font-size: 13px; opacity: .8; } .item-pager-link strong { font-weight: 400; font-size: 18px; }
@media (max-width: 640px) { .item-pager-link { max-width: 48%; } .item-pager-link strong { font-size: 15px; } }

.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(0, 0, 0, .93); display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 94vw; max-height: 86vh; object-fit: contain; }
.lightbox button { position: absolute; background: none; border: 0; color: #fff; font-size: 42px; line-height: 1; cursor: pointer; padding: 14px 20px; }
.lightbox .lb-close { top: 6px; right: 8px; } .lightbox .lb-prev { left: 4px; top: 50%; transform: translateY(-50%); } .lightbox .lb-next { right: 4px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-count { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: #ddd; font-size: 14px; }

/* ---------- footer ---------- */
.site-footer { background: var(--dark); color: #fff; padding-block: clamp(50px, 7vw, 100px); }
.footer-inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 70px); align-items: end; }
.footer-brand { align-self: end; } .footer-logo { width: 200px; margin-bottom: 8px; }
.footer-brand p { margin: 0; font-size: 16px; }
.footer-signup h2 { font-size: clamp(26px, 2.6vw, 34px); margin-bottom: .5em; }
.footer-signup p { margin-bottom: 1.8em; }
@media (max-width: 860px) { .footer-inner { grid-template-columns: 1fr; } .footer-brand { order: 2; } }

@media print { .site-header, .site-footer, .burger { display: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
