/* =========================================================
   RT17 PUBLIC — REFINEMENT V5
   Focus: home gallery readability, compact footer/CTA,
   smooth motion, responsive 2-column gallery on phones.
   Loaded after V4 polish.
   ========================================================= */
:root {
  --rt5-navy:#0a1b38;
  --rt5-blue:#1e63c8;
  --rt5-blue-2:#2f8fdb;
  --rt5-cyan:#4db8e9;
  --rt5-ink:#102342;
  --rt5-muted:#65758e;
  --rt5-surface:#ffffff;
  --rt5-soft:#f4f8fd;
  --rt5-line:#e2eaf4;
  --rt5-shadow:0 18px 48px rgba(18,55,105,.11);
  --rt5-ease:cubic-bezier(.2,.72,.25,1);
}

/* Make motion polished, not jumpy. */
.feature-card,.partnership-card,.stat-card-new,.pengumuman-card,
.home-gallery-card,.btn-view-all,.btn-cta,.btn-read-more,.btn-login,
.profile-value-card,.profile-info-card,.edukasi-card,.pengurus-card,
.pengurus-ketua-card,.kontak-card {
  transition:transform .42s var(--rt5-ease),box-shadow .42s var(--rt5-ease),
             border-color .42s var(--rt5-ease),background-color .42s var(--rt5-ease),
             color .32s ease !important;
}
.feature-card:hover,.partnership-card:hover,.stat-card-new:hover,
.pengumuman-card:hover,.home-gallery-card:hover,.profile-value-card:hover,
.profile-info-card:hover,.edukasi-card:hover,.pengurus-card:hover,
.pengurus-ketua-card:hover,.kontak-card:hover {
  transform:translateY(-4px) !important;
}

/* ---------- HOME GALLERY ---------- */
.home-gallery-section {
  position:relative !important;
  overflow:hidden !important;
  padding:84px 0 78px !important;
  background:
    radial-gradient(circle at 10% 10%,rgba(52,135,222,.08),transparent 28%),
    radial-gradient(circle at 92% 86%,rgba(65,180,226,.07),transparent 30%),
    linear-gradient(180deg,#f8fbff 0%,#fff 100%) !important;
}
.home-gallery-section::before { display:none !important; }
.home-gallery-section .section-header {
  display:flex !important;
  align-items:flex-end !important;
  justify-content:space-between !important;
  gap:28px !important;
  margin:0 0 30px !important;
  text-align:left !important;
}
.home-gallery-heading { max-width:720px; }
.home-gallery-kicker {
  display:inline-flex;align-items:center;gap:8px;margin-bottom:10px;
  color:#2367ba;font-weight:850;font-size:.72rem;letter-spacing:.12em;text-transform:uppercase;
}
.home-gallery-section .section-title {
  margin:0 !important;color:var(--rt5-ink) !important;-webkit-text-fill-color:var(--rt5-ink) !important;
  font-size:clamp(2rem,4vw,3rem) !important;letter-spacing:-.045em !important;line-height:1.08 !important;
  text-align:left !important;
}
.home-gallery-section .section-title::after { display:none !important; }
.home-gallery-section .section-subtitle {
  margin:12px 0 0 !important;color:var(--rt5-muted) !important;text-align:left !important;
  font-size:1rem !important;line-height:1.72;max-width:680px;
}
.home-gallery-controls { display:flex;gap:10px;flex:0 0 auto; }
.home-gallery-nav {
  width:44px;height:44px;border-radius:14px;border:1px solid #d8e5f4;background:#fff;color:#1f62be;
  display:grid;place-items:center;box-shadow:0 8px 22px rgba(20,65,125,.09);cursor:pointer;
  transition:transform .3s var(--rt5-ease),box-shadow .3s var(--rt5-ease),background .3s ease,color .3s ease;
}
.home-gallery-nav:hover { transform:translateY(-2px);background:#1f64c7;color:#fff;box-shadow:0 12px 28px rgba(31,100,199,.22); }
.home-gallery-nav:disabled { opacity:.38;cursor:not-allowed;transform:none;box-shadow:none; }
.home-gallery-viewport { position:relative; }
.home-gallery-track {
  display:grid !important;grid-auto-flow:column !important;grid-auto-columns:minmax(270px,31%) !important;
  grid-template-columns:none !important;gap:18px !important;overflow-x:auto !important;overflow-y:hidden !important;
  padding:4px 4px 18px !important;scroll-snap-type:x mandatory;scroll-behavior:smooth;
  scrollbar-width:thin;scrollbar-color:#b8cbe3 transparent;
  -webkit-overflow-scrolling:touch;
}
.home-gallery-track::-webkit-scrollbar { height:7px; }
.home-gallery-track::-webkit-scrollbar-thumb { background:#c1d2e6;border-radius:999px; }
.home-gallery-track .galeri-grid-item { scroll-snap-align:start;min-width:0; }
.home-gallery-card {
  display:flex;flex-direction:column;height:100%;min-height:350px;border-radius:20px;overflow:hidden;
  background:#fff;border:1px solid var(--rt5-line);box-shadow:0 12px 34px rgba(16,51,99,.09);
  color:inherit;text-decoration:none;position:relative;
}
.home-gallery-card:hover { color:inherit;box-shadow:0 20px 46px rgba(16,57,115,.15);border-color:#cadcf2; }
.home-gallery-media { position:relative;aspect-ratio:4/3;overflow:hidden;background:linear-gradient(145deg,#eaf4ff,#dcecff); }
.home-gallery-media img { width:100%;height:100%;object-fit:cover;display:block;transition:transform .55s var(--rt5-ease); }
.home-gallery-card:hover .home-gallery-media img { transform:scale(1.035); }
.home-gallery-media::after {
  content:"";position:absolute;inset:auto 0 0;height:38%;background:linear-gradient(180deg,transparent,rgba(7,28,62,.14));pointer-events:none;
}
.home-gallery-date {
  position:absolute;left:12px;bottom:12px;z-index:2;display:inline-flex;align-items:center;gap:6px;
  padding:7px 9px;border-radius:10px;background:rgba(8,29,63,.78);color:#fff;font-size:.7rem;font-weight:750;
  backdrop-filter:blur(7px);
}
.home-gallery-body { padding:17px 17px 18px;display:flex;flex-direction:column;gap:7px;flex:1; }
.home-gallery-body h3 { margin:0;color:var(--rt5-ink);font-size:1.04rem;font-weight:850;line-height:1.35;letter-spacing:-.02em; }
.home-gallery-body p { margin:0;color:var(--rt5-muted);font-size:.86rem;line-height:1.58;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden; }
.home-gallery-open { margin-top:auto;padding-top:7px;color:#2368c2;font-size:.75rem;font-weight:800;display:flex;align-items:center;gap:7px; }
.home-gallery-open i { transition:transform .32s var(--rt5-ease); }
.home-gallery-card:hover .home-gallery-open i { transform:translateX(3px); }
.home-gallery-more { text-align:center;margin-top:27px !important; }
.home-gallery-more .btn-view-galeri { padding:12px 24px !important;border-radius:14px !important;box-shadow:0 10px 25px rgba(37,99,235,.18) !important; }

/* ---------- Compact CTA + footer: removes the giant empty dark area ---------- */
.cta-section {
  background:#fff !important;color:var(--rt5-ink) !important;padding:34px 0 62px !important;overflow:visible !important;
}
.cta-section::before { display:none !important; }
.cta-section .container-lg {
  padding-top:34px !important;padding-bottom:34px !important;border-radius:24px;
  background:linear-gradient(135deg,#0d2857 0%,#174d9a 58%,#278fca 100%);
  box-shadow:0 18px 48px rgba(15,55,110,.19);position:relative;overflow:hidden;
}
.cta-section .container-lg::after {
  content:"";position:absolute;width:250px;height:250px;border-radius:50%;right:-90px;top:-125px;
  background:radial-gradient(circle,rgba(255,255,255,.18),transparent 68%);pointer-events:none;
}
.cta-title { color:#fff !important;font-size:clamp(1.7rem,3.5vw,2.35rem) !important;margin-bottom:10px !important; }
.cta-subtitle { color:rgba(255,255,255,.76) !important;margin:0 auto 24px !important;max-width:700px; }
.cta-buttons { gap:12px !important; }
.cta-buttons a { min-height:44px;display:inline-flex;align-items:center;justify-content:center; }

footer {
  padding:48px 0 22px !important;background:linear-gradient(135deg,#07142f,#102b63) !important;
  min-height:0 !important;
}
footer .row > div { opacity:1 !important;animation:none !important; }
footer h5 i, footer .copyright i { animation:none !important; }
footer .divider { margin:24px 0 !important; }
footer .copyright { padding-top:18px !important; }
footer a { transition:color .3s ease,transform .3s var(--rt5-ease) !important; }
footer a:hover { margin-left:0 !important;transform:translateX(2px); }
footer .social-links a:hover { transform:translateY(-3px) !important; }

/* ---------- Generic mobile refinements ---------- */
@media (max-width:991.98px) {
  .home-gallery-track { grid-auto-columns:minmax(250px,44%) !important; }
}

@media (max-width:767.98px) {
  .home-gallery-section { padding:54px 0 50px !important; }
  .home-gallery-section .section-header { align-items:flex-start !important;margin-bottom:22px !important; }
  .home-gallery-controls { display:none !important; }
  .home-gallery-section .section-title { font-size:1.82rem !important; }
  .home-gallery-section .section-subtitle { font-size:.9rem !important;line-height:1.62 !important; }
  .home-gallery-track {
    display:grid !important;grid-template-columns:repeat(2,minmax(0,1fr)) !important;grid-auto-flow:row !important;
    grid-auto-columns:auto !important;gap:12px !important;overflow:visible !important;padding:0 !important;scroll-snap-type:none !important;
  }
  .home-gallery-card { min-height:0;border-radius:16px;box-shadow:0 8px 22px rgba(16,51,99,.08); }
  .home-gallery-media { aspect-ratio:1/1; }
  .home-gallery-date { left:8px;bottom:8px;padding:5px 7px;border-radius:8px;font-size:.59rem; }
  .home-gallery-body { padding:11px 11px 12px;gap:5px; }
  .home-gallery-body h3 { font-size:.84rem;line-height:1.3; }
  .home-gallery-body p { font-size:.72rem;line-height:1.45;-webkit-line-clamp:2; }
  .home-gallery-open { font-size:.65rem;padding-top:4px; }
  .home-gallery-more { margin-top:22px !important; }
  .home-gallery-more .btn-view-galeri { width:100%;max-width:310px;justify-content:center; }
  .cta-section { padding:18px 13px 38px !important; }
  .cta-section .container-lg { border-radius:21px;padding:28px 18px !important; }
  .cta-title { font-size:1.55rem !important; }
  .cta-subtitle { font-size:.9rem !important;line-height:1.6; }
  .cta-buttons { display:grid !important;grid-template-columns:1fr 1fr !important;gap:10px !important; }
  .cta-buttons a { width:100% !important;padding:10px 12px !important;font-size:.8rem !important; }
  footer { padding:38px 0 18px !important; }
  footer .row > div { margin-bottom:22px !important; }
}

@media (max-width:390px) {
  .home-gallery-track { gap:9px !important; }
  .home-gallery-body { padding:9px 9px 10px; }
  .home-gallery-body h3 { font-size:.78rem; }
  .home-gallery-body p { font-size:.68rem; }
}

@media (hover:none),(pointer:coarse) {
  .home-gallery-card:hover,.feature-card:hover,.partnership-card:hover,.stat-card-new:hover,
  .pengumuman-card:hover { transform:none !important; }
  .home-gallery-card:hover .home-gallery-media img { transform:none !important; }
}

/* Specificity guard against legacy gallery rules that were global. */
section.galeri-section.home-gallery-section {
  max-width:none !important;width:100% !important;margin:0 !important;
}
section.home-gallery-section .section-header h2.section-title {
  color:var(--rt5-ink) !important;-webkit-text-fill-color:var(--rt5-ink) !important;
}
section.home-gallery-section .section-header p.section-subtitle {
  color:var(--rt5-muted) !important;
}
