/* Reset y normalización */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-text-size-adjust: 100%;
}

:root {
  --primary-color: #9797c9;
  --secondary-color: #dfdaee;
  --button-color: #699a69;
  --text-color: #333;
}

/* Base HTML */
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

/* Font */
.montserrat-regular {
  font-family: "Montserrat", serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}

.montserrat-medium {
  font-family: "Montserrat", serif;
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: normal;
}

.montserrat-semibold {
  font-family: "Montserrat", serif;
  font-optical-sizing: auto;
  font-weight: 600;
  font-style: normal;
}

.montserrat-bold {
  font-family: "Montserrat", serif;
  font-optical-sizing: auto;
  font-weight: 700;
  font-style: normal;
}

/* Base styles - Mobile First */
body {
  margin: 0;
  font-family: "Montserrat", serif;
  color: var(--text-color);
  min-height: 100vh;
  background-color: var(--secondary-color);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: none;
}

@keyframes skeleton-shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

[data-skeleton] {
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  background: var(--secondary-color);
  width: 100%;
  flex-shrink: 0;
  color: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

[data-skeleton]::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.5),
    transparent
  );
  animation: skeleton-shimmer 1.5s infinite;
}

.container {
  width: 100%;
  min-height: 100vh; /* Fallback para navegadores que no soportan dvh */
  min-height: 100svh; /* Se aplicará en navegadores que lo soporten */
  display: flex;
  flex-direction: column;
  padding: 0;
}

.header {
  height: 15vh;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

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

.main-content {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  padding: 0 20px;
}

.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  margin-top: -120px;
  width: 100%;
}

.profile-image {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  border: 4px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.profile-image img {
  width: 100%;
  height: 100%;
}

.about {
  position: absolute;
  top: calc(65px + 1vh);
  right: 0;
  padding: 0.5rem 1rem;
  border-radius: 1rem;
  font-size: 1rem;
  border: none;
  background-color: transparent;
  box-shadow: inset 0 0 0 1px rgba(0.2, 0.2, 0.2, 0.2);
}

h1 {
  font-size: 24px;
  margin: 15px 0 8px;
  text-align: center;
  min-width: 150px;
}

h2 {
  font-size: 15px;
  font-weight: 300;
  margin: 0 0 15px;
  color: #666;
  text-align: center;
  min-width: 200px;
}

.description {
  line-height: 1.5;
  text-align: center;
  width: 100%;
  font-size: 16px;
  margin-top: 4px;
  min-width: 200px;
  min-height: 5rem;
}

.buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.button {
  background-color: var(--button-color);
  color: white;
  padding: 12px;
  border-radius: 6px;
  text-decoration: none;
  transition: opacity 0.3s;
  text-align: center;
  font-weight: 500;
}

.button:hover {
  opacity: 0.9;
}

.virtual-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
}

.atencion-virtual {
  font-weight: 500;
  font-size: 13px !important;
}

.location-icon svg {
  margin-right: 8px;
  margin-top: 0.2rem;
  width: 1.5rem; /* 24px */
  height: 1.5rem; /* 24px */
  color: var(--text-color);
}

/* Loader styles */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.loader-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.error-message {
  background-color: #ffebee;
  color: #c62828;
  padding: 12px;
  border-radius: 6px;
  text-align: center;
}

/* Tablet styles */
@media (min-width: 481px) {
  .container {
    padding: 12px;
    width: calc(100% - 24px);
  }

  .header {
    height: 22vh;
    border-radius: 16px;
  }

  .profile-image {
    width: 135px;
    height: 135px;
  }

  .main-content {
    max-width: 90%;
    margin: 0 auto;
  }

  .button {
    padding: 14px;
  }
}

/* Desktop styles */
@media (min-width: 769px) {
  .container {
    max-width: 600px;
    margin: 0 auto;
  }

  .header {
    height: 25vh;
    border-radius: 20px;
  }

  .profile-image {
    width: 150px;
    height: 150px;
    border: 5px solid white;
  }

  .main-content {
    max-width: 100%;
  }

  h1 {
    font-size: 32px;
  }

  h2 {
    font-size: 19px;
  }

  .button {
    padding: 15px;
  }

  body {
    font-size: 16px;
  }

  .description {
    font-size: 16px;
    min-width: 500px;
  }
}

/* Normalización de zoom para móviles */
@media (max-width: 480px) {
  html {
    zoom: 1;
  }
}
