/* ============================================================
   RS Company Profile - Custom Styles
   Fresh, modern, relaxed with smooth animations
   ============================================================ */

:root {
  --primary: #0a7d8c;
  --secondary: #f4a261;
  --primary-dark: #075f6b;
  --primary-light: #e6f6f8;
  --secondary-light: #fdf1e6;
  --dark: #0f2b33;
  --ink: #0f2b33;
  --muted: #5f7d86;
  --light: #f5f9fa;
  --surface: #ffffff;
  --surface-soft: #f5f9fa;
  --border: #eef3f5;
  --border-soft: #f1f5f6;
  --body-text: #33475a;
  --navbar-bg: rgba(255, 255, 255, 0.92);
  --navbar-bg-solid: rgba(255, 255, 255, 0.98);
  --grad: linear-gradient(135deg, var(--primary), var(--secondary));
  --grad-soft: linear-gradient(135deg, #e6f6f8 0%, #fdf1e6 100%);
  --shadow-sm: 0 6px 20px rgba(10, 125, 140, 0.08);
  --shadow-md: 0 14px 40px rgba(10, 125, 140, 0.14);
  --shadow-lg: 0 24px 60px rgba(10, 125, 140, 0.20);
  --radius: 1.25rem;
  --radius-lg: 2rem;
  --font: 'Plus Jakarta Sans', 'Poppins', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

[data-theme="dark"] {
  --dark: #0f2b33;
  --ink: #e8f0f2;
  --muted: #8aa4ad;
  --light: #101f26;
  --surface: #152832;
  --surface-soft: #0f1e25;
  --border: #203743;
  --border-soft: #1b303b;
  --body-text: #c7d6dc;
  --primary-light: #12323c;
  --secondary-light: #33281e;
  --navbar-bg: rgba(13, 27, 34, 0.92);
  --navbar-bg-solid: rgba(13, 27, 34, 0.98);
  --grad-soft: linear-gradient(135deg, #12323c 0%, #33281e 100%);
  --shadow-sm: 0 6px 20px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 14px 40px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
}

html[data-theme="dark"] {
  --navbar-bg: rgba(13, 27, 34, 0.92);
  --navbar-bg-solid: rgba(13, 27, 34, 0.98);
  --topbar-bg: #0d1b22;
  --topbar-text: #cfe9ee;
  --topbar-link: #cfe9ee;
  --topbar-hover: #ffffff;
  --topbar-btn-border: rgba(255, 255, 255, 0.35);
  --topbar-btn-active: #ffffff;
  --topbar-divider: rgba(255, 255, 255, 0.25);
}

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: var(--font);
  color: var(--body-text);
  background: var(--surface);
  overflow-x: hidden;
  max-width: 100vw;
}

/* Prevent images from overflowing their containers, but don't override explicit heights */
img {
  max-width: 100%;
}
/* Ensure brand logo keeps its fixed size */
.brand-logo {
  width: 46px !important;
  height: 46px !important;
  flex-shrink: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
}

a { text-decoration: none; }

/* ---------- Buttons ---------- */
.btn-grad {
  background: var(--grad);
  color: #fff !important;
  border: 0;
  border-radius: 50rem;
  padding: 0.85rem 1.9rem;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(10, 125, 140, 0.28);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}
.btn-grad:hover { transform: translateY(-3px); filter: brightness(1.05); box-shadow: 0 16px 32px rgba(10, 125, 140, 0.35); }
.btn-outline-round {
  border: 2px solid rgba(255, 255, 255, 0.7);
  color: #fff;
  border-radius: 50rem;
  padding: 0.8rem 1.9rem;
  font-weight: 700;
  transition: all 0.25s ease;
}
.btn-outline-round:hover { background: #fff; color: var(--primary); transform: translateY(-3px); }
.btn-outline-primary-round {
  border: 2px solid var(--primary);
  color: var(--primary);
  border-radius: 50rem;
  padding: 0.8rem 1.9rem;
  font-weight: 700;
  transition: all 0.25s ease;
}
.btn-outline-primary-round:hover { background: var(--primary); color: #fff; transform: translateY(-3px); }

/* ---------- Topbar ---------- */
.topbar {
  background: var(--topbar-bg, var(--primary-dark));
  color: var(--topbar-text, #cfe9ee);
  font-size: 0.82rem;
  padding: 0.5rem 0;
  position: relative;
  z-index: 1030;
}
.topbar a { color: var(--topbar-link, #cfe9ee); transition: color 0.2s; }
.topbar a:hover { color: var(--topbar-hover, #fff); }
.topbar .bi { margin-right: 0.3rem; }

.announcement {
  background: var(--grad);
  color: #fff;
  font-size: 0.84rem;
  overflow: hidden;
  white-space: nowrap;
  max-width: 100vw;
  width: 100%;
}
.announcement .announce-track {
  display: inline-block;
  padding: 0.35rem 0;
  animation: marquee 28s linear infinite;
  will-change: transform;
}
@keyframes marquee {
  from { transform: translateX(100vw); }
  to { transform: translateX(-100%); }
}

/* ---------- Navbar ---------- */
.site-navbar {
  background: var(--navbar-bg);
  backdrop-filter: blur(12px);
  transition: box-shadow 0.3s ease, background 0.3s ease;
  padding: 0.9rem 0;
  z-index: 1030;
}
.site-navbar.navbar-scrolled {
  background: var(--navbar-bg-solid);
  box-shadow: 0 8px 30px rgba(15, 43, 51, 0.12);
  padding: 0.55rem 0;
}
.brand-logo {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; margin-left: 0.6rem; }
.brand-name { font-weight: 800; color: var(--ink); font-size: 1.05rem; letter-spacing: -0.02em; }
.brand-tag { font-size: 0.68rem; color: var(--primary); font-weight: 600; }

.site-navbar .nav-link {
  color: var(--ink);
  font-weight: 600;
  margin: 0 0.35rem;
  padding: 0.6rem 0.8rem;
  position: relative;
  transition: color 0.2s;
}
.site-navbar .nav-link::after {
  content: '';
  position: absolute;
  left: 0.8rem; right: 0.8rem; bottom: 0.2rem;
  height: 3px;
  border-radius: 3px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.site-navbar .nav-link:hover, .site-navbar .nav-link.active { color: var(--primary); }
.site-navbar .nav-link:hover::after, .site-navbar .nav-link.active::after { transform: scaleX(1); }
.dropdown-menu {
  border: 0;
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
  padding: 0.6rem;
  background: var(--surface);
  animation: dropdownIn 0.25s ease;
}
.dropdown-menu .dropdown-item { border-radius: 0.6rem; padding: 0.55rem 1rem; font-weight: 600; color: var(--ink); }
.dropdown-menu .dropdown-item:hover { background: var(--grad-soft); color: var(--primary); }
@keyframes dropdownIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Hero ---------- */
.hero-carousel { position: relative; }
.hero-carousel .carousel-item {
  height: 88vh;
  min-height: 540px;
  max-height: 820px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.hero-carousel .hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  animation: heroKenburns 20s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes heroKenburns {
  from { transform: scale(1) translate(0, 0); }
  to { transform: scale(1.12) translate(1.5%, -2%); }
}
.hero-carousel .carousel-item::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(100deg, rgba(7, 47, 56, 0.92) 0%, rgba(10, 125, 140, 0.72) 55%, rgba(244, 162, 97, 0.35) 100%);
}
.hero-caption { position: relative; z-index: 3; color: #fff; padding-top: 0.5rem; }
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.45rem 1.1rem;
  border-radius: 50rem;
  margin-bottom: 1.4rem;
}
.hero-caption h1,
.hero-caption .hero-title {
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.15;
  max-width: 720px;
  margin-bottom: 1.1rem;
}
.hero-caption p {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.92);
  max-width: 560px;
  margin-bottom: 2rem;
}
.hero-caption .btn { margin-right: 0.7rem; margin-bottom: 0.5rem; }

.hero-carousel .carousel-item .hero-caption > * { animation: heroUp 0.8s ease both; }
.hero-carousel .carousel-item .hero-caption > *:nth-child(2) { animation-delay: 0.12s; }
.hero-carousel .carousel-item .hero-caption > *:nth-child(3) { animation-delay: 0.24s; }
.hero-carousel .carousel-item .hero-caption > *:nth-child(4) { animation-delay: 0.36s; }
@keyframes heroUp { from { opacity: 0; transform: translateY(34px); } to { opacity: 1; transform: translateY(0); } }

.hero-carousel .carousel-indicators { bottom: 2rem; }
.hero-carousel .carousel-indicators button {
  width: 34px;
  height: 6px;
  border-radius: 6px;
  border: 0;
  background: rgba(255, 255, 255, 0.4);
  transition: all 0.3s;
}
.hero-carousel .carousel-indicators button.active { background: #fff; width: 52px; }
.hero-carousel .carousel-control-prev, .hero-carousel .carousel-control-next { opacity: 0; transition: opacity 0.3s; }
.hero-carousel:hover .carousel-control-prev, .hero-carousel:hover .carousel-control-next { opacity: 1; }

.hero-shape {
  position: absolute;
  z-index: 2;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  animation: floaty 9s ease-in-out infinite;
}
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-24px); } }

@media (prefers-reduced-motion: reduce) {
  .hero-carousel .hero-bg,
  .hero-carousel .hero-shape,
  .hero-carousel .carousel-item .hero-caption > * {
    animation: none !important;
  }
}

/* ---------- Sections ---------- */
.section { padding: 5.5rem 0; }
.section-light { background: var(--light); }
.section-soft { background: var(--grad-soft); }

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}
.section-eyebrow::before { content: ''; width: 26px; height: 3px; border-radius: 3px; background: var(--grad); }
.section-title { font-size: clamp(1.7rem, 3.5vw, 2.5rem); margin-bottom: 0.9rem; }
.section-sub { color: var(--muted); max-width: 640px; }

.title-center { text-align: center; }
.title-center .section-eyebrow::after { content: ''; width: 26px; height: 3px; border-radius: 3px; background: var(--grad); }
.title-center .section-sub { margin-inline: auto; }

/* ---------- Icon cards (services / facilities) ---------- */
.icon-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem 1.7rem;
  height: 100%;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}
.icon-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 110px; height: 110px;
  border-radius: 50%;
  background: var(--grad-soft);
  opacity: 0.6;
  transition: transform 0.4s ease;
}
.icon-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); }
.icon-card:hover::before { transform: scale(1.5); }
.icon-card .icon-wrap {
  width: 60px; height: 60px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  background: var(--grad-soft);
  color: var(--primary);
  font-size: 1.6rem;
  margin-bottom: 1.1rem;
  transition: background 0.3s ease, color 0.3s ease;
}
.icon-card:hover .icon-wrap { background: var(--grad); color: #fff; }
.icon-card h5 { font-size: 1.05rem; margin-bottom: 0.6rem; }
.icon-card p { color: var(--muted); font-size: 0.92rem; margin-bottom: 0; }
.icon-card .service-docs {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px dashed var(--border);
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}
.icon-card .service-docs i { color: var(--primary); }

/* ---------- Icon card as link ---------- */
a.icon-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
a.icon-card-link:hover { color: inherit; }

/* ---------- Icon card top link & image ---------- */
.icon-card .icon-card-top {
  display: block;
  color: inherit;
  text-decoration: none;
}
.icon-card .icon-card-top:hover { color: inherit; }
.icon-card .icon-card-top h5 { transition: color 0.2s ease; }
.icon-card .icon-card-top:hover h5 { color: var(--primary); }
.icon-card .icon-card-img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
}
.icon-card .icon-card-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--grad);
  color: #fff;
  font-size: 2.6rem;
  border: 1px solid var(--border);
}
.icon-card .icon-card-placeholder::after {
  content: '';
  position: absolute;
  top: -24px; right: -24px;
  width: 90px; height: 90px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

/* ---------- Read more link ---------- */
.read-more {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--primary);
  text-decoration: none;
}
.read-more:hover { color: var(--secondary); }
.icon-card .read-more { margin-top: 1rem; }

/* ---------- Text clamp (read more) ---------- */
.text-clamp,
.text-clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.text-clamp { -webkit-line-clamp: 2; }
.text-clamp-3 { -webkit-line-clamp: 3; }

/* ---------- Facility mini carousel ---------- */
.fac-carousel { overflow: hidden; }
.fac-carousel .carousel-inner,
.fac-carousel .carousel-item { height: 130px; }
.fac-carousel .carousel-item img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
}
.fac-carousel .carousel-control-prev,
.fac-carousel .carousel-control-next {
  width: 16%;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.fac-carousel:hover .carousel-control-prev,
.fac-carousel:hover .carousel-control-next { opacity: 1; }

/* ---------- Doctor cards ---------- */
.doc-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
}
.doc-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.doc-card .doc-photo-wrap { height: 260px; overflow: hidden; position: relative; }
.doc-card .doc-photo { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.doc-card:hover .doc-photo { transform: scale(1.06); }
.doc-card .doc-body { padding: 1.3rem 1.4rem 1.5rem; }
.doc-card .doc-name { font-size: 1.1rem; margin-bottom: 0.2rem; }
.doc-card .doc-spec { color: var(--primary); font-weight: 700; font-size: 0.88rem; margin-bottom: 0.6rem; }
.doc-card .doc-sched { font-size: 0.85rem; color: var(--muted); display: flex; align-items: center; gap: 0.45rem; }

/* ---------- News cards ---------- */
.news-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.news-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); }
.news-card .news-img-wrap { height: 200px; overflow: hidden; }
.news-card .news-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.news-card:hover .news-img { transform: scale(1.08); }
.news-card .news-body { padding: 1.3rem 1.4rem 1.5rem; flex: 1; display: flex; flex-direction: column; }
.news-card .news-meta { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.6rem; display: flex; gap: 0.9rem; flex-wrap: wrap; }
.news-card .news-meta .bi { margin-right: 0.25rem; }
.news-card h5 { font-size: 1.05rem; line-height: 1.35; margin-bottom: 0.6rem; }
.news-card h5 a { color: var(--ink); transition: color 0.2s; }
.news-card h5 a:hover { color: var(--primary); }
.news-card p { color: var(--muted); font-size: 0.9rem; flex: 1; }
.news-card .read-more { font-weight: 700; font-size: 0.88rem; color: var(--primary); }
.news-card .read-more:hover { color: var(--secondary); }

.chip {
  display: inline-block;
  background: var(--grad-soft);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.25rem 0.8rem;
  border-radius: 50rem;
}

/* ---------- Stats ---------- */
.stats-section {
  background: var(--grad);
  border-radius: var(--radius-lg);
  color: #fff;
  padding: 3rem 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.stats-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.12) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
}
.stat-item { position: relative; text-align: center; padding: 0.5rem; }
.stat-item .stat-num { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; line-height: 1; }
.stat-item .stat-label { font-size: 0.92rem; opacity: 0.9; margin-top: 0.5rem; }

/* ---------- Partners ---------- */
.partners-strip {
  overflow: hidden;
  position: relative;
  padding: 1rem 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.partners-track { display: flex; gap: 1.5rem; width: max-content; animation: partnersScroll 30s linear infinite; }
.partners-strip:hover .partners-track { animation-play-state: paused; }
@keyframes partnersScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.partner-logo {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.1rem 1.8rem;
  min-width: 170px;
  text-align: center;
  font-weight: 800;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  white-space: nowrap;
}
.partner-logo:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); color: var(--primary); }
.partner-logo img { max-height: 46px; width: auto; }

/* ---------- Moving cards (services / facilities on homepage) ---------- */
.svc-strip,
.fac-strip {
  overflow: hidden;
  position: relative;
  padding: 0.5rem 0 1rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.svc-track,
.fac-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  animation: partnersScroll 32s linear infinite;
}
.svc-strip:hover .svc-track,
.fac-strip:hover .fac-track { animation-play-state: paused; }
.svc-card,
.fac-card { width: 280px; flex: 0 0 auto; }

/* ---------- Moving doctor cards (homepage) ---------- */
.doc-strip {
  overflow: hidden;
  position: relative;
  padding: 0.5rem 0 1rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.doc-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  animation: partnersScroll 32s linear infinite;
}
.doc-strip:hover .doc-track { animation-play-state: paused; }
.doc-card-item { width: 280px; flex: 0 0 auto; }

/* ---------- Moving news cards (homepage) ---------- */
.news-strip {
  overflow: hidden;
  position: relative;
  padding: 0.5rem 0 1rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.news-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  animation: partnersScroll 32s linear infinite;
}
.news-strip:hover .news-track { animation-play-state: paused; }
.news-card-item { width: 320px; flex: 0 0 auto; }

/* ---------- Moving gallery cards (about page) ---------- */
.gal-strip {
  overflow: hidden;
  position: relative;
  padding: 0.5rem 0 1rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.gal-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  animation: partnersScroll 32s linear infinite;
}
.gal-strip:hover .gal-track { animation-play-state: paused; }
.gal-item { width: 320px; flex: 0 0 auto; }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(120deg, var(--primary-dark) 0%, var(--primary) 60%, var(--secondary) 140%);
  border-radius: var(--radius-lg);
  color: #fff;
  padding: 3.4rem 2.6rem;
  position: relative;
  overflow: hidden;
}
.cta-banner h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2.2rem); }
.cta-banner p { color: rgba(255,255,255,0.9); }
.cta-banner::after {
  content: '';
  position: absolute;
  right: -60px; top: -60px;
  width: 240px; height: 240px;
  border-radius: 50%;
  border: 34px solid rgba(255,255,255,0.08);
}

/* ---------- Page banner ---------- */
.page-banner {
  position: relative;
  padding: 5rem 0 4.5rem;
  background-color: var(--primary);
  background-position: center;
  background-size: cover;
  color: #fff;
  overflow: hidden;
}
.page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(120deg,
      color-mix(in srgb, var(--primary-dark) 62%, transparent) 0%,
      color-mix(in srgb, var(--primary) 46%, transparent) 55%,
      color-mix(in srgb, var(--secondary) 26%, transparent) 100%),
    radial-gradient(rgba(255,255,255,0.09) 1.5px, transparent 1.5px);
  background-size: auto, 24px 24px;
}
.page-banner h1,
.page-banner .page-banner-title {
  color: #fff;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 700;
  text-shadow: 0 2px 14px rgba(2, 24, 30, 0.55);
  margin-bottom: 0.5rem;
}
.page-banner .breadcrumb { margin-bottom: 0; }
.page-banner .breadcrumb a, .page-banner .breadcrumb-item, .page-banner .breadcrumb-item.active { color: rgba(255,255,255,0.9); font-weight: 600; text-shadow: 0 1px 8px rgba(2, 24, 30, 0.5); }
.page-banner .breadcrumb a:hover { color: #fff; }
.page-banner .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.65); }

/* ---------- About / content ---------- */
.about-img-wrap { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.about-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.experience-badge {
  background: var(--grad);
  color: #fff;
  border-radius: var(--radius);
  padding: 1.3rem 1.6rem;
  box-shadow: var(--shadow-lg);
  position: absolute;
  bottom: -24px;
  right: 24px;
  z-index: 3;
}
.experience-badge .num { font-size: 2.2rem; font-weight: 800; line-height: 1; }
.experience-badge .lbl { font-size: 0.8rem; opacity: 0.9; }

.vm-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  height: 100%;
  border-top: 5px solid var(--primary);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.vm-card.misi { border-top-color: var(--secondary); }
.vm-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.vm-card .vm-icon {
  width: 54px; height: 54px;
  border-radius: 1rem;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--grad-soft);
  color: var(--primary);
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

/* ---------- Career ---------- */
.job-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.job-card .job-head {
  padding: 1.4rem 1.6rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  cursor: pointer;
}
.job-card .job-body { padding: 0 1.6rem 1.6rem; }

/* ---------- Contact ---------- */
.contact-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  padding: 1.6rem;
  height: 100%;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.contact-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.contact-card .cc-icon {
  width: 50px; height: 50px; flex: 0 0 50px;
  border-radius: 1rem;
  background: var(--grad-soft);
  color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}
.contact-card p { overflow-wrap: anywhere; word-break: break-word; }
.form-control, .form-select {
  border-radius: 0.9rem;
  padding: 0.75rem 1.1rem;
  border-color: var(--border);
  font-family: var(--font);
  background: var(--surface);
  color: var(--body-text);
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.25rem rgba(10, 125, 140, 0.15);
}
.map-frame { border: 0; width: 100%; height: 100%; min-height: 340px; border-radius: var(--radius); box-shadow: var(--shadow-sm); }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer-bg, var(--dark)); color: #a9c3cc; padding-top: 4rem; }
.site-footer h6 { color: #fff; font-weight: 700; margin-bottom: 1.1rem; }
.site-footer a { color: #a9c3cc; transition: color 0.2s, padding-left 0.2s; }
.site-footer a:hover { color: #fff; }
.site-footer .footer-link { display: block; padding: 0.28rem 0; }
.site-footer .footer-link:hover { color: var(--secondary); padding-left: 4px; }
.footer-brand-name { color: #fff; font-weight: 800; font-size: 1.2rem; }
.footer-social a {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: #fff;
  margin-right: 0.5rem;
  transition: background 0.25s ease, transform 0.25s ease;
}
.footer-social a:hover { background: var(--grad); transform: translateY(-3px); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 3rem;
  padding: 1.3rem 0;
  font-size: 0.85rem;
}

/* ---------- Gallery ---------- */
.gallery-item {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item .gallery-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0.6rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(transparent, rgba(15, 43, 51, 0.85));
}

/* ---------- Gallery lightbox ---------- */
.gallery-lightbox .modal-content {
  background: var(--surface);
  color: var(--body-text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
#galleryLbImage {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  display: block;
  background: #0c1518;
}
.gallery-lightbox .modal-header { border-bottom: 1px solid var(--border); }
.gallery-lightbox .modal-title {
  font-size: 0.95rem;
  color: var(--ink);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.gallery-lb-controls {
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 0.7rem;
  pointer-events: none;
}
.gallery-lb-controls .btn {
  pointer-events: auto;
  width: 42px; height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0.85;
  transition: opacity 0.2s ease;
}
.gallery-lb-controls .btn:hover { opacity: 1; }

/* ---------- Back to top ---------- */
#backToTop {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 0;
  background: var(--grad);
  color: #fff;
  font-size: 1.2rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: all 0.3s ease;
  z-index: 1040;
}
#backToTop.show { opacity: 1; visibility: visible; transform: translateY(0); }

/* ---------- Flash message ---------- */
.flash-alert { position: fixed; top: 100px; left: 50%; transform: translateX(-50%); z-index: 2000; min-width: 320px; border-radius: 1rem; box-shadow: var(--shadow-lg); font-weight: 600; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--surface-soft); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--primary), var(--secondary)); border-radius: 8px; }

/* ---------- Surface utility ---------- */
.surface-card { background: var(--surface); }

/* ---------- Language switch ---------- */
.lang-switch { display: inline-flex; align-items: center; gap: 0.4rem; }
.lang-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 20px; border-radius: 4px; overflow: hidden;
  border: 2px solid var(--topbar-btn-border, rgba(255, 255, 255, 0.35)); opacity: 0.6;
  transition: opacity 0.2s, border-color 0.2s, transform 0.2s;
  flex: 0 0 auto;
}
.lang-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lang-btn:hover { opacity: 1; transform: translateY(-1px); }
.lang-btn.active { opacity: 1; border-color: var(--topbar-btn-active, #fff); box-shadow: 0 0 0 2px var(--topbar-divider, rgba(255, 255, 255, 0.25)); }
.topbar-divider { width: 1px; height: 18px; background: var(--topbar-divider, rgba(255, 255, 255, 0.25)); }
.navbar-lang .lang-btn { border-color: rgba(15, 43, 51, 0.3); }
.navbar-lang .lang-btn.active { border-color: var(--primary); box-shadow: none; }

/* ---------- Theme toggle ---------- */
.theme-toggle {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: var(--surface);
  color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
  transition: all 0.25s ease;
}
.theme-toggle:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }
.theme-toggle .bi-sun-fill { display: none; }
[data-theme="dark"] .theme-toggle .bi-sun-fill { display: inline; }
[data-theme="dark"] .theme-toggle .bi-moon-stars-fill { display: none; }

/* ---------- WhatsApp float ---------- */
#waFloat {
  position: fixed;
  right: 22px;
  bottom: 86px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  font-size: 1.8rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 26px rgba(37, 211, 102, 0.45);
  z-index: 1040;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
#waFloat:hover { transform: translateY(-4px) scale(1.05); box-shadow: 0 16px 34px rgba(37, 211, 102, 0.55); color: #fff; }
#waFloat::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(37, 211, 102, 0.55);
  animation: waPulse 2s ease-out infinite;
}
@keyframes waPulse { 0% { transform: scale(0.85); opacity: 1; } 100% { transform: scale(1.4); opacity: 0; } }

/* ---------- Dark mode: Bootstrap component overrides ---------- */
[data-theme="dark"] .accordion-item,
[data-theme="dark"] .accordion-button { background: var(--surface); color: var(--body-text); }
[data-theme="dark"] .accordion-button:not(.collapsed) { background: var(--grad-soft); color: var(--primary); box-shadow: none; }
[data-theme="dark"] .accordion-button::after { filter: invert(0.85); }
[data-theme="dark"] .table { --bs-table-bg: transparent; --bs-table-color: var(--body-text); color: var(--body-text); }
[data-theme="dark"] .page-link { background: var(--surface); border-color: var(--border); color: var(--primary); }
[data-theme="dark"] .page-item.active .page-link { background: var(--primary); border-color: var(--primary); color: #fff; }
[data-theme="dark"] .dropdown-menu { background: var(--surface); }
[data-theme="dark"] .dropdown-item { color: var(--body-text); }
[data-theme="dark"] .dropdown-item:hover { background: var(--grad-soft); color: var(--primary); }
[data-theme="dark"] .form-control, [data-theme="dark"] .form-select { background: var(--surface); color: var(--body-text); border-color: var(--border); }
[data-theme="dark"] .form-control::placeholder { color: var(--muted); }
[data-theme="dark"] .text-muted { color: var(--muted) !important; }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .site-navbar .navbar-collapse { background: var(--surface); border-radius: 1rem; padding: 1rem; box-shadow: var(--shadow-md); margin-top: 0.7rem; }
  .hero-carousel .carousel-item { height: auto; min-height: 480px; }
  .section { padding: 4rem 0; }
}

/* ---------- Mobile overflow fix ---------- */
@media (max-width: 767px) {
  /* Stats & CTA - reduce border-radius & padding on small screens */
  .stats-section {
    border-radius: 0.75rem;
    padding: 2rem 1.2rem;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
  }

  .cta-banner {
    border-radius: 0.75rem;
    padding: 2rem 1.2rem;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
  }
  .cta-banner::after {
    display: none;
  }

  /* Strip/scrolling tracks: contain within viewport */
  .svc-strip,
  .fac-strip,
  .doc-strip,
  .news-strip,
  .gal-strip,
  .partners-strip {
    max-width: 100vw;
    overflow: hidden;
  }

  /* Hero caption adjust for small screens */
  .hero-caption h1,
  .hero-caption .hero-title {
    font-size: clamp(1.6rem, 7vw, 2.4rem);
  }
  .hero-caption p {
    font-size: 0.95rem;
  }

  /* Page banner */
  .page-banner {
    padding: 3.5rem 0 3rem;
  }

  /* Experience badge reposition */
  .experience-badge {
    position: relative;
    bottom: auto;
    right: auto;
    margin-top: 1rem;
    display: inline-block;
  }

  /* Section padding */
  .section {
    padding: 3rem 0;
  }

  /* About image wrap */
  .about-img-wrap {
    margin-bottom: 1.5rem;
  }
}
