/* ============================================
   RS MEDIKA NUSANTARA — Global Stylesheet
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600&display=swap');

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

:root {
  --teal:       #0a5c52;
  --teal-mid:   #0c6e63;
  --teal-light: #0e7a6c;
  --teal-pale:  #e6f4f2;
  --teal-xpale: #f0f9f7;
  --cream:      #f8f5ee;
  --cream-dark: #f0ece0;
  --gold:       #b8972a;
  --gold-light: #e8c84a;
  --dark:       #111c19;
  --dark-2:     #1a2b26;
  --text:       #2d3a36;
  --muted:      #6b807a;
  --light:      #9db0aa;
  --white:      #ffffff;
  --border:     rgba(10,92,82,0.12);
  --border-md:  rgba(10,92,82,0.2);
  --shadow-sm:  0 2px 12px rgba(10,92,82,0.08);
  --shadow-md:  0 8px 32px rgba(10,92,82,0.12);
  --shadow-lg:  0 20px 60px rgba(10,92,82,0.15);
  --radius-sm:  10px;
  --radius-md:  16px;
  --radius-lg:  24px;
  --radius-xl:  32px;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; }

/* ── NAVBAR ── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 999;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 5%;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .3s, padding .3s;
}
.navbar.scrolled { box-shadow: var(--shadow-md); padding: .75rem 5%; }

.nav-logo { display: flex; align-items: center; gap: 12px; }
.nav-logo-icon {
  width: 42px; height: 42px; background: var(--teal); border-radius: 12px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.nav-logo-icon svg { width: 24px; height: 24px; fill: white; }
.nav-logo-name {
  font-family: 'Cormorant Garamond', serif; font-size: 1.3rem;
  font-weight: 600; color: var(--teal); line-height: 1.1;
}
.nav-logo-sub { font-size: 0.62rem; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }

.nav-menu { display: flex; align-items: center; gap: .2rem; list-style: none; }
.nav-menu a {
  display: flex; align-items: center; gap: 5px;
  padding: .5rem .9rem; border-radius: 100px;
  font-size: .875rem; font-weight: 400; color: var(--text);
  transition: background .2s, color .2s;
}
.nav-menu a:hover, .nav-menu a.active { background: var(--teal-pale); color: var(--teal); }
.nav-menu .has-drop { position: relative; }
.nav-menu .has-drop > a::after { content: '▾'; font-size: .6rem; margin-left: 2px; }
.dropdown {
  position: absolute; top: calc(100% + 8px); left: 0;
  background: white; border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: .5rem; min-width: 220px; box-shadow: var(--shadow-md);
  opacity: 0; pointer-events: none; transform: translateY(-8px);
  transition: all .25s; z-index: 100;
}
.has-drop:hover .dropdown { opacity: 1; pointer-events: auto; transform: translateY(0); }
.dropdown a {
  display: block; padding: .6rem 1rem; border-radius: var(--radius-sm);
  font-size: .85rem; color: var(--text);
}
.dropdown a:hover { background: var(--teal-pale); color: var(--teal); }

.nav-actions { display: flex; align-items: center; gap: .8rem; }
.btn-emergency {
  display: flex; align-items: center; gap: 6px;
  font-size: .78rem; color: #c0392b; font-weight: 500;
  background: #fff0ef; border: 1px solid #f8c0ba; border-radius: 100px;
  padding: .45rem 1rem; transition: all .2s;
}
.btn-emergency:hover { background: #ffe5e3; }
.btn-emergency .dot {
  width: 7px; height: 7px; border-radius: 50%; background: #e74c3c;
  animation: pulse 1.5s infinite;
}
@keyframes pulse { 0%,100%{ box-shadow: 0 0 0 0 rgba(231,76,60,.4); } 50%{ box-shadow: 0 0 0 6px rgba(231,76,60,0); } }

.btn-primary {
  background: var(--teal); color: white; padding: .6rem 1.4rem;
  border-radius: 100px; font-size: .875rem; font-weight: 500;
  border: none; cursor: pointer; transition: all .2s; display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary:hover { background: var(--teal-light); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(10,92,82,.25); }

.btn-outline {
  background: transparent; color: var(--teal); padding: .6rem 1.4rem;
  border-radius: 100px; font-size: .875rem; font-weight: 500;
  border: 1.5px solid var(--teal); cursor: pointer; transition: all .2s; display: inline-flex; align-items: center; gap: 6px;
}
.btn-outline:hover { background: var(--teal-pale); transform: translateY(-1px); }

.btn-gold {
  background: var(--gold); color: white; padding: .6rem 1.4rem;
  border-radius: 100px; font-size: .875rem; font-weight: 500;
  border: none; cursor: pointer; transition: all .2s; display: inline-flex; align-items: center; gap: 6px;
}
.btn-gold:hover { background: #a0831e; transform: translateY(-1px); }

/* ── PAGE HERO ── */
.page-hero {
  padding: 140px 5% 80px;
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 60%, #0a3d36 100%);
  position: relative; overflow: hidden;
}
.page-hero::before {
  content: ''; position: absolute; right: -100px; top: -100px;
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(14,122,108,.15) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero::after {
  content: ''; position: absolute; left: 30%; bottom: -60px;
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(184,151,42,.08) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero-inner { max-width: 720px; position: relative; z-index: 2; }
.page-hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15);
  border-radius: 100px; padding: .4rem 1rem; margin-bottom: 1.5rem;
  font-size: .78rem; color: rgba(255,255,255,.8); font-weight: 400;
}
.page-hero-tag span { width: 6px; height: 6px; border-radius: 50%; background: var(--gold-light); display: block; }
.page-hero h1 {
  font-family: 'Cormorant Garamond', serif; font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 600; color: white; line-height: 1.1; margin-bottom: 1.2rem;
}
.page-hero h1 em { color: var(--gold-light); font-style: italic; }
.page-hero p { font-size: 1.05rem; color: rgba(255,255,255,.6); line-height: 1.8; max-width: 560px; font-weight: 300; }

/* ── SECTION COMMONS ── */
.section { padding: 6rem 5%; }
.section-alt { background: var(--cream); }
.section-dark { background: var(--dark); }
.section-teal { background: var(--teal); }

.section-tag {
  display: inline-block; background: var(--teal-pale); color: var(--teal);
  font-size: .75rem; font-weight: 500; letter-spacing: .1em;
  text-transform: uppercase; padding: .35rem .9rem; border-radius: 100px; margin-bottom: .8rem;
}
.section-tag.light { background: rgba(255,255,255,.12); color: rgba(255,255,255,.8); }

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  font-weight: 600; color: var(--dark); line-height: 1.15; margin-bottom: .8rem;
}
.section-title.white { color: white; }
.section-sub { font-size: .98rem; color: var(--muted); line-height: 1.8; font-weight: 300; }
.section-sub.white { color: rgba(255,255,255,.55); }

.section-header { margin-bottom: 3.5rem; }
.section-header.center { text-align: center; }
.section-header.center .section-sub { max-width: 560px; margin: 0 auto; }

.divider { width: 48px; height: 3px; background: var(--gold); border-radius: 2px; margin: 1rem 0 1.5rem; }
.divider.center { margin-left: auto; margin-right: auto; }
.divider.white { background: rgba(255,255,255,.4); }

/* ── CARDS ── */
.card {
  background: white; border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2rem;
  transition: all .3s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); border-color: var(--border-md); }

.card-dark {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-lg); padding: 2rem; transition: all .3s;
}
.card-dark:hover { background: rgba(255,255,255,.09); transform: translateY(-4px); }

/* ── BADGES ── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: .3rem .75rem; border-radius: 100px; font-size: .72rem; font-weight: 500;
}
.badge-teal { background: var(--teal-pale); color: var(--teal); }
.badge-gold { background: #fdf4dc; color: #8a6d1a; border: 1px solid #f0dca0; }
.badge-red { background: #fff0ef; color: #c0392b; }
.badge-dark { background: rgba(255,255,255,.12); color: rgba(255,255,255,.75); border: 1px solid rgba(255,255,255,.15); }

/* ── FORM ELEMENTS ── */
.form-group { margin-bottom: 1.2rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.2rem; }
label { display: block; font-size: .8rem; color: var(--muted); margin-bottom: .4rem; font-weight: 500; }
label .req { color: #e74c3c; margin-left: 2px; }
input[type="text"], input[type="tel"], input[type="email"], input[type="date"],
input[type="number"], input[type="password"], select, textarea {
  width: 100%; padding: .75rem 1rem;
  border: 1.5px solid var(--border-md); border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif; font-size: .9rem; color: var(--text);
  background: white; transition: all .2s; outline: none; appearance: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(10,92,82,.1); }
textarea { resize: vertical; min-height: 100px; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%236b807a' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem; }
.form-submit {
  width: 100%; padding: .9rem; background: var(--teal); color: white;
  border: none; border-radius: 100px; font-family: 'DM Sans', sans-serif;
  font-size: .95rem; font-weight: 500; cursor: pointer; transition: all .2s; margin-top: .5rem;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.form-submit:hover { background: var(--teal-light); box-shadow: 0 8px 24px rgba(10,92,82,.3); transform: translateY(-2px); }

/* ── STATS ROW ── */
.stats-row { display: flex; gap: 3rem; padding: 2.5rem 5%; background: var(--teal); }
.stat-item { text-align: center; flex: 1; }
.stat-num { font-family: 'Cormorant Garamond', serif; font-size: 2.4rem; font-weight: 600; color: white; }
.stat-label { font-size: .8rem; color: rgba(255,255,255,.6); margin-top: .2rem; }

/* ── BREADCRUMB ── */
.breadcrumb { display: flex; align-items: center; gap: .5rem; padding: 1rem 5%; background: var(--cream-dark); font-size: .82rem; }
.breadcrumb a { color: var(--teal); }
.breadcrumb span { color: var(--muted); }
.breadcrumb .sep { color: var(--light); }

/* ── FOOTER ── */
.footer { background: var(--dark); color: white; padding: 5rem 5% 2rem; }
.footer-top { display: grid; grid-template-columns: 2.2fr 1fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 4rem; }
.footer-brand-text {
  font-family: 'Cormorant Garamond', serif; font-size: 1.35rem; font-weight: 600; color: white; margin-top: 12px; margin-bottom: .6rem;
}
.footer-tagline { font-size: .85rem; color: rgba(255,255,255,.38); line-height: 1.8; font-weight: 300; max-width: 280px; }
.footer-social { display: flex; gap: .6rem; margin-top: 1.5rem; }
.social-btn {
  width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1); display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.5); font-size: .9rem; transition: all .2s;
}
.social-btn:hover { background: var(--teal); border-color: var(--teal); color: white; }
.footer-col h4 { font-size: .75rem; font-weight: 500; color: rgba(255,255,255,.45); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1.2rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .65rem; }
.footer-col ul li a { font-size: .875rem; color: rgba(255,255,255,.38); transition: color .2s; }
.footer-col ul li a:hover { color: rgba(255,255,255,.9); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding-top: 2rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.footer-copy { font-size: .78rem; color: rgba(255,255,255,.28); }
.footer-badges { display: flex; gap: .6rem; flex-wrap: wrap; }
.footer-badge { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 8px; padding: 5px 12px; font-size: .7rem; color: rgba(255,255,255,.38); }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 9999;
  background: var(--teal); color: white; padding: 1rem 1.5rem;
  border-radius: var(--radius-md); font-size: .9rem; font-weight: 500;
  display: flex; align-items: center; gap: 10px; max-width: 360px;
  box-shadow: var(--shadow-lg);
  transform: translateY(120px) scale(.95); opacity: 0;
  transition: all .5s cubic-bezier(.16,1,.3,1);
}
.toast.show { transform: translateY(0) scale(1); opacity: 1; }
.toast-icon { width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ── SCROLL REVEAL ── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── SCROLL TO TOP ── */
#scrollTop {
  position: fixed; bottom: 2rem; left: 2rem; width: 44px; height: 44px;
  background: var(--teal); border-radius: 50%; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md); opacity: 0; transform: scale(.8);
  transition: all .3s; z-index: 998;
}
#scrollTop.show { opacity: 1; transform: scale(1); }
#scrollTop svg { width: 20px; height: 20px; fill: white; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .footer-top { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 768px) {
  .navbar { padding: .8rem 4%; }
  .nav-menu { display: none; }
  .nav-actions .btn-emergency { display: none; }
  .section { padding: 4rem 4%; }
  .stats-row { flex-wrap: wrap; gap: 1.5rem; padding: 2rem 4%; }
  .stats-row .stat-item { flex: 1 0 40%; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .form-row { grid-template-columns: 1fr; }
  .form-row-3 { grid-template-columns: 1fr 1fr; }
  .page-hero { padding: 120px 4% 60px; }
}
@media (max-width: 480px) {
  .form-row-3 { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
}
