/* ==========================================
   VARIABLES Y RESET
========================================== */
:root {
  --primary: #0f172a;        /* Azul Noche Profundo */
  --primary-light: #1e293b;  /* Slate oscuro */
  --accent: #0d9488;         /* Verde Esmeralda Quirúrgico */
  --accent-hover: #0f766e;
  --accent-soft: #f0fdf4;
  --accent-gold: #d97706;    /* Dorado sutil */
  --text-main: #334155;      /* Gris Cuerpo */
  --text-muted: #64748b;     /* Gris Secundario */
  --text-light: #ffffff;
  --bg-light: #f8fafc;       /* Fondo suave */
  --bg-white: #ffffff;
  --gold-accent: #d97706;    /* Dorado sutil para insignias */
  --border-color: #e2e8f0;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 4px 6px -1px rgba(0,0,0,0.05);
  --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 35px -10px rgba(15, 23, 42, 0.12);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-main);
  background-color: var(--bg-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .brand-text {
  font-family: 'Montserrat', sans-serif;
  color: var(--primary);
}

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

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

.section-spacing {
  padding: 96px 0;
}

/* ==========================================
   ANIMACIONES AL HACER SCROLL (SCROLL REVEAL)
========================================== */
.scroll-reveal {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

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

/* ==========================================
   HERO SECTION & NAV
========================================== */
.hero-section {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  padding-bottom: 80px;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.15) 0%, rgba(0,0,0,0) 70%);
  pointer-events: none;
}

/* Top bar & Navigation */
.top-bar, .main-nav {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 60px;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.brand-text {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 1.5px;
  color: #ffffff;
}

.social-links, .nav-socials {
  display: flex;
  gap: 16px;
}

.social-links a, .nav-socials a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.1rem;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.social-links a:hover, .nav-socials a:hover {
  background: var(--accent);
  color: #ffffff;
  transform: translateY(-2px);
  border-color: var(--accent);
}

/* Hero Content Grid */
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

.hero-content h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  color: #ffffff;
  margin-bottom: 24px;
  letter-spacing: -0.5px;
}

.hero-content h1 span {
  display: block;
  color: var(--accent);
  font-size: 1.6rem;
  font-weight: 600;
  margin-top: 12px;
  letter-spacing: 0;
}

.hero-lead {
  font-size: 1.125rem;
  color: #94a3b8;
  margin-bottom: 36px;
  max-width: 540px;
  font-weight: 300;
}

.cta-primary-btn {
  background-color: var(--accent);
  color: #ffffff;
  border: none;
  padding: 18px 36px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 10px 20px -5px rgba(13, 148, 136, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.cta-primary-btn:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 15px 25px -5px rgba(13, 148, 136, 0.5);
}

.hero-image-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-doctor-img {
  width: 100%;
  max-width: 440px;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  object-fit: cover;
}

/* Quick Booking Bar */
.quick-booking-bar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-md);
  padding: 16px 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr) auto;
  gap: 20px;
  align-items: center;
  margin-top: 60px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.booking-field {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-right: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
  border-radius: var(--radius-sm);
}

.booking-field:hover {
  background-color: var(--bg-light);
}

.booking-field:nth-child(3) {
  border-right: none;
}

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

.booking-field label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.booking-field span {
  font-weight: 600;
  color: var(--primary);
  font-size: 0.95rem;
}

.booking-search-btn {
  background: var(--primary);
  color: #ffffff;
  border: none;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: var(--transition);
}

.booking-search-btn:hover {
  background: var(--accent);
  transform: scale(1.05);
}

/* ==========================================
   VALUE STRIP
========================================== */
.value-strip {
  background-color: var(--bg-light);
  padding: 32px 0;
  border-bottom: 1px solid var(--border-color);
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.value-item {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--bg-white);
  padding: 24px 32px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.value-icon-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.value-item h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.value-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ==========================================
   SERVICES SECTION (ESTILO INSIGNIA PRO)
========================================== */
.section-title-center {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 60px auto;
}

.section-title-center h2 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.section-title-center p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 32px;
}

.service-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 36px 28px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  box-shadow: var(--shadow-sm);
}

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

/* Estilo Insignia Grande y Elegante */
.service-icon-wrapper {
  width: 88px;
  height: 88px;
  background: linear-gradient(135deg, #f0fdf4 0%, #e0f2fe 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  transition: var(--transition);
  border: 1px solid rgba(13, 148, 136, 0.15);
  box-shadow: 0 6px 16px -4px rgba(13, 148, 136, 0.12);
  flex-shrink: 0;
}

.service-card:hover .service-icon-wrapper {
  background: var(--accent);
  transform: scale(1.08) rotate(-2deg);
  box-shadow: 0 10px 20px -4px rgba(13, 148, 136, 0.3);
}

.service-icon-wrapper img {
  width: 56px !important;
  height: 56px !important;
  object-fit: contain;
  transition: var(--transition);
}

.service-card:hover .service-icon-wrapper img {
  filter: brightness(0) invert(1);
}

.s-icon {
  font-size: 2.2rem;
  color: var(--accent);
  transition: var(--transition);
}

.service-card:hover .service-icon-wrapper .s-icon {
  color: #ffffff;
}

.service-card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
  font-weight: 700;
  color: var(--primary);
}

.service-card p {
  font-size: 0.925rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.service-card.highlight-card {
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
  border-color: #bbf7d0;
}

/* ==========================================
   PROGRAMAS Y JORNADAS
========================================== */
.jornadas-section {
  background-color: var(--bg-light);
}

.jornadas-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.jornada-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 40px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
}

.jornada-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.jornada-badge {
  position: absolute;
  top: 24px;
  right: 24px;
  background: var(--primary-light);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.jornada-badge.urgent {
  background: var(--gold-accent);
}

.jornada-content h3 {
  font-size: 1.4rem;
  margin-bottom: 16px;
  padding-right: 120px;
}

.jornada-content p {
  color: var(--text-muted);
  margin-bottom: 28px;
  font-size: 0.95rem;
}

.jornada-meta {
  display: flex;
  gap: 20px;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
}

.jornada-meta span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.jornada-meta i {
  color: var(--accent);
}

/* ==========================================
   CONTACTO & FORMULARIO
========================================== */
.contact-box {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  overflow: hidden;
}

.contact-details-side {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #ffffff;
  padding: 60px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.contact-details-side h2 {
  color: #ffffff;
  font-size: 2rem;
  margin-bottom: 20px;
}

.contact-details-side p {
  color: #94a3b8;
  font-size: 1rem;
  font-weight: 300;
  margin-bottom: 40px;
}

.direct-phone {
  display: flex;
  align-items: center;
  gap: 20px;
  background: rgba(255, 255, 255, 0.05);
  padding: 20px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.direct-phone i {
  font-size: 1.8rem;
  color: var(--accent);
}

.direct-phone label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #94a3b8;
}

.direct-phone span {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
}

.contact-form-side {
  padding: 60px 48px;
}

#appointment-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.input-row input,
.input-row select,
.input-row textarea {
  width: 100%;
  padding: 16px 20px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: var(--primary);
  background-color: var(--bg-light);
  transition: var(--transition);
  outline: none;
}

.input-row input:focus,
.input-row select:focus,
.input-row textarea:focus {
  border-color: var(--accent);
  background-color: var(--bg-white);
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.1);
}

.input-row textarea {
  height: 120px;
  resize: vertical;
}

.input-row select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='%2364748b' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
}

.submit-btn-pro {
  background-color: var(--accent);
  color: #ffffff;
  border: none;
  padding: 18px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 10px 20px -5px rgba(13, 148, 136, 0.3);
  margin-top: 10px;
}

.submit-btn-pro:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 15px 25px -5px rgba(13, 148, 136, 0.4);
}

.iti {
  width: 100%;
}

.iti__country-list {
  color: #333;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}

#phone-error {
  color: #ef4444;
  font-size: 0.8rem;
  margin-top: 6px;
  display: none;
  font-weight: 500;
}

/* ==========================================
   FOOTER & FLOATING WHATSAPP
========================================== */
footer {
  background: var(--primary);
  color: #94a3b8;
  padding: 40px 0;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-socials {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 10px;
}

.footer-socials a {
  color: #ffffff;
  font-size: 1.2rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  text-decoration: none;
}

.footer-socials a:hover {
  background: var(--accent);
  transform: translateY(-3px);
}

footer p {
  font-size: 0.875rem;
}

.floating-whatsapp-btn {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 60px;
  height: 60px;
  background-color: #25d366;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
  z-index: 1000;
  transition: var(--transition);
  text-decoration: none;
}

.floating-whatsapp-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 15px 30px rgba(37, 211, 102, 0.6);
}

.floating-whatsapp-btn::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid #25d366;
  animation: pulse 2s infinite;
  top: 0;
  left: 0;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* ==========================================
   RESPONSIVE DESIGN
========================================== */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-lead {
    margin-left: auto;
    margin-right: auto;
  }

  .quick-booking-bar {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .booking-field {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
  }

  .contact-box {
    grid-template-columns: 1fr;
  }

  .jornadas-grid, .value-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero-content h1 {
    font-size: 2.2rem;
  }

  .section-title-center h2 {
    font-size: 1.75rem;
  }

  .contact-details-side, .contact-form-side {
    padding: 36px 24px;
  }
}
