/* ===== BASE & VARIABLES ===== */
:root {
  --color-primary: #0284c7;
  --color-secondary: #0ea5e9;
  --color-accent: #0d9488;
  --color-bg: #0F172A;
  --color-bg-alt: #0B1222;
  --color-card: rgba(255, 255, 255, .08);
  --color-card-solid: #141B2E;
  --color-border: rgba(255, 255, 255, .12);
  --color-text: #F8FAFC;
  --color-muted: #94A3B8;
  --grad-primary: linear-gradient(135deg, #0284c7, #3b82f6);
  --grad-accent: linear-gradient(135deg, #0d9488, #0ea5e9);
  --font-main: 'Poppins', sans-serif;
  --radius-md: 18px;
  --section-y: 5rem;
  --shadow-soft: 0 20px 45px -20px rgba(0, 0, 0, .55);
}

body.light-mode {
  --color-bg: #F8FAFC;
  --color-bg-alt: #EEF1F8;
  --color-card: rgba(15, 23, 42, .05);
  --color-card-solid: #FFFFFF;
  --color-border: rgba(15, 23, 42, .10);
  --color-text: #0F172A;
  --color-muted: #475569;
  --shadow-soft: 0 20px 45px -20px rgba(0, 0, 0, .15);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  transition: background-color .35s, color .35s;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

section {
  padding-block: var(--section-y);
  position: relative;
}

.container {
  max-width: 1240px;
}

/* ===== UTILITIES ===== */
.glass {
  background: var(--color-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: .85rem;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--grad-accent);
  display: inline-block;
}

.section-title {
  font-size: clamp(1.9rem, 3.4vw, 2.8rem);
  font-weight: 600;
  margin-bottom: .75rem;
}

.section-subtitle {
  color: var(--color-muted);
  max-width: 620px;
  margin-bottom: 3rem;
}

/* ===== BUTTONS ===== */
.btn-custom {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .85rem 1.7rem;
  font-weight: 600;
  font-size: .95rem;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: transform .35s, box-shadow .35s;
  text-decoration: none;
}

.btn-custom:active {
  transform: scale(.97);
}

.btn-primary-grad {
  background: var(--grad-primary);
  color: #fff !important;
  box-shadow: 0 10px 30px -8px rgba(2, 132, 199, .65);
}

.btn-primary-grad:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px -8px rgba(2, 132, 199, .8);
  color: #fff !important;
}

.btn-outline-glass {
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--color-border);
  color: var(--color-text) !important;
}

.btn-outline-glass:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, .12);
  color: var(--color-text) !important;
}

.btn-accent-grad {
  background: var(--grad-accent);
  color: #fff !important;
  box-shadow: 0 10px 30px -8px rgba(13, 148, 136, .55);
}

.btn-accent-grad:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px -8px rgba(13, 148, 136, .75);
  color: #fff !important;
}

.btn-sm-custom {
  padding: .55rem 1.2rem;
  font-size: .82rem;
  border-radius: 40px;
}

/* ===== LOADING SCREEN ===== */
#loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  transition: opacity .6s, visibility .6s;
}

#loading-screen.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-ring {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, .1);
  border-top-color: var(--color-primary);
  border-right-color: var(--color-secondary);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loader-text {
  font-weight: 600;
  color: var(--color-muted);
  font-size: .85rem;
  text-transform: uppercase;
}

.loader-text span {
  color: var(--color-text);
}

/* ===== SCROLL PROGRESS ===== */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--grad-primary);
  z-index: 2000;
  transition: width .1s linear;
}

/* ===== NAVIGATION ===== */
.navbar-custom {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.35rem 0;
  transition: all .35s ease;
  background: transparent;
}

.navbar-custom.scrolled {
  padding: .75rem 0;
  background: rgba(15, 23, 42, .95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

body.light-mode .navbar-custom.scrolled {
  background: rgba(248, 250, 252, .95);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

.brand-logo {
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: .5rem;
}

.brand-logo .dot {
  color: var(--color-accent);
}

.nav-link-custom {
  font-weight: 500;
  color: var(--color-text) !important;
  margin-inline: .65rem;
  padding: .4rem .2rem !important;
  opacity: .8;
  transition: opacity .35s;
  position: relative;
}

.nav-link-custom::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 2px;
  width: 0;
  background: var(--grad-primary);
  transition: width .35s;
}

.nav-link-custom:hover,
.nav-link-custom.active {
  opacity: 1;
}

.nav-link-custom:hover::after,
.nav-link-custom.active::after {
  width: 100%;
}

.theme-toggle-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  cursor: pointer;
  transition: transform .35s;
}

.theme-toggle-btn:hover {
  transform: rotate(20deg);
}

.navbar-toggler-custom {
  border: 1px solid var(--color-border);
  background: var(--color-card);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  color: var(--color-text);
  font-size: 1.5rem;
  line-height: 1;
  transition: all 0.3s ease;
}

.navbar-toggler-custom:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.navbar-toggler-custom:focus {
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.3);
  outline: none;
}

@media (max-width: 991.98px) {
  .navbar-collapse {
    position: absolute;
    top: 100%;
    left: 1rem;
    right: 1rem;
    margin-top: .75rem;
    background: var(--color-card-solid);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  }
  .nav-link-custom {
    display: block;
    padding: .7rem .3rem !important;
    margin-inline: 0;
    border-bottom: 1px solid var(--color-border);
  }
  .navbar-nav .nav-item:last-child .nav-link-custom {
    border-bottom: none;
  }
}

/* ===== HERO & REDESIGNED BANNER ===== */
#hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  padding-top: 7rem;
  padding-bottom: 3rem;
  position: relative;
  overflow: hidden;
  background: var(--color-bg);
}

#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 30%, rgba(2, 132, 199, .15), transparent 60%),
              radial-gradient(circle at 80% 70%, rgba(13, 148, 136, .15), transparent 60%);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-greet {
  font-size: 1.1rem;
  color: var(--color-muted);
  margin-bottom: .5rem;
}

.hero-name {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: .5rem;
}

.hero-role-wrap {
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 1.5rem;
  min-height: 2.2rem;
}

#typed-cursor {
  animation: blink 1s step-end infinite;
  color: var(--color-primary);
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero-desc {
  color: var(--color-muted);
  max-width: 550px;
  margin-bottom: 2rem;
}

.hero-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.hero-img-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
}

.hero-img-frame {
  position: relative;
  width: min(360px, 85%);
  aspect-ratio: 1/1;
  border-radius: 30px;
  padding: 6px;
  background: conic-gradient(from 0deg, var(--color-primary), var(--color-accent), var(--color-secondary), var(--color-primary));
  box-shadow: var(--shadow-soft);
}

.hero-img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 25px;
  border: 4px solid var(--color-bg);
  transition: transform .5s ease;
}

.hero-img-frame:hover img {
  transform: scale(1.03);
}

/* ===== CARDS & DETAILS ===== */
.service-card {
  padding: 2.5rem 2rem;
  height: 100%;
  transition: transform .4s, border-color .4s, box-shadow .4s;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-soft);
}

.icon-box {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--grad-primary);
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 20px -6px rgba(2, 132, 199, .6);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.card-desc {
  font-size: .92rem;
  color: var(--color-muted);
}

/* ===== CLINICAL PROCESS SECTION ===== */
.process-step {
  padding: 2rem;
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
  position: relative;
  transition: transform .35s;
}

.process-step:hover {
  transform: translateY(-4px);
}

.step-num {
  font-size: 3rem;
  font-weight: 800;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: absolute;
  right: 1.5rem;
  top: 1rem;
  opacity: .25;
}

/* ===== REVEAL ON SCROLL ===== */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity .8s ease, transform .8s ease;
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ===== FOOTER ===== */
.footer-main {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding-top: 4rem;
  padding-bottom: 2rem;
}

/* ===== PHOTO GALLERY ===== */
.photo-gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  aspect-ratio: 4 / 5;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--color-border);
}

.photo-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s cubic-bezier(.22,.61,.36,1);
}

.photo-gallery-item:hover img {
  transform: scale(1.08);
}

.photo-gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 8, 23, .82) 0%, rgba(2, 8, 23, .15) 45%, transparent 65%);
  pointer-events: none;
}

.photo-gallery-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.4rem 1.3rem 1.1rem;
  color: #fff;
  z-index: 2;
}

.photo-gallery-caption h6 {
  font-weight: 700;
  margin-bottom: .2rem;
  letter-spacing: .01em;
}

.photo-gallery-caption span {
  font-size: .8rem;
  opacity: .88;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.photo-gallery-item.tall {
  aspect-ratio: 4 / 6;
}

/* ===== TESTIMONIAL / TRUST BANNER ===== */
.trust-banner {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  min-height: 280px;
  display: flex;
  align-items: flex-end;
  box-shadow: var(--shadow-soft);
}

.trust-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
}

.trust-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.75) 50%, rgba(15, 23, 42, 0.5) 100%);
}

.trust-banner-content {
  position: relative;
  z-index: 2;
  padding: 2.25rem;
  max-width: 480px;
}

.trust-banner-content h5 {
  color: #fff;
  font-weight: 700;
  margin-bottom: .6rem;
}

.trust-banner-content p {
  color: rgba(255,255,255,.85);
  margin-bottom: 0;
}

.testimonial-card {
  padding: 2.25rem;
  height: 100%;
}

.testimonial-quote-icon {
  font-size: 1.9rem;
  color: var(--color-accent);
  opacity: .55;
  display: block;
  margin-bottom: .75rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin-top: 1.5rem;
}

.testimonial-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-accent);
  flex-shrink: 0;
}

.testimonial-author-name {
  font-weight: 600;
  color: var(--color-text);
  font-size: .92rem;
  margin-bottom: 0;
}

.testimonial-author-meta {
  font-size: .78rem;
  color: var(--color-muted);
}

/* ===== INTERACTIVE WHATSAPP FLOAT ===== */
.wa-float-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  width: 56px;
  height: 56px;
  background-color: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.8rem;
  box-shadow: 0 8px 24px rgba(37, 211, 102, .45);
  cursor: pointer;
  transition: transform .3s;
}

.wa-float-btn:hover {
  transform: scale(1.08) rotate(10deg);
}

.wa-dropdown-menu {
  position: fixed;
  bottom: 95px;
  right: 30px;
  z-index: 1000;
  width: 250px;
  padding: 1.2rem;
  display: none;
  animation: slideUp .3s ease forwards;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== ACCORDION & FAQ OVERRIDES FOR READABILITY ===== */
.accordion-item {
  background: var(--color-card) !important;
  border: 1px solid var(--color-border) !important;
  color: var(--color-text) !important;
}
.accordion-button {
  color: var(--color-text) !important;
  background-color: transparent !important;
}
.accordion-button:not(.collapsed) {
  color: var(--color-accent) !important;
  background-color: rgba(255, 255, 255, .03) !important;
  box-shadow: none !important;
}
.accordion-body {
  color: var(--color-muted) !important;
  background-color: transparent !important;
}
body.light-mode .accordion-button:not(.collapsed) {
  background-color: rgba(0, 0, 0, .02) !important;
}
body.light-mode .accordion-body {
  color: var(--color-muted) !important;
}

/* ===== GENERAL GLASS CARD TEXT READABILITY ===== */
.glass .text-muted {
  color: var(--color-muted) !important;
}
.glass p {
  color: var(--color-text);
}
.glass .font-italic {
  font-style: italic;
  color: var(--color-text) !important;
}
.glass strong {
  color: var(--color-text) !important;
}

/* ===== GLOBAL & FOOTER READABILITY FOR DARK MODE ===== */
body:not(.light-mode) .text-muted,
body:not(.light-mode) .text-white-50 {
  color: var(--color-muted) !important;
}
body:not(.light-mode) a.text-muted:hover {
  color: var(--color-accent) !important;
}
body:not(.light-mode) .footer-main p,
body:not(.light-mode) .footer-main span,
body:not(.light-mode) .footer-main li {
  color: var(--color-muted) !important;
}
body:not(.light-mode) .footer-main a {
  color: var(--color-muted) !important;
}
body:not(.light-mode) .footer-main a:hover {
  color: var(--color-accent) !important;
}
body.light-mode .footer-main p,
body.light-mode .footer-main span,
body.light-mode .footer-main li,
body.light-mode .footer-main a {
  color: var(--color-muted) !important;
}
body.light-mode .footer-main a:hover {
  color: var(--color-primary) !important;
}

/* ===== BLUE TEXT THEME FOR PAGES ===== */
.blue-text-theme p,
.blue-text-theme li,
.blue-text-theme span:not(.badge),
.blue-text-theme .accordion-body,
.blue-text-theme .accordion-button.collapsed {
  color: var(--color-primary) !important;
}
.blue-text-theme .lead {
  color: var(--color-accent) !important;
}
.blue-text-theme .section-title,
.blue-text-theme h2,
.blue-text-theme h3,
.blue-text-theme h4,
.blue-text-theme h5 {
  color: var(--color-accent) !important;
}
.blue-text-theme .glass p,
.blue-text-theme .glass span {
  color: var(--color-primary) !important;
}