/* Brand tokens, available on every page (sections also re-declare them) */
:root {
  --brand: #f3943a;
  --brand-dark: #d9771c;
  --brand-soft: #fdeedf;
  --ink: #1f2430;
  --muted: #6b7180;
  --line: #f0ebe5;
}

/* RSIA Cempaka Az-Zahra overrides, loaded after the Mediplus theme CSS */

/* Logo is 738x387 (~1.9:1), much taller than the template's 209x52 one */
.header-lower .logo,
.sticky-header .logo {
  padding: 14px 0px 14px 0px;
}
.header-lower .logo img,
.sticky-header .logo img {
  height: 82px;
  width: auto;
}

@media only screen and (max-width: 991px) {
  .header-lower .logo,
  .sticky-header .logo {
    width: auto;
    text-align: center;
    padding: 14px 0px 0px 0px;
  }
  .header-lower .logo img,
  .sticky-header .logo img {
    height: 70px;
  }
}

/* Teal shadow left over in the template's appointment button */
.appointment-form .appoinment-btn button:hover {
  box-shadow: 0px 5px #fde3cb;
}

/* Header "Buat Janji" button: desktop/tablet pill styles live in the
   "Header menu" block below (min-width: 768px). In the collapsed phone
   menu (orange list) it is a white call-to-action row instead. */
@media (max-width: 767px) {
  .main-menu .navbar-collapse > .navigation > li.nav-appointment > a {
    margin: 8px 10px 10px !important;
    border-radius: 25px;
    background: #fff !important;
    color: #d9771c !important;
    text-align: center;
  }
}

/* Page loader: CSS spinner in the brand color instead of the teal preloader.gif */
.preloader {
  background-image: none !important;
}
.preloader:after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border: 5px solid rgba(243, 148, 58, 0.2);
  border-top-color: #f3943a;
  border-radius: 50%;
  animation: rsia-spin 0.8s linear infinite;
}
@keyframes rsia-spin {
  to { transform: rotate(360deg); }
}

/* Opening Hours panel: solid brand color (template used 80% opacity) */
.hours-section .hours-content:before {
  background: #f3943a;
  opacity: 1;
}

/* Contact page map (Google Maps embed, no API key needed) */
.google-map-area .rsia-map {
  display: block;
  width: 100%;
  height: 450px;
  border: 0;
}

/* Header top bar: address on the right (replaces template social icons) */
.header-upper .rsia-top-address {
  text-align: right;
  line-height: 25px;
  color: #fff;
}
.header-upper .rsia-top-address a {
  color: #fff;
  font-size: 15px;
  font-family: 'open sans', sans-serif;
  margin-left: 6px;
}
.header-upper .rsia-top-address a:hover,
.header-upper .rsia-top-address a:focus { color: #fff; text-decoration: underline; }
@media (max-width: 767px) {
  .header-upper .rsia-top-address { text-align: center; margin-top: 4px; }
}

/* Header menu: 8 items (sections + Blog + Kontak + Buat Janji).
   Desktop/tablet: the active item is shown by ONE sliding pill
   (.rsia-nav-indicator, positioned by js/nav-anchor.js) instead of each
   link's own background. Every link keeps identical padding, so nothing
   resizes or shifts when the active item changes. */
@media (min-width: 768px) {
  .main-menu .navigation { position: relative; }
  .main-menu .navigation > li { margin-right: 0; position: relative; z-index: 1; }
  .main-menu .navigation > li > a,
  .main-menu .navigation > li.current > a,
  .main-menu .navigation > li.current-menu-item > a {
    padding: 38px 13px;
    font-size: 13px;
    background: none;
    border-radius: 0;
    /* template animated "all" (incl. padding) over 500ms -> jumpy menu */
    -webkit-transition: color .3s ease;
    transition: color .3s ease;
  }
  .main-menu .navigation > li.current > a,
  .main-menu .navigation > li.current:hover > a { color: #fff; }

  .rsia-nav-indicator {
    position: absolute;
    left: 0; top: 0;
    z-index: 0;
    height: 38px;
    border-radius: 999px;
    background: #f3943a;
    box-shadow: 0 8px 18px -8px rgba(243, 148, 58, .9);
    pointer-events: none;
    opacity: 0;
    will-change: transform, width;
  }
  .rsia-nav-indicator.is-visible { opacity: 1; }
  .rsia-nav-indicator.is-animated {
    transition: transform .4s cubic-bezier(.4, 0, .2, 1),
                width .4s cubic-bezier(.4, 0, .2, 1),
                opacity .2s ease;
  }

  /* "Buat Janji" keeps its own outlined / filled pill */
  .main-menu .navigation > li.nav-appointment > a {
    padding: 5px 16px;
    margin-left: 8px;
    border: 2px solid #f3943a;
    border-radius: 25px;
    color: #f3943a;
    -webkit-transition: background .3s ease, color .3s ease;
    transition: background .3s ease, color .3s ease;
  }
  .main-menu .navigation > li.nav-appointment:hover > a,
  .main-menu .navigation > li.nav-appointment.current > a { background: #f3943a; color: #fff; }
}
@media (min-width: 768px) and (max-width: 1199px) {
  .main-menu .navigation > li > a,
  .main-menu .navigation > li.current > a {
    padding-left: 9px;
    padding-right: 9px;
    font-size: 12px;
  }
  .main-menu .navigation > li.nav-appointment > a { margin-left: 4px; padding-left: 12px; padding-right: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .rsia-nav-indicator.is-animated { transition: none; }
}

/* Anchored sections stop below the sticky header */
.rsia-hero, .rsia-doctors, .rsia-about, .rsia-rooms, .rsia-partners { scroll-margin-top: 90px; }

/* Top bar on phones / small tablets: tidy, centred rows.
   Row 1: phone + WhatsApp side by side. Row 2: address.
   (template forced fixed 210px / 270px widths per line -> misaligned) */
@media (max-width: 767px) {
  .header-upper { padding: 8px 0 9px; }
  .header-upper .row > [class*="col-"] { float: none; width: 100%; }
  .header-upper .top-left {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px 18px;
    margin: 0;
    padding: 0;
  }
  .header-upper .top-left li,
  .header-upper .top-left li:first-child {
    display: inline-flex !important;
    align-items: center;
    width: auto !important;
    margin: 0 !important;
    white-space: nowrap;
  }
  .header-upper .top-left li a,
  .header-upper .rsia-top-address a {
    font-size: 13px;
    line-height: 22px;
    margin-left: 6px;
  }
  .header-upper .top-left li i,
  .header-upper .rsia-top-address i { font-size: 13px; }
  .header-upper .rsia-top-address {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2px;
    line-height: 22px;
    white-space: nowrap;
  }
}
@media (max-width: 340px) {
  .header-upper .top-left { gap: 2px 12px; }
  .header-upper .top-left li a,
  .header-upper .rsia-top-address a { font-size: 12px; }
}

/* Tablets (768-991px): menu spans the full container width (750px);
   tighten so all 8 items stay on one line */
@media (min-width: 768px) and (max-width: 991px) {
  .main-menu .navigation > li > a,
  .main-menu .navigation > li.current > a {
    padding-left: 7px;
    padding-right: 7px;
    font-size: 11.5px;
  }
  .main-menu .navigation > li.nav-appointment > a { margin-left: 2px; padding-left: 10px; padding-right: 10px; }
}

/* ---------- Header di ponsel (<768px) ----------
   Logo kiri + tombol menu (hamburger) kanan dalam satu baris; menu
   terbuka di bawahnya selebar layar. Top bar cukup satu baris. */
@media (max-width: 767px) {
  .header-lower .container > .row,
  .sticky-header .container > .row { position: relative; }

  .header-lower .logo,
  .sticky-header .logo {
    width: auto;
    margin: 0;
    padding: 10px 0;
    text-align: left;
  }
  .header-lower .logo img,
  .sticky-header .logo img { height: 52px; }

  /* tombol menu sejajar tengah dengan logo (tinggi baris logo = 52 + 2x10) */
  .main-menu .navbar-header {
    position: absolute;
    top: -72px;
    right: 0;
    left: auto;
    height: 72px;
    display: flex;
    align-items: center;
    padding: 0;
  }
  .main-menu .navbar-header .navbar-toggle {
    margin: 0;
    padding: 10px 10px;
    border-radius: 10px;
  }
  .main-menu .navbar-header .navbar-toggle .icon-bar { width: 20px; border-radius: 2px; }
  .menu-bar, .main-menu { position: relative; }

  /* menu terbuka: kartu oranye di bawah logo */
  .main-menu .navbar-collapse { padding: 0; }
  .main-menu .navbar-collapse > .navigation {
    margin-bottom: 12px !important;
    border: 0;
    border-radius: 12px;
    overflow: hidden;
  }

  /* top bar: telepon + WhatsApp saja, satu baris (alamat ada di footer) */
  .header-upper { padding: 6px 0; }
  .header-upper .rsia-top-address { display: none; }
}
