/*!
 * ponyx-extra.css — styles added after the original template:
 * marquee bar, "What's New" pop-up, footer motto, policy/client/equipment pages,
 * doctor portrait photos and the long address in the top bar.
 * Loaded after style.css on every page.
 */

/* Doctor portrait photos (see README section 2D) */
.doctor-card__avatar img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; display: block; margin: 0 auto; }

/* Long address in the top bar may wrap on phones */
@media (max-width: 780px) {
  .topbar__item { white-space: normal; text-align: left; }
}

/* Policy pages ------------------------------------------------------------ */
.policy { max-width: 860px; margin: 0 auto; }
.policy h2 { margin-bottom: 14px; }
.policy p + p { margin-top: 16px; }
.policy-list { margin: 14px 0 0 24px; list-style: disc; }
ol.policy-list { list-style: decimal; }
.policy-list li { margin-bottom: 10px; padding-left: 4px; }
.policy-quote {
  margin-top: 28px;
  padding: 16px 20px;
  border-left: 4px solid var(--accent);
  background: var(--white);
  font-weight: bold;
}


/* Client list ------------------------------------------------------------- */
.client-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.client-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.client-card h3 { font-size: 1rem; }
.client-card p { margin-top: 4px; font-size: .88rem; color: var(--text-soft); }


/* Scrolling message bar (js/marquee.js) ----------------------------------- */
.marquee {
  background: var(--teal-dark);
  color: var(--white);
  overflow: hidden;
  border-bottom: 3px solid var(--accent);
  font-weight: bold;
  font-size: .95rem;
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee-scroll var(--marquee-duration, 40s) linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group { display: flex; flex: none; min-width: 100vw; justify-content: space-around; }
.marquee__group span {
  padding: 11px 0;
  white-space: nowrap;
}
.marquee__group span::after {
  content: "\25C6";
  color: var(--teal-light);
  margin: 0 28px;
  font-size: .7em;
  vertical-align: middle;
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
/* The message bar keeps scrolling even when the device is set to "reduce motion"
   (the template's global rule would otherwise freeze it). It still pauses on hover. */
@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: marquee-scroll var(--marquee-duration, 40s) linear infinite !important; }
  .marquee:hover .marquee__track { animation-play-state: paused !important; }
}
@media print { .marquee { display: none; } }


/* Footer motto ------------------------------------------------------------ */
.footer-bottom { justify-content: center; text-align: center; }
.footer-motto {
  order: -1;
  flex: 1 0 100%;
  padding: 14px 18px;
  border: 1px solid rgba(145, 200, 61, .55);
  border-radius: var(--radius);
  background: rgba(145, 200, 61, .14);
  color: var(--teal-light);
  font-family: var(--font-head);
  font-size: clamp(1.1rem, 2.6vw, 1.5rem);
  font-weight: bold;
  letter-spacing: .03em;
}


/* What's New pop-up (js/news.js) ------------------------------------------ */
.news-tab {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 450;
  background: var(--accent);
  color: var(--white);
  border: 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 9px;
  cursor: pointer;
  box-shadow: var(--shadow);
  font-family: var(--font-body);
  font-weight: bold;
  font-size: .9rem;
  letter-spacing: .04em;
}
.news-tab:hover { background: var(--accent-dark); }
.news-tab__text { writing-mode: vertical-rl; transform: rotate(180deg); display: block; }
.news-tab__dot {
  position: absolute;
  top: -5px; right: -5px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--teal-light);
  border: 2px solid var(--white);
  animation: news-dot 1.6s ease-in-out infinite;
}
@keyframes news-dot { 0%,100% { transform: scale(1); } 50% { transform: scale(1.3); } }

.news-overlay {
  position: fixed; inset: 0;
  z-index: 950;
  background: rgba(23, 39, 14, .6);
  display: none;
  align-items: center; justify-content: center;
  padding: 16px;
}
.news-overlay.is-open { display: flex; }
body.news-open { overflow: hidden; }
.news-modal {
  background: var(--white);
  width: 100%; max-width: 560px;
  max-height: 86vh;
  display: flex; flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
  border-top: 6px solid var(--accent);
}
.news-modal__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  background: var(--teal-dark);
  color: var(--white);
  padding: 16px 20px;
}
.news-modal__head h2 { color: var(--white); font-size: 1.35rem; margin: 0; }
.news-modal__close {
  background: transparent; border: 0; color: var(--white);
  font-size: 2rem; line-height: 1; cursor: pointer; padding: 0 6px;
}
.news-modal__close:hover { color: var(--teal-light); }
.news-modal__body { padding: 8px 20px 20px; overflow-y: auto; }
.news-item { padding: 16px 0; border-bottom: 1px solid var(--border); }
.news-item:last-child { border-bottom: 0; }
.news-item__tag {
  display: inline-block;
  background: var(--accent); color: var(--white);
  font-size: .72rem; font-weight: bold; letter-spacing: .08em;
  padding: 2px 8px; border-radius: 99px; margin-bottom: 6px;
}
.news-item__date { font-size: .82rem; color: var(--text-soft); margin-bottom: 2px; }
.news-item h3 { font-size: 1.1rem; margin-bottom: 6px; }
.news-item__text { color: var(--text); }
.news-item__link { display: inline-block; margin-top: 10px; font-weight: bold; color: var(--accent); }
.news-item__link:hover { text-decoration: underline; }
@media (max-width: 480px) { .news-tab { padding: 12px 7px; font-size: .8rem; } }
@media print { .news-tab, .news-overlay { display: none !important; } }


/* Logo animation: always on ------------------------------------------------
   The template switches every animation off for visitors whose device has
   "reduce motion" / "show animations" turned off. The logo movement is small
   (a gentle 6% pulse and 3 degree sway), so it is kept running everywhere. */
@media (prefers-reduced-motion: reduce) {
  .logo img { animation: logo-pulse 3.2s ease-in-out infinite !important; }
  .footer-logo { animation: logo-sway 4s ease-in-out infinite !important; }
}


/* Homepage slider: keep the smooth fade between slides even on "reduce motion"
   devices (otherwise the slides would just jump). */
@media (prefers-reduced-motion: reduce) {
  .slide { transition: opacity .8s ease !important; }
}


/* WhatsApp chat button (HTML on every page, js/whatsapp.js sets the number) -- */
.whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: 82px;               /* sits just above the red back-to-top button */
  width: 54px; height: 54px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .28);
  z-index: 440;
  text-decoration: none;
}
.whatsapp-float:hover, .whatsapp-float:focus-visible { background: #1EBE5A; }
.whatsapp-float svg { width: 30px; height: 30px; fill: currentColor; display: block; }
@media print { .whatsapp-float { display: none !important; } }


/* Photos: gallery categories, equipment photos, vertical video ------------- */
.gallery-category { margin: 40px 0 16px; font-size: 1.35rem; border-left: 5px solid var(--accent); padding-left: 12px; }
.gallery-category:first-of-type { margin-top: 0; }
.client-card .equip-photo { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; margin-bottom: 12px; }
.video-player.yt-embed--vertical { aspect-ratio: 9 / 16; width: min(100%, 360px); max-width: 360px; }

/* Gallery tiles: photo fills the whole 4:3 tile */
.gallery-grid .gallery-item img { height: 100%; }


/* Video helpers: sound button and local-preview notice ---------------------- */
.yt-local { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 12px; text-align: center; color: #fff; font-weight: bold; font-size: 1.1rem; background: rgba(0, 0, 0, .5); }
.yt-local small { font-weight: normal; font-size: .8rem; opacity: .9; }
.yt-sound { position: absolute; left: 12px; bottom: 58px; z-index: 3; display: inline-flex; align-items: center; gap: 8px;
  background: rgba(0, 0, 0, .72); color: #fff; border: 2px solid rgba(255, 255, 255, .85); border-radius: 999px;
  padding: 9px 16px; font-family: var(--font-body); font-weight: bold; font-size: .95rem; cursor: pointer; }
.yt-sound:hover, .yt-sound:focus-visible { background: var(--accent); border-color: var(--accent); }


/* Short (vertical) videos in a grid ------------------------------------------ */
.video-grid--shorts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; max-width: 1000px; margin: 0 auto; }
.video-grid--shorts .yt-embed { aspect-ratio: 9 / 16; background-size: cover; background-position: center; }
.video-grid--shorts figcaption { font-size: .9rem; }
@media (max-width: 900px) { .video-grid--shorts { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .video-grid--shorts { grid-template-columns: repeat(2, 1fr); gap: 12px; } }


/* Managing Director's message (About page) ------------------------------------ */
.md-message { margin: 16px 0; padding: 4px 0 4px 18px; border-left: 4px solid var(--accent); font-style: italic; color: var(--text); }
.md-message p + p { margin-top: 12px; }

.md-name { margin-bottom: 4px; }
.md-message + p, .md-message + p + p { margin-top: 12px; }
