/* =========================================================
   UNITED DIABETES & ENDOCRINE CLINIC — SHARED STYLES
   Design tokens live in tailwind.config (see js/tailwind-config.js)
========================================================= */

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
}

/* ---------- Backgrounds ---------- */

.hero-gradient {
  background:
    radial-gradient(circle at 80% 30%, rgba(15, 159, 168, 0.10), transparent 35%),
    linear-gradient(135deg, #ffffff 0%, #f7fbfc 100%);
}

.section-grid {
  background-image:
    linear-gradient(rgba(15, 159, 168, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 159, 168, 0.035) 1px, transparent 1px);
  background-size: 40px 40px;
}

.page-hero {
  background:
    linear-gradient(180deg, rgba(9, 86, 93, 0.94), rgba(23, 47, 77, 0.92)),
    url('https://images.unsplash.com/photo-1587351021355-a479a299d2f9?auto=format&fit=crop&w=1600&q=70');
  background-size: cover;
  background-position: center;
}

/* ---------- Motion ---------- */

.fade-up {
  animation: fadeUp 0.7s ease-out both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .fade-up, .floating-whatsapp, .pulse-dot { animation: none !important; transition: none !important; opacity: 1 !important; transform: none !important; }
}

.floating-whatsapp {
  animation: pulseSoft 2.5s infinite;
}

@keyframes pulseSoft {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.35); }
  50%      { box-shadow: 0 0 0 12px rgba(34, 197, 94, 0); }
}

.pulse-dot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: currentColor;
  opacity: 0.6;
  animation: pulseDot 1.8s infinite;
}

@keyframes pulseDot {
  0%   { transform: scale(1); opacity: 0.5; }
  70%  { transform: scale(2.4); opacity: 0; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* ---------- Cards & interactive elements ---------- */

.service-card,
.help-pill,
.program-card,
.lab-card,
.article-card,
.gallery-item {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}

.service-card:hover,
.program-card:hover,
.lab-card:hover {
  transform: translateY(-6px);
}

.help-pill:hover {
  transform: translateY(-3px);
  border-color: #0f9fa8;
  background-color: #effafa;
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-item img {
  transition: transform 0.5s ease;
}

/* ---------- Nav dropdown ---------- */

.has-dropdown .dropdown-panel {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.has-dropdown:hover .dropdown-panel,
.has-dropdown:focus-within .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ---------- Accordion (FAQ) ---------- */

.faq-item .faq-icon {
  transition: transform 0.3s ease;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-item .faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

/* ---------- Tabs (gallery / diagnostics) ---------- */

.tab-btn.active {
  background-color: #0f9fa8;
  color: #fff;
}

/* ---------- Modal ---------- */

.modal-overlay {
  background: rgba(9, 22, 33, 0.6);
  backdrop-filter: blur(2px);
}

/* ---------- Utility ---------- */

.text-balance {
  text-wrap: balance;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: #0f9fa8;
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

/* Focus visibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #0f9fa8;
  outline-offset: 2px;
}