/* =========================================
   VARIABLES & RESETS
========================================= */
:root {
  /* Colors */
  --color-primary: #0056b3;
  --color-primary-dark: #004085;
  --color-secondary: #e2f0fb;
  --color-accent: #00b4d8;
  --color-text: #333333;
  --color-text-light: #6c757d;
  --color-bg: #f8f9fa;
  --color-bg-light: #ffffff;
  --color-border: #e9ecef;
  
  /* Typography */
  --font-family: 'Inter', sans-serif;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 24px rgba(0,0,0,0.12);
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Layout */
  --max-width: 1200px;
  --header-height: 80px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

ul {
  list-style: none;
}

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

/* =========================================
   TYPOGRAPHY
========================================= */
h1, h2, h3, h4 {
  color: var(--color-primary-dark);
  line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 700; margin-bottom: 1rem; }
h2 { font-size: clamp(2rem, 4vw, 2.5rem); font-weight: 600; margin-bottom: 1rem; }
h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.5rem; }

p {
  margin-bottom: 1rem;
  color: var(--color-text-light);
}

/* =========================================
   UTILITIES
========================================= */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 6rem 0;
}

.section-subtitle {
  display: inline-block;
  color: var(--color-accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.bg-light { background-color: var(--color-bg-light); }
.text-center { text-align: center; }

/* Grid System */
.grid {
  display: grid;
  gap: 2rem;
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 500;
  transition: all var(--transition-normal);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: var(--color-primary);
  color: white;
  box-shadow: 0 4px 15px rgba(0, 86, 179, 0.3);
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 86, 179, 0.4);
}

.btn-secondary {
  background-color: var(--color-secondary);
  color: var(--color-primary-dark);
}

.btn-secondary:hover {
  background-color: #d0e6f9;
  transform: translateY(-2px);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn-block {
  width: 100%;
}

/* Cards */
.card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  border: 1px solid var(--color-border);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

/* =========================================
   NAVIGATION
========================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition-normal), box-shadow var(--transition-normal);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-sm);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary-dark);
}

.logo i {
  color: var(--color-accent);
  font-size: 2rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-weight: 500;
  color: var(--color-text);
  transition: color var(--transition-fast);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-primary);
}

.hamburger {
  display: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--color-primary-dark);
}

/* =========================================
   HERO SECTION
========================================= */
.hero {
  min-height: 100vh;
  padding-top: var(--header-height);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: 2rem;
  padding-right: 2rem;
  gap: 4rem;
}

.badge {
  display: inline-block;
  background: var(--color-secondary);
  color: var(--color-primary-dark);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-item i {
  font-size: 2.5rem;
  color: #ffc107;
}

.stat-item div {
  display: flex;
  flex-direction: column;
}

.stat-item strong {
  font-size: 1.25rem;
  color: var(--color-primary-dark);
}

.stat-item span {
  font-size: 0.875rem;
  color: var(--color-text-light);
}

.hero-image {
  position: relative;
}

.image-wrapper {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4/5;
  display: flex;
  justify-content: center;
  align-items: center;
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.floating-card {
  position: absolute;
  bottom: 2rem;
  left: -2rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  padding: 1rem 1.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 600;
  color: var(--color-primary-dark);
  animation: float 4s ease-in-out infinite;
}

.floating-card i {
  font-size: 2rem;
  color: var(--color-accent);
}

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

/* =========================================
   SOBRE MÍ
========================================= */
.about-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-image img {
  border-radius: 24px;
  box-shadow: var(--shadow-md);
  height: 500px;
  object-fit: cover;
  width: 100%;
}

.feature-list {
  margin-top: 2rem;
  display: grid;
  gap: 1rem;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
  color: var(--color-text);
}

.feature-list i {
  color: var(--color-accent);
  font-size: 1.5rem;
}

/* =========================================
   ESPECIALIDADES
========================================= */
.section-header {
  max-width: 700px;
  margin: 0 auto 4rem auto;
}

.service-card {
  text-align: left;
  border-top: 4px solid transparent;
}

.service-card:hover {
  border-top-color: var(--color-primary);
}

.card-icon {
  width: 60px;
  height: 60px;
  background: var(--color-secondary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.card-icon i {
  font-size: 2rem;
  color: var(--color-primary);
}

/* =========================================
   INFO PACIENTES
========================================= */
.info-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.info-box {
  background: white;
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.info-icon {
  width: 50px;
  height: 50px;
  background: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.info-icon i {
  font-size: 1.5rem;
  color: white;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag {
  background: var(--color-bg);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--color-border);
}

/* =========================================
   UBICACIONES & CONTACTO
========================================= */
.location-card {
  display: flex;
  flex-direction: column;
}

.location-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.status-badge {
  background: #e6f4ea;
  color: #1e8e3e;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
}

.location-details {
  margin-bottom: 2rem;
  flex-grow: 1;
}

.location-details p {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-weight: 500;
  color: var(--color-text);
}

.location-details i {
  color: var(--color-accent);
  font-size: 1.25rem;
  margin-top: 2px;
}

/* =========================================
   FOOTER
========================================= */
.footer {
  background: var(--color-primary-dark);
  color: white;
  padding: 4rem 0 2rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 3rem;
}

.footer .logo {
  color: white;
  margin-bottom: 1rem;
}

.footer p {
  color: rgba(255, 255, 255, 0.7);
}

.footer h4 {
  color: white;
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
}

.footer ul {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer a {
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--transition-fast);
}

.footer a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
}

/* =========================================
   RESPONSIVE DESIGN
========================================= */
@media (max-width: 992px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
    padding-top: calc(var(--header-height) + 2rem);
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .hero-stats {
    justify-content: center;
  }
  
  .about-container {
    grid-template-columns: 1fr;
  }
  
  .about-image {
    order: -1;
  }
  
  .floating-card {
    left: 2rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .nav-links, .nav-btn {
    display: none;
  }
  
  .hamburger {
    display: block;
  }
  
  /* Mobile Menu active state (handled via JS) */
  .nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: white;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border-top: 1px solid var(--color-border);
  }
  
  .hero-actions {
    flex-direction: column;
  }
  
  .hero-stats {
    flex-direction: column;
    align-items: center;
  }
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
