:root {
  --bg: #f7f7fb;
  --card-bg: #ffffff;
  --accent: #fbbf24;
  --accent-dark: #d97706;
  --shadow: 0 12px 30px rgba(11,15,30,0.08);
  --radius: 14px;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: url("../img/comes.jpg");
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.container {
  perspective: 1000px; /* Necesario para efecto 3D */
}

.card {
  width: 380px;
  height: 480px;
  position: relative;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.card-inner.is-flipped {
  transform: rotateY(180deg);
}

.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backface-visibility: hidden;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card-back {
  transform: rotateY(180deg);
}

/* Formularios */
form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-title {
  text-align: center;
  font-size: 1.6rem;
  margin-bottom: 1rem;
  color: var(--accent-dark);
}

form input {
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  font-size: .95rem;
}

form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(251,191,36,0.3);
}

form button {
  background: var(--accent);
  color: #111;
  border: none;
  padding: 12px;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: background .3s ease;
}

form button:hover {
  background: var(--accent-dark);
  color: #fff;
}

.btn-outline {
  text-align: center;
  padding: 10px;
  border-radius: var(--radius);
  border: 2px solid var(--accent);
  color: var(--accent-dark);
  font-weight: 600;
  transition: all .3s ease;
}

.btn-outline:hover {
  background: var(--accent);
  color: #111;
}

.switch {
  text-align: center;
  font-size: .9rem;
}

.switch a {
  color: var(--accent-dark);
  font-weight: 600;
  text-decoration: none;
}

.switch a:hover {
  text-decoration: underline;
}
/* Tablets y pantallas medianas */
@media (max-width: 992px) {
  .card {
    width: 90%;          /* ocupa casi todo el ancho disponible */
    max-width: 380px;    /* no crece más de lo normal */
    height: auto;        /* altura flexible */
    min-height: 480px;   /* mantiene altura mínima */
  }
  .card-front, .card-back {
    padding: 1.5rem;
  }
}

/* Smartphones grandes */
@media (max-width: 768px) {
  body {
    background-size: cover;
    background-position: center;
    padding: 1rem;
    height: auto;
    min-height: 100vh;
  }
  .card {
    width: 95%;
    max-width: 360px;
    height: auto;
    min-height: 460px;
  }
  .form-title {
    font-size: 1.4rem;
  }
  form input, form button {
    font-size: .9rem;
    padding: 10px;
  }
}

/* Smartphones pequeños */
@media (max-width: 480px) {
  .card {
    width: 100%;
    max-width: 340px;
    height: auto;
    min-height: 440px;
  }
  .card-front, .card-back {
    padding: 1rem;
  }
  .form-title {
    font-size: 1.3rem;
  }
  form input, form button {
    font-size: .85rem;
    padding: 9px;
  }
  .btn-outline {
    font-size: .85rem;
    padding: 9px;
  }
  .switch {
    font-size: .85rem;
  }
}
.container {
  perspective: 1000px;
}

.card {
  width: 380px;
  height: 480px;
  position: relative;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.card-inner.is-flipped {
  transform: rotateY(180deg);
}

.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backface-visibility: hidden;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card-back {
  transform: rotateY(180deg);
}
#nav-home {
  display: inline-block;
  padding: 8px 14px;
  background: #fbbf24;          /* amarillo principal */
  color: #111;                  /* texto oscuro */
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

#nav-home:hover {
  background: #d97706;          /* naranja oscuro al pasar */
  color: #fff;                  /* texto blanco */
  transform: translateY(-2px);  /* efecto de elevación */
}

/* Responsivo: ajusta tamaño en pantallas pequeñas */
@media (max-width: 480px) {
  #nav-home {
    padding: 10px 16px;
    font-size: 0.95rem;
  }
}
