:root {
  /* Sistema de diseño */
  --primary: #2a7f62;
  --primary-dark: #1e5e4a;
  --primary-light: #d1eae0;
  --secondary: #f9a825;
  --secondary-dark: #c17900;
  --accent: #e53935;
  --dark: #263238;
  --gray-dark: #455a64;
  --gray-medium: #90a4ae;
  --gray-light: #cfd8dc;
  --light-bg: #f5f7fa;
  --white: #ffffff;
  --black: #000000;
  
  /* Efectos visuales */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 20px rgba(0,0,0,0.1), 0 6px 6px rgba(0,0,0,0.05);
  --transition: all 0.3s ease;
  --transition-bounce: cubic-bezier(0.68, -0.6, 0.32, 1.6);
}

/* ============ RESET Y BASE ============ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background-color: var(--white);
  overflow-x: hidden;
}

/* ============ UTILIDADES ============ */
.container {
  width: min(90%, 1200px);
  margin-inline: auto;
  padding-inline: 15px;
}

.section {
  padding: 5rem 0;
}

.bg-light { background-color: var(--light-bg); }
.bg-dark { 
  background-color: var(--dark);
  color: var(--white);
}

.text-center { text-align: center; }

/* ============ COMPONENTES ============ */

/* ----- Header y Navegación ----- */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: #f5f5f5;
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  transition: var(--transition);
  will-change: transform;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo img {
  height: 45px;
  transition: var(--transition);
  will-change: height;
}

/* Menú principal */
.nav-links {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.nav-link {
  color: var(--dark);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  outline-offset: 3px;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: var(--transition);
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
  width: 100%;
}

/* Menú móvil */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  cursor: pointer;
  z-index: 1001;
  background: transparent;
  border: none;
  padding: 0;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--dark);
  transition: var(--transition);
  transform-origin: center;
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 992px) {
  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0px;
    right: -100%;
    width: 280px;
    height: auto;
    max-height: calc(100vh - 100px);
    background: white;
    border-radius: 0 0 0 12px;
    box-shadow: -5px 5px 25px rgba(0, 0, 0, 0.15);
    flex-direction: column;
    padding: 0;
    gap: 0;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow: hidden;
    margin: 0;
  }

  .nav-links.active {
    right: 0;
    padding-top: 25px;
  }

  .nav-links li {
    width: 100%;
    position: relative;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
  }

  .nav-links.active li {
    opacity: 1;
    transform: translateX(0);
    transition-delay: calc(0.05s * var(--i));
  }

  .nav-links li:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1.5rem;
    right: 1.5rem;
    height: 1px;
    background-color: rgba(0, 0, 0, 0.08);
  }

  .nav-link {
    display: block;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--dark);
    transition: all 0.2s ease;
    text-align: left;
  }

  .nav-link:hover {
    background-color: var(--primary-light);
    color: var(--primary);
    transform: translateX(4px);
  }

  .btn-contacto {
    display: block;
    margin: 0;
    padding: 1rem 1.5rem;
    background-color: var(--secondary);
    color: white !important;
    text-align: center;
    font-weight: 600;
    border-radius: 0;
  }

  .btn-contacto:hover {
    background-color: var(--secondary-dark);
    transform: none;
  }

  #openPrices {
    border-bottom: none;
  }
}

/* ----- Hero Section ----- */
.hero {
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  background: 
    linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.4)),
    url('../images/hero-bg-desktop.jpg') center/cover no-repeat;
  color: var(--white);
  padding-top: 80px;
  will-change: background;
}

.hero-content {
  max-width: 600px;
}

.hero h1 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  margin-bottom: 1rem;
  line-height: 1.2;
  margin-inline: 6%;
}

.hero h1 span {
  color: var(--secondary);
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  margin-bottom: 2rem;
  opacity: 0.9;
  margin-inline: 6%;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  margin-inline: 6%;
}

@media (max-width: 767px) {
  .hero {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.4)), url('../images/hero-bg-mobile.jpg') center/cover no-repeat;
  }
}

/* ----- Cards de Servicios ----- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.service-card {
  background: var(--white);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  text-align: center;
  will-change: transform;
}

.service-card:hover,
.service-card:focus-within {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.service-image {
  width: 100%;
  height: 200px;
  aspect-ratio: 16/9;
  object-fit: cover;
  margin-bottom: 1rem;
  border-radius: 8px 8px 0 0;
}

.service-card h3 {
  margin-bottom: 0.5rem;
  color: var(--primary-dark);
}

.service-card p {
  padding: 0 1rem 1.5rem;
}

/* ----- Equipo ----- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.team-card {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  text-align: center;
  will-change: transform;
}

.team-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.team-card img {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.team-card h3 {
  margin: 1rem 0 0.5rem;
  color: var(--primary);
}

.specialty {
  color: var(--gray-dark);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.bio {
  padding: 0 1rem 1.5rem;
  color: var(--gray-medium);
}

/* ----- Formulario de Citas ----- */
.appointment-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 3rem;
  align-items: center;
}

.appointment-info h2 {
  margin-bottom: 1rem;
  color: var(--primary);
}

.appointment-info p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.benefits-list {
  list-style: none;
  margin: 2rem 0;
}

.benefits-list li {
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.benefits-list i {
  color: var(--primary);
}

.appointment-form {
  background: var(--white);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--gray-light);
  border-radius: 4px;
  font-family: inherit;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

/* ----- Contacto ----- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 3rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.wp.contact-item {
    gap: 0.5rem;
}

.contact-item i {
  font-size: 1.2rem;
  color: var(--secondary);
}

.contact-item a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
  outline-offset: 3px;
}

.contact-item a:hover,
.contact-item a:focus-visible {
  color: var(--secondary);
}

.contact-social {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.caja.contact-social {
    background-color: #bdbdbd0d;
    padding: 7px;
    border-radius: 16px;
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    width: fit-content;
}

.contact-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--white);
  transition: var(--transition);
  will-change: transform;
}

.contact-social a:hover,
.contact-social a:focus-visible {
  background-color: var(--secondary);
  transform: translateY(-3px);
}

.map-container {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  height: 100%;
}

.map-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.btn-map {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background-color: var(--white);
  color: var(--dark);
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.btn-map:hover,
.btn-map:focus-visible {
  background-color: var(--light-bg);
}

/* ----- Footer ----- */
.footer {
  background-color: var(--dark);
  color: var(--white);
  padding: 3rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col {
  margin-bottom: 1.5rem;
}

.footer-col h3 {
  color: var(--white);
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
}

.footer-about {
  margin: 1rem 0;
  opacity: 0.8;
  line-height: 1.6;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a {
  color: var(--gray-light);
  text-decoration: none;
  transition: var(--transition);
  display: inline-block;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--secondary);
  transform: translateX(5px);
}

.footer-bottom {
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.8;
}

/* ----- Botones ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  text-align: center;
  border: none;
  cursor: pointer;
  will-change: transform;
  outline-offset: 3px;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--white);
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background-color: var(--primary-light);
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-contacto {
  background-color: var(--secondary);
  color: var(--white) !important;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 600;
  border: 1px solid var(--secondary-dark);
  transition: var(--transition-bounce);
}

.btn-contacto:hover,
.btn-contacto:focus-visible {
  background-color: var(--secondary-dark);
  transform: scale(1.05);
}

/* ----- WhatsApp Float ----- */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: var(--shadow-lg);
  z-index: 999;
  transition: var(--transition);
  animation: pulse 2s infinite;
  will-change: transform, box-shadow;
}

.whatsapp-float:hover,
.whatsapp-float:focus-visible {
  transform: scale(1.1);
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
  animation: none;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ----- Modales ----- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow: hidden;
  backdrop-filter: blur(2px);
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.3s ease-out;
}

.modal-content {
  background: white;
  border-radius: 12px;
  width: 333px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transform: scale(0.95);
  transition: all 0.3s var(--transition-bounce);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-header {
  padding: 1.25rem;
  background: var(--primary);
  color: white;
  position: sticky;
  top: 0;
  z-index: 10;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  font-size: 1.5rem;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.modal-close:hover,
.modal-close:focus-visible {
  background-color: rgba(255, 255, 255, 0.2);
}

.iframe-container {
  /*flex: 1;
  overflow: auto;*/
  width: 100%;
}

.iframe-container iframe {
  width: 100%;
  height: 100%;
  min-height: 500px;
  border: none;
  display: block;
}

/* Modal de servicios */
#serviceModal {
  position: fixed;
  top: 0; 
  left: 0;
  width: 100vw; 
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1rem;
}

#serviceModal.active {
  display: flex;
}

#serviceModal .modal-content {
  background: white;
  border-radius: 12px;
  max-width: 600px;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

#serviceModal .modal-header {
  background-color: var(--primary);
  color: white;
  padding: 1rem;
  position: relative;
  z-index: 2;
}

#serviceModal .modal-header h2 {
  margin: 0;
  font-size: 1.3rem;
}

#serviceModal .modal-close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  font-size: 1.5rem;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
}

#serviceModal .iframe-container {
  padding: 1rem;
  overflow-y: auto;
}

#serviceModal img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
}

#serviceModal p,
#serviceModal ul {
  color: var(--dark);
  font-size: 0.95rem;
}

#serviceModal ul {
  padding-left: 1.2rem;
  list-style: disc;
}

@media (max-width: 600px) {
  #serviceModal .modal-content {
    max-width: 100%;
    border-radius: 8px;
  }

  #serviceModal img {
    max-height: 180px;
  }
}

/* ----- Títulos de sección ----- */
.section-header {
  text-align: left;
  margin-bottom: 2rem;
}

.fancy-title h2 {
  font-size: clamp(1.8rem, 5vw, 2.2rem);
  color: var(--primary-dark);
  position: relative;
  display: inline-block;
  padding-bottom: 0.5rem;
}

.fancy-title h2::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 4px;
  background-color: #e5e5e5;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
}

.fancy-title h2 .highlight {
  font-weight: 400;
  color: var(--secondary);
}

h3 .highlight {
    font-weight: 400;
}

p .highlight {
    font-weight: 100;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--gray-medium);
  margin-top: 0.5rem;
}

/* ============ MEDIA QUERIES ADICIONALES ============ */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .section {
    padding: 3rem 0;
  }
}

@media (max-width: 480px) {
  .logo img {
    height: 32px;
  }

  .hero {
    min-height: 500px;
    padding-top: 70px;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .service-card,
  .team-card {
    padding: 1.5rem;
  }
}

/* ============ UTILIDADES FINALES ============ */
.no-scroll {
  overflow: hidden;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}







/* ============ ESTILOS PARA EL FORMULARIO ============ */
.error-message {
    color: var(--accent) !important;
    font-size: 0.8rem !important;
    margin-top: 0.3rem !important;
    display: block !important;
}

.success-message {
    background-color: var(--primary-light);
    border-left: 4px solid var(--primary);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
    animation: fadeIn 0.3s ease-out;
}

.success-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.success-content i {
    color: var(--primary);
    font-size: 1.2rem;
}

.success-content p {
    margin: 0;
    color: var(--primary-dark);
}

.form-error-message {
    background-color: #fdecea;
    border-left: 4px solid var(--accent);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
    animation: fadeIn 0.3s ease-out;
}

.error-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.error-content i {
    color: var(--accent);
    font-size: 1.2rem;
}

.error-content p {
    margin: 0;
    color: var(--dark);
}

/* Validación interactiva */
input:invalid, textarea:invalid, select:invalid {
    border-color: #ffebee;
}

input:valid, textarea:valid, select:valid {
    border-color: #e8f5e9;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}