/* Universal Community Services - 2027 Modern Medical Design System */

/* ========== CSS Variables ========== */
:root {
  /* Primary Medical Palette - Soft & Professional */
  --primary-color: #0284c7;      /* Sky 600 */
  --primary-light: #0ea5e9;      /* Sky 500 */
  --primary-soft: #7dd3fc;       /* Sky 300 */
  --primary-wash: #e0f2fe;       /* Sky 100 */
  --primary-mist: #f0f9ff;       /* Sky 50  */
  --primary-dark: #075985;       /* Sky 800 */

  /* Accent - Calm Teal */
  --accent-color: #06b6d4;       /* Cyan 500 */
  --accent-deep: #0891b2;        /* Cyan 600 */
  --accent-soft: #a5f3fc;        /* Cyan 200 */

  /* Complement - Soothing Violet */
  --violet: #8b5cf6;
  --violet-soft: #ddd6fe;

  /* Wellness Mint */
  --mint: #10b981;
  --mint-soft: #a7f3d0;

  /* Warm Sand (contrast) */
  --sand: #fb923c;
  --sand-soft: #fed7aa;

  /* Surfaces */
  --bg-white: #ffffff;
  --bg-light: #f8fafc;
  --bg-cloud: #f1f9ff;
  --bg-paper: #fbfdff;

  /* Glass */
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.55);
  --glass-shadow: 0 8px 32px rgba(2, 132, 199, 0.12);

  /* Text */
  --text-color: #0f172a;
  --text-light: #475569;
  --text-muted: #64748b;

  /* States */
  --border-color: #e2e8f0;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;

  /* Shadows — soft medical */
  --shadow-sm: 0 2px 8px rgba(2, 132, 199, 0.06);
  --shadow-md: 0 8px 24px rgba(2, 132, 199, 0.08);
  --shadow-lg: 0 20px 50px rgba(2, 132, 199, 0.14);
  --shadow-xl: 0 30px 80px rgba(2, 132, 199, 0.22);
  --shadow-glow: 0 0 40px rgba(14, 165, 233, 0.25);

  /* Radii */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  --radius-full: 999px;

  --transition: all 0.45s cubic-bezier(.22,1,.36,1);
  --ease-bounce: cubic-bezier(.34, 1.56, .64, 1);

  /* Gradients */
  --grad-primary: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 50%, #8b5cf6 100%);
  --grad-hero:    linear-gradient(135deg, #e0f2fe 0%, #dbeafe 40%, #ede9fe 100%);
  --grad-card:    linear-gradient(160deg, #ffffff 0%, #f0f9ff 100%);
  --grad-cta:     linear-gradient(120deg, #0284c7 0%, #06b6d4 50%, #8b5cf6 100%);
  --grad-mesh: radial-gradient(1200px 600px at 10% 10%, rgba(14,165,233,.18), transparent 60%),
               radial-gradient(800px  500px at 90% 20%, rgba(139,92,246,.18), transparent 60%),
               radial-gradient(700px  600px at 50% 100%, rgba(6,182,212,.18), transparent 60%);
}

/* ========== Reset & Base ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* Display serif for big headings (clean sans handles body + small UI) */
h1, h2, .hero-3d-title, .section-header h2 {
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background: var(--bg-paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; }

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 900px; margin: 0 auto; padding: 0 24px; }

/* ========== Ambient Background Orbs (Global 3D atmosphere) ========== */
.bg-ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background: var(--bg-paper);
}
.bg-ambient::before,
.bg-ambient::after,
.bg-ambient .orb {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  will-change: transform;
}
.bg-ambient::before {
  width: 520px; height: 520px;
  background: radial-gradient(circle, #7dd3fc, transparent 70%);
  top: -120px; left: -120px;
  animation: orbFloat1 22s ease-in-out infinite;
}
.bg-ambient::after {
  width: 640px; height: 640px;
  background: radial-gradient(circle, #c4b5fd, transparent 70%);
  bottom: -160px; right: -180px;
  animation: orbFloat2 28s ease-in-out infinite;
}
.bg-ambient .orb {
  width: 460px; height: 460px;
  background: radial-gradient(circle, #a5f3fc, transparent 70%);
  top: 40%; left: 55%;
  animation: orbFloat3 24s ease-in-out infinite;
}
@keyframes orbFloat1 {
  0%,100% { transform: translate(0,0) scale(1); }
  50%     { transform: translate(120px, 80px) scale(1.15); }
}
@keyframes orbFloat2 {
  0%,100% { transform: translate(0,0) scale(1); }
  50%     { transform: translate(-100px, -60px) scale(1.2); }
}
@keyframes orbFloat3 {
  0%,100% { transform: translate(0,0) scale(1); }
  50%     { transform: translate(-80px, 60px) scale(0.9); }
}

/* ========== Navigation ========== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: rgba(255,255,255,0.75);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid rgba(14,165,233,0.12);
  z-index: 1000;
  transition: var(--transition);
}
.navbar.scrolled {
  background: rgba(255,255,255,0.88);
  box-shadow: 0 10px 40px rgba(2,132,199,0.08);
}

.nav-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 82px;
  flex-wrap: nowrap;
}

.logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo img { transition: transform 0.5s ease; }
.logo:hover img { transform: rotate(-6deg) scale(1.04); }

.logo-text h1 {
  font-size: 17px;
  font-weight: 800;
  color: var(--primary-dark);
  white-space: nowrap;
  letter-spacing: -.01em;
}
.logo-text span { font-size: 12px; color: var(--text-muted); }

.nav-links {
  display: flex;
  gap: 4px;
  flex-wrap: nowrap;
  white-space: nowrap;
  align-items: center;
}
.nav-links li { flex: 0 0 auto; }

.nav-links a {
  position: relative;
  color: var(--text-light);
  font-weight: 500;
  font-size: 14px;
  padding: 10px 16px;
  border-radius: var(--radius-full);
  transition: var(--transition);
  white-space: nowrap;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 50%; bottom: 4px;
  transform: translateX(-50%);
  width: 0; height: 2px;
  background: var(--grad-primary);
  border-radius: 2px;
  transition: width .35s ease;
}
.nav-links a:hover { color: var(--primary-dark); background: var(--primary-wash); }
.nav-links a.active {
  color: var(--primary-dark);
  background: linear-gradient(180deg, var(--primary-wash), #ffffff);
  box-shadow: inset 0 0 0 1px rgba(14,165,233,0.2);
}
.nav-links a.active::after { width: 40%; }

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: var(--radius-full);
  background: linear-gradient(180deg, #ffffff, var(--primary-wash));
  border: 1px solid rgba(14,165,233,0.25);
  margin-left: 6px;
}
.lang-switch a {
  font-weight: 600;
  font-size: 12px;
  padding: 4px 8px;
  color: var(--text-muted);
  border-radius: var(--radius-full);
}
.lang-switch a.active-lang { color: var(--primary-dark); background: #fff; box-shadow: var(--shadow-sm); }

.mobile-menu-btn {
  display: none;
  background: linear-gradient(135deg, var(--primary-wash), #fff);
  border: 1px solid rgba(14,165,233,0.2);
  border-radius: 12px;
  cursor: pointer;
  padding: 10px;
  color: var(--primary-dark);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 82px; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(20px);
  z-index: 999;
  padding: 20px;
}
.mobile-menu.active { display: block; }
.mobile-menu a {
  display: block;
  padding: 16px 20px;
  color: var(--text-color);
  font-weight: 600;
  border-radius: var(--radius-md);
  margin-bottom: 6px;
  transition: var(--transition);
}
.mobile-menu a:hover, .mobile-menu a.active {
  background: var(--primary-wash);
  color: var(--primary-dark);
}
.mobile-lang {
  margin-top: 20px;
  padding: 12px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  background: var(--primary-wash);
  border-radius: var(--radius-full);
}
.mobile-lang a { padding: 6px 14px; font-weight: 600; }
.mobile-lang a.active-lang { background: #fff; box-shadow: var(--shadow-sm); border-radius: var(--radius-full); }

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 30px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .01em;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  text-align: center;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 35%, rgba(255,255,255,.35) 50%, transparent 65%);
  transform: translateX(-100%);
  transition: transform .7s ease;
  z-index: -1;
}
.btn:hover::before { transform: translateX(100%); }

.btn-primary {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: 0 10px 26px rgba(14,165,233,0.35);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(14,165,233,.45); }

.btn-white {
  background: #ffffff;
  color: var(--primary-dark);
  box-shadow: 0 10px 26px rgba(2,132,199,0.12);
}
.btn-white:hover { transform: translateY(-3px); background: var(--primary-wash); }

.btn-outline {
  background: rgba(255,255,255,0.14);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.55);
  backdrop-filter: blur(10px);
}
.btn-outline:hover { background: rgba(255,255,255,0.22); transform: translateY(-3px); }

.btn-red {
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #fff;
  box-shadow: 0 10px 26px rgba(239,68,68,0.35);
}
.btn-red:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(239,68,68,.45); }

.btn-outline-dark {
  background: transparent;
  color: var(--primary-dark);
  border: 1.5px solid var(--primary-color);
}
.btn-outline-dark:hover { background: var(--primary-color); color: #fff; }

.btn-submit {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 36px;
  border-radius: var(--radius-full);
  font-weight: 700; font-size: 15px;
  background: var(--grad-primary); color: #fff;
  border: none; cursor: pointer; width: 100%;
  box-shadow: 0 12px 30px rgba(14,165,233,.35);
  transition: var(--transition);
}
.btn-submit:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(14,165,233,.5); }

/* ========== Section Headers ========== */
.section-header { text-align: center; margin-bottom: 60px; }

.section-header .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--primary-wash);
  color: var(--primary-dark);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  border: 1px solid rgba(14,165,233,.2);
  margin-bottom: 16px;
}
.section-header .eyebrow::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(14,165,233,.15);
}

.section-header h2 {
  font-size: clamp(30px, 4vw, 44px);
  background: linear-gradient(120deg, #0f172a 10%, #0284c7 55%, #8b5cf6 95%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
}
.section-header p { font-size: 17px; color: var(--text-light); max-width: 640px; margin: 0 auto; }

/* ========== Page Header ========== */
.page-header {
  position: relative;
  padding: 180px 20px 120px;
  text-align: center;
  color: white;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(14,165,233,.92) 0%, rgba(6,182,212,.85) 45%, rgba(139,92,246,.85) 100%),
    radial-gradient(800px 500px at 20% 20%, rgba(255,255,255,.35), transparent 60%),
    radial-gradient(800px 500px at 80% 80%, rgba(255,255,255,.25), transparent 60%);
  background-blend-mode: overlay;
}
.page-header::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 25% 30%, rgba(255,255,255,.12) 0, transparent 35%),
    radial-gradient(circle at 75% 70%, rgba(255,255,255,.1) 0, transparent 40%);
}
.page-header::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -1px;
  height: 80px;
  background: linear-gradient(to bottom, transparent, var(--bg-paper));
}
.page-header-content { position: relative; z-index: 1; }
.page-header h1 {
  font-size: clamp(40px, 6vw, 64px);
  margin-bottom: 18px;
  letter-spacing: -.025em;
  text-shadow: 0 2px 20px rgba(0,0,0,.12);
}
.page-header p {
  font-size: 20px;
  color: rgba(255,255,255,.95);
  max-width: 660px;
  margin: 0 auto;
}

/* Floating 3D capsule decorations for page-header */
.page-header .float-shape {
  position: absolute;
  border-radius: 30% 70% 65% 35% / 40% 40% 60% 60%;
  background: linear-gradient(135deg, rgba(255,255,255,.35), rgba(255,255,255,0));
  backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35), 0 30px 60px rgba(0,0,0,.1);
  animation: blob 14s ease-in-out infinite;
}
.page-header .float-shape.s1 { width: 160px; height: 160px; top: 40px; left: 8%; }
.page-header .float-shape.s2 { width: 120px; height: 120px; bottom: 60px; right: 10%; animation-delay: -4s; }
.page-header .float-shape.s3 { width: 80px;  height: 80px;  top: 60%;   left: 70%;  animation-delay: -8s; }
@keyframes blob {
  0%,100% { transform: translate(0,0) rotate(0deg) scale(1); border-radius: 30% 70% 65% 35% / 40% 40% 60% 60%; }
  50%     { transform: translate(20px,-30px) rotate(180deg) scale(1.06); border-radius: 60% 40% 35% 65% / 65% 35% 60% 40%; }
}

/* ========== Glass Card (core component) ========== */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
}

/* ========== 3D Tilt Card (hover) ========== */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform .25s ease, box-shadow .35s ease;
  will-change: transform;
}
.tilt-card .tilt-inner {
  transform: translateZ(30px);
  transform-style: preserve-3d;
}

/* ========== Cards base ========== */
.card {
  background: var(--grad-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid rgba(14,165,233,.08);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.card-body { padding: 28px; }

/* ========== Forms ========== */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 8px;
  letter-spacing: .02em;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  transition: var(--transition);
  color: var(--text-color);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(14,165,233,0.15);
  transform: translateY(-1px);
}
.form-group textarea { resize: vertical; min-height: 140px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ========== Footer ========== */
footer {
  position: relative;
  color: #e2e8f0;
  padding: 90px 20px 40px;
  background:
    linear-gradient(135deg, #0b1120 0%, #0f172a 45%, #1e293b 100%);
  overflow: hidden;
}
footer::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(600px 300px at 15% 10%, rgba(14,165,233,.18), transparent 60%),
    radial-gradient(500px 300px at 90% 90%, rgba(139,92,246,.18), transparent 60%);
  pointer-events: none;
}
footer .container { position: relative; z-index: 1; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.4fr 1fr;
  gap: 48px;
  margin-bottom: 60px;
}
.footer-about { color: #94a3b8; font-size: 14px; line-height: 1.7; margin-top: 14px; }

.footer-links h3, .footer-contact h3 {
  font-size: 14px;
  margin-bottom: 20px;
  color: #f1f5f9;
  text-transform: uppercase;
  letter-spacing: .14em;
}

.footer-links ul, .footer-contact ul { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a {
  color: #94a3b8;
  font-size: 14px;
  transition: color .3s, transform .3s;
  display: inline-block;
}
.footer-links a:hover { color: #7dd3fc; transform: translateX(3px); }

.footer-contact li {
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 12px; color: #94a3b8; font-size: 14px;
}
.footer-contact a { color: inherit; transition: color .3s; }
.footer-contact a:hover { color: #7dd3fc; }
.footer-contact svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 3px; stroke: #7dd3fc; }

.footer-bottom {
  border-top: 1px solid rgba(148,163,184,0.15);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-bottom p { color: #64748b; font-size: 13px; }

/* ========== Reveal Animation ========== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ========== Utility ========== */
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }  .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 32px; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; } .gap-3 { gap: 24px; } .gap-4 { gap: 32px; }
.hidden { display: none; } .flex { display: flex; } .grid { display: grid; }
.items-center { align-items: center; } .justify-center { justify-content: center; } .justify-between { justify-content: space-between; }

/* ========== Responsive ========== */
@media (max-width: 1200px) {
  .nav-links a { font-size: 13px; padding: 9px 12px; }
  .logo-text h1 { font-size: 15px; }
}

@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  /* The full horizontal nav (8 links + language switch) only fits comfortably
     from ~1025px up; below that it crowds/clips, so switch to the hamburger
     here — covers tablets like Surface (912px) and iPad Pro portrait (1024px). */
  .nav-links { display: none; }
  .mobile-menu-btn { display: block; }
}

@media (max-width: 900px) {
  .page-header { padding: 140px 20px 80px; }
}

@media (max-width: 768px) {
  .page-header h1 { font-size: 36px; }
  .section-header h2 { font-size: 30px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .page-header h1 { font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
