:root {
  --bg-start: #b8e0c2;      /* verde suave */
  --bg-end: #7cc39b;        /* verde medio */
  --text: #ffffff;          /* blanco para contraste */
  --dark: #1f2a24;          /* texto oscuro secundario */
  --accent: #ffffff;        /* botones con borde blanco */
  --shadow: rgba(0,0,0,0.25);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: linear-gradient(135deg, var(--bg-start), var(--bg-end));
  color: var(--text);
  min-height: 100vh;
}

.color-picker {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 20px 0;
}

.color-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  transition: transform .2s ease;
}

.color-circle:hover {
  transform: scale(1.1);
}

.logo {
  width: 120px;
  height: auto;
}

.card {
  width: min(1100px, 92vw);
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 20px;
  box-shadow: 0 20px 40px var(--shadow);
  padding: 32px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  margin: 40px auto;
}

.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ✅ Avatar centrado y recortado */
.avatar {
  position: relative;        /* necesario para posicionar el texto */
  width: 220px;
  height: 220px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(0,0,0,0.25);
  border: 3px solid rgba(255,255,255,0.6);
  margin: 0 auto 20px;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
}

/* Texto condicional dentro del avatar */
.avatar-texto {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  pointer-events: none;
}

.mostrar-texto .avatar-texto {
  display: block;
}

.avatar:not(.mostrar-texto) .avatar-texto {
  display: none;
}

.name {
  font-size: clamp(24px, 3.2vw, 42px);
  font-weight: 700;
  margin: 18px 0 6px;
}

.title {
  font-size: clamp(14px, 1.6vw, 18px);
  letter-spacing: 1px;
  opacity: 0.9;
}

form input,
form textarea {
  width: 100%;
  margin: 10px 0;
  padding: 12px;
  border-radius: 12px;
  border: 2px solid transparent;
  background: rgba(255,255,255,0.08);
  color: var(--text);
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  font-size: 14px;
  transition: border-color 0.2s ease;
  resize: none;
}

form input:focus,
form textarea:focus {
  outline: none;
  border-color: #fff;
}

.social {
  display: flex;
  gap: 14px;
  margin-top: 16px;
}

.social a {
  width: 40px;
  height: 40px;
  border: 1.8px solid var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  text-decoration: none;
  transition: all .2s ease;
  font-weight: 700;
}

.social a:hover {
  background: var(--text);
  color: var(--bg-end);
}

.content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 8px;
  margin-bottom: 22px;
}

.btn {
  padding: 14px 16px;
  border: 2px solid var(--accent);
  color: var(--text);
  background: transparent;
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: .3px;
  cursor: pointer;
  transition: transform .08s ease, background .18s ease, color .18s ease;
}

.btn:hover {
  background: var(--text);
  color: var(--bg-end);
}

.btn:active {
  transform: scale(0.98);
}

.sections {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 14px;
  padding: 18px;
}

.section {
  display: none;
  animation: fade .25s ease;
}

.section.active {
  display: block;
}

.section h2 {
  margin: 0 0 10px;
  font-size: clamp(18px, 2vw, 24px);
  color: #fff;
}

.section ul {
  margin: 0;
  padding-left: 18px;
}

.section li {
  margin: 8px 0;
}

@keyframes fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsivo */
@media (max-width: 820px) {
  .card { grid-template-columns: 1fr; padding: 22px; }
  .avatar { width: 180px; height: 180px; }
  .cta { grid-template-columns: 1fr; }
}
.alert-success {
  background: rgba(0, 128, 0, 0.85);
  color: #fff;
  padding: 12px 18px;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  margin: 20px auto;
  width: min(600px, 90%);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  animation: fade 0.4s ease;
}

/* ✅ Ajustes para pantallas pequeñas (celulares) */
@media (max-width: 600px) {
  .card {
    grid-template-columns: 1fr;   /* una sola columna */
    padding: 20px;
    margin: 20px auto;
  }

  .avatar {
    width: 160px;
    height: 160px;
  }

  .name {
    font-size: 20px;
  }

  .title {
    font-size: 14px;
  }

  .cta {
    grid-template-columns: 1fr;   /* botones uno debajo del otro */
  }

  .btn {
    width: 100%;
    font-size: 16px;
  }

  form input,
  form textarea {
    font-size: 14px;
    padding: 10px;
  }
}

/* ✅ Ajustes para tablets */
@media (min-width: 601px) and (max-width: 1024px) {
  .card {
    grid-template-columns: 220px 1fr; /* columna más angosta para perfil */
    padding: 24px;
    margin: 30px auto;
  }

  .avatar {
    width: 180px;
    height: 180px;
  }

  .name {
    font-size: 24px;
  }

  .title {
    font-size: 16px;
  }

  .btn {
    font-size: 15px;
    padding: 12px 14px;
  }
}

