:root {
  --primary: #0f328f;
  --primary-light: #565da1;
  --primary-dark: #07153a;
  --secondary: #f8f9fa;
  --accent: #20b2aa; /* Soft teal for contrast/pulse */
  --text-dark: #1f2937;
  --text-muted: #6b7280;
  --bg-light: #ffffff;
  --bg-gray: #f3f4f6;
  
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  --radius-md: 12px;
  --radius-lg: 24px;
}

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

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background-color: var(--bg-light);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

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

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

/* =========================================
   NAVBAR
========================================= */
.site-navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  transition: all 0.3s ease;
  background: transparent;
}
.site-navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 1rem 5%;
  box-shadow: var(--shadow-sm);
}
.site-navbar.scrolled .nav-link {
  color: var(--text-dark);
}
.navbar-brand img {
  height: 45px; /* Adjusting for horizontal logo */
  width: auto;
  transition: all 0.3s ease;
}
/* Filtro para hacer el logo completamente blanco cuando la barra es transparente */
.site-navbar:not(.scrolled) .navbar-brand img {
  filter: brightness(0) invert(1);
}
.site-navbar.scrolled .navbar-brand img {
  height: 38px;
}
.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.nav-link {
  color: #fff;
  font-weight: 500;
  transition: color 0.3s ease;
}
.nav-link:hover {
  color: var(--primary-light);
}

/* Heartbeat CTA Button */
.btn-cta {
  background: var(--primary);
  color: #fff !important;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 15px rgba(15, 50, 143, 0.3);
  transition: all 0.3s ease;
  animation: heartbeat 2.5s infinite;
}
.btn-cta:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(15, 50, 143, 0.4);
}
@keyframes heartbeat {
  0% { transform: scale(1); }
  5% { transform: scale(1.05); }
  10% { transform: scale(1); }
  15% { transform: scale(1.05); }
  20% { transform: scale(1); }
  100% { transform: scale(1); }
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}
.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--primary);
  border-radius: 3px;
}

/* =========================================
   HERO SECTION (Reumatología)
========================================= */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 5% 50px;
  overflow: hidden;
  color: #fff;
  text-align: center;
  background: #000;
}

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translateX(-50%) translateY(-50%);
  z-index: 0;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: 1;
}

/* Filtro frío y desaturado (Dolor, Rigidez) */
.cold-filter {
  background: rgba(15, 50, 143, 0.6);
  backdrop-filter: grayscale(80%) sepia(20%) hue-rotate(180deg);
  opacity: 1;
  animation: fadeOutCold 4s cubic-bezier(0.4, 0, 0.2, 1) 1.5s forwards;
}

/* Filtro cálido de alivio (Amanecer, Sanación) */
.warm-filter {
  background: linear-gradient(135deg, rgba(86, 93, 161, 0.3) 0%, rgba(255, 170, 0, 0.4) 100%);
  opacity: 0;
  animation: sunriseEffect 4s cubic-bezier(0.4, 0, 0.2, 1) 1.5s forwards;
}

@keyframes fadeOutCold {
  0% { opacity: 1; backdrop-filter: grayscale(80%); }
  100% { opacity: 0; backdrop-filter: grayscale(0%); }
}

@keyframes sunriseEffect {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

/* CSS Particles */
.particles {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: 2;
  pointer-events: none;
}
.particle {
  position: absolute;
  background: rgba(255, 215, 0, 0.7); /* Partículas doradas */
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
  border-radius: 50%;
  animation: float-up infinite linear;
}
@keyframes float-up {
  0% { transform: translateY(100vh) scale(0); opacity: 0; }
  20% { opacity: 0.8; }
  80% { opacity: 0.8; }
  100% { transform: translateY(-100px) scale(1); opacity: 0; }
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 800px;
}
.hero-label {
  display: inline-block;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(5px);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.9rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  color: var(--primary-light);
  border: 1px solid rgba(255,255,255,0.2);
}
.hero-content h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  margin-bottom: 1.5rem;
  line-height: 1.1;
  background: linear-gradient(to right, #fff, var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-content p {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  color: rgba(255,255,255,0.8);
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-inline: auto;
}

/* Wave Divider */
.wave-divider {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  z-index: 5;
}
.wave-divider svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 100px;
}
.wave-divider .shape-fill {
  fill: var(--bg-light);
}

/* =========================================
   COMMON SECTIONS
========================================= */
section {
  padding: 100px 5%;
}
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}
.section-label {
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
  display: block;
}
.section-title {
  font-size: 2.5rem;
  color: var(--primary-dark);
}

/* =========================================
   AUTHORITY SECTION
========================================= */
.authority-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}
.auth-image {
  position: relative;
}
.auth-image img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.expert-badge {
  position: absolute;
  bottom: -20px;
  right: -20px;
  background: var(--bg-light);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.expert-badge-icon {
  background: var(--primary-light);
  color: white;
  width: 50px; height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.auth-content h2 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: var(--primary-dark);
}
.auth-subtitle {
  font-size: 1.25rem;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 1.5rem;
}
.auth-bio {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}
.cedulas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.cedula-card {
  background: var(--bg-gray);
  padding: 1rem;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--primary);
}
.cedula-card span {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.cedula-card strong {
  color: var(--primary-dark);
}
.logos-univ {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.logo-tag {
  background: white;
  border: 1px solid #eee;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-dark);
  box-shadow: var(--shadow-sm);
}

/* =========================================
   PRESS SECTION (Logros / Prensa)
========================================= */
.press-section {
  background: var(--bg-gray);
}
.press-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}
.press-card {
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: block;
}
.press-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}
.press-img-placeholder {
  height: 200px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
}
.press-card-body {
  padding: 2rem;
}
.press-card-source {
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.press-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1rem;
  line-height: 1.4;
}
.press-card-readmore {
  color: var(--primary-light);
  font-weight: 600;
  font-size: 0.95rem;
}

/* =========================================
   EXPERIENCE & GALLERY SECTION
========================================= */
.experience-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
}
/* Accordion */
.accordion-item {
  border: 1px solid #eee;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  overflow: hidden;
}
.accordion-header {
  width: 100%;
  padding: 1.5rem;
  background: var(--bg-light);
  border: none;
  text-align: left;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: var(--font-heading);
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.3s ease;
}
.accordion-header:hover {
  background: var(--bg-gray);
}
.accordion-icon {
  transition: transform 0.3s ease;
}
.accordion-item.active .accordion-icon {
  transform: rotate(180deg);
}
.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  background: var(--bg-light);
}
.accordion-content {
  padding: 0 1.5rem 1.5rem;
  color: var(--text-muted);
}
.accordion-content ul {
  list-style: none;
}
.accordion-content li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
}
.accordion-content li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

/* Gallery Masonry */
.gallery-grid {
  column-count: 2;
  column-gap: 1rem;
  display: block;
}
.gallery-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}
.gallery-item:hover img {
  transform: scale(1.05);
}

/* =========================================
   BLOG & TESTIMONIOS (Placeholders)
========================================= */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.blog-card, .testimonio-card {
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

/* =========================================
   FOOTER
========================================= */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.8);
  padding: 80px 5% 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  margin-bottom: 4rem;
}
.footer-col h3 {
  color: #fff;
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}
.footer-col ul {
  list-style: none;
}
.footer-col li {
  margin-bottom: 1rem;
}
.footer-col a {
  color: rgba(255,255,255,0.8);
  transition: color 0.3s;
}
.footer-col a:hover {
  color: var(--primary-light);
}
.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.9rem;
}

/* Floating WhatsApp */
.float-wa {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #25D366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  transition: transform 0.3s ease;
}
.float-wa:hover {
  transform: scale(1.1);
}

/* =========================================
   ANIMATIONS (dr-reveal)
========================================= */
.dr-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.5, 0, 0, 1), transform 0.8s cubic-bezier(0.5, 0, 0, 1);
}
.dr-animate {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   RESPONSIVE
========================================= */
@media (max-width: 992px) {
  .authority-grid, .experience-grid {
    grid-template-columns: 1fr;
  }
  .hamburger {
    display: flex;
  }
  .nav-links {
    position: fixed;
    top: 0; right: -100%;
    width: 300px; height: 100vh;
    background: var(--bg-light);
    flex-direction: column;
    padding: 100px 2rem;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
  }
  .nav-links.active {
    right: 0;
  }
  .nav-link {
    color: var(--text-dark);
  }
  .site-navbar {
    background: rgba(255, 255, 255, 0.95) !important;
  }
  .site-navbar .nav-link {
    color: var(--text-dark) !important;
  }
  .site-navbar:not(.scrolled) .navbar-brand img {
    filter: none;
  }
}
