/* ══════════════════════════════════════════
   HGS — Hospital General del Sur
   Paleta: Oxford Blue / Space Cadet / YInMn / Jordy / Lavender
   ══════════════════════════════════════════ */

:root {
  --oxford:      #192338;
  --space-cadet: #1E2E4F;
  --yinmn:       #31487A;
  --jordy:       #8FB3E2;
  --lavender:    #D9E1F1;
  --text:        rgba(217, 225, 241, 0.90);
  --text-dim:    rgba(143, 179, 226, 0.70);
  --text-muted:  rgba(143, 179, 226, 0.42);
  --card-bg:     rgba(30, 46, 79, 0.62);
  --card-border: rgba(143, 179, 226, 0.14);
}

/* ── Reset / Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--oxford);
  color: var(--text);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

/* ── Cursor glow ── */
#cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 500px; height: 500px;
  margin: -250px 0 0 -250px;
  background: radial-gradient(circle, rgba(49, 72, 122, 0.18) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  transition: left 0.06s ease, top 0.06s ease;
}

@media (hover: none) {
  #cursor-glow { display: none; }
}

/* ── Particles ── */
#particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: var(--jordy);
  animation: particle-drift linear infinite;
}

@keyframes particle-drift {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  10%  { opacity: 0.35; }
  90%  { opacity: 0.2; }
  100% { transform: translateY(-120px) translateX(40px); opacity: 0; }
}

/* ── Navbar ── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(25, 35, 56, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--card-border);
}

.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.navbar-logo {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.navbar-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.navbar-name {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--lavender);
  line-height: 1.2;
}

.navbar-sub {
  font-size: 0.72rem;
  font-weight: 300;
  color: var(--text-dim);
  line-height: 1;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-shrink: 0;
}

.navbar-pill {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--jordy);
  background: rgba(49, 72, 122, 0.45);
  border: 1px solid rgba(143, 179, 226, 0.25);
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

/* ── Bandera de Honduras (vector puro, sin filtro SVG) ── */
.hn-flag {
  width: 88px;
  height: auto;
  flex-shrink: 0;
  display: block;
  overflow: visible;
}

@media (max-width: 768px) {
  .hn-flag { width: 72px; }
}

@media (max-width: 520px) {
  .hn-flag { width: 60px; }
  .navbar-pill { display: none; }
}

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 7rem 1.5rem 4rem;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 40%, rgba(49, 72, 122, 0.22) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(30, 46, 79, 0.4) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* Hero text */
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--jordy);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.4rem;
}

.eyebrow-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--jordy);
  animation: eyebrow-blink 2.2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes eyebrow-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

.hero-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 900;
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  line-height: 1.15;
  color: var(--lavender);
  margin-bottom: 1.5rem;
  animation: fade-up 0.7s ease both;
}

.hero-title em {
  font-style: italic;
  color: var(--jordy);
}

.hero-subtitle {
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  font-weight: 300;
  color: var(--text-dim);
  line-height: 1.75;
  margin-bottom: 2rem;
  max-width: 48ch;
  animation: fade-up 0.7s 0.15s ease both;
}

.hero-divider {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  animation: fade-up 0.7s 0.3s ease both;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--yinmn), transparent);
  max-width: 80px;
}

.divider-text {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-muted);
  white-space: nowrap;
  letter-spacing: 0.04em;
}

/* Hero illustration */
.hero-illustration {
  display: flex;
  justify-content: center;
  animation: fade-in 0.9s 0.2s ease both;
}

.main-svg {
  width: 100%;
  max-width: 560px;
  height: auto;
  overflow: visible;
}

/* SVG element animations */
.anim-float-slow {
  animation: svg-float 7s ease-in-out infinite;
  transform-origin: center;
}

.anim-float-rev {
  animation: svg-float 9s ease-in-out infinite reverse;
  transform-origin: center;
}

.anim-sway {
  animation: svg-sway 5s ease-in-out infinite;
  transform-origin: bottom center;
}

.anim-sway-rev {
  animation: svg-sway 6s ease-in-out infinite reverse;
  transform-origin: bottom center;
}

.anim-card-1 {
  animation: svg-float 6s ease-in-out infinite;
  transform-origin: center;
}

.anim-card-2 {
  animation: svg-float 8s 1s ease-in-out infinite reverse;
  transform-origin: center;
}

.anim-cross {
  animation: svg-float 5.5s 0.5s ease-in-out infinite;
  transform-origin: center;
}

.anim-pulse-ring {
  animation: svg-pulse 2.5s ease-out infinite;
  transform-origin: 510px 178px;
}

.anim-pulse-ring-2 {
  animation: svg-pulse 2.5s 0.6s ease-out infinite;
  transform-origin: 510px 178px;
}

.anim-dot-1 { animation: svg-float 5s ease-in-out infinite; }
.anim-dot-2 { animation: svg-float 7s 0.8s ease-in-out infinite reverse; }
.anim-dot-3 { animation: svg-float 6s 1.2s ease-in-out infinite; }

@keyframes svg-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

@keyframes svg-sway {
  0%, 100% { transform: rotate(0deg); }
  25%       { transform: rotate(1.2deg); }
  75%       { transform: rotate(-1.2deg); }
}

@keyframes svg-pulse {
  0%   { transform: scale(1);   opacity: 0.3; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* ── Preview section ── */
.preview {
  padding: 5rem 1.5rem 6rem;
  position: relative;
  z-index: 1;
}

.preview::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--yinmn), transparent);
}

.preview-inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.section-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--jordy);
  margin-bottom: 0.7rem;
}

.section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 900;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--lavender);
  margin-bottom: 3rem;
  line-height: 1.25;
}

/* Cards grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}

.section-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 1.75rem 1.5rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  animation: fade-up 0.55s ease both;
  cursor: default;
}

.section-card:hover {
  transform: translateY(-5px);
  border-color: rgba(143, 179, 226, 0.32);
  background: rgba(30, 46, 79, 0.82);
}

.section-card:focus-visible {
  outline: 2px solid var(--jordy);
  outline-offset: 3px;
}

/* Card icon */
.card-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(49, 72, 122, 0.55);
  color: var(--jordy);
  flex-shrink: 0;
  transition: background 0.25s ease;
}

.card-icon svg {
  width: 22px; height: 22px;
}

.section-card:hover .card-icon {
  background: rgba(49, 72, 122, 0.85);
}

.card-title {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--lavender);
  line-height: 1.3;
}

.card-desc {
  font-size: 0.875rem;
  font-weight: 300;
  color: var(--text-dim);
  line-height: 1.6;
  flex: 1;
}

.card-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--jordy);
  background: rgba(49, 72, 122, 0.4);
  border: 1px solid rgba(143, 179, 226, 0.2);
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  align-self: flex-start;
  margin-top: 0.3rem;
}

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--card-border);
  padding: 2.5rem 1.5rem;
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-logo {
  width: 52px; height: 52px;
  border-radius: 10px;
  object-fit: cover;
  opacity: 0.85;
}

.footer-name {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 1rem;
  color: var(--lavender);
  margin-bottom: 0.15rem;
  text-align: left;
}

.footer-detail {
  font-size: 0.78rem;
  font-weight: 300;
  color: var(--text-muted);
  text-align: left;
}

.footer-gov {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* ── Keyframes ── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding-top: 2rem;
  }

  .hero-text {
    order: 1;
  }

  .hero-illustration {
    order: 0;
    max-width: 380px;
    margin: 0 auto;
    width: 100%;
  }

  .hero-subtitle {
    max-width: 100%;
  }

  .cards-grid {
    grid-template-columns: 1fr 1fr;
  }

  .navbar-name {
    font-size: 0.85rem;
  }

  .navbar-sub { display: none; }
}

@media (max-width: 520px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }

  .navbar-pill {
    font-size: 0.65rem;
    padding: 0.25rem 0.65rem;
  }
}
