/* ==========
   Base
   ========== */
* {
  box-sizing: border-box;
}

body.body-romantic {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #FFF7FB; /* rosa muy clarito */
  color: #1F2933;      /* gris muy oscuro */
}

a {
  color: #EC4899;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ==========
   Layout principal
   ========== */

.site-header {
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-title {
  font-weight: 700;
  font-size: 1.5rem;
  color: #111827;
}

.brand-title span {
  color: #EC4899;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.site-nav a {
  color: #4B5563;
}

.site-nav a:hover {
  color: #EC4899;
}

.site-nav-user {
  font-size: 0.8rem;
  color: #6B7280;
}

/* Contenedor principal */
.main-container {
  max-width: 960px;
  margin: 1.5rem auto 2rem auto;
  padding: 0 1rem 0.5rem;
}

/* Footer */
.site-footer {
  text-align: center;
  font-size: 0.8rem;
  color: #9CA3AF;
  padding: 1rem 0 1.5rem;
}

/* ==========
   Hero romántico (home de álbumes)
   ========== */

.hero {
  background: linear-gradient(135deg, #FCE7F3, #E0E7FF);
  border-radius: 1.5rem;
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 1.75rem;
  position: relative;
  overflow: hidden;
}

.hero-left {
  flex: 1 1 240px;
  min-width: 0;
}

.hero-title {
  font-size: 1.9rem;
  font-weight: 800;
  color: #111827;
  margin: 0 0 0.4rem 0;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: #4B5563;
  margin: 0 0 0.9rem 0;
}

.hero-text {
  font-size: 0.95rem;
  color: #374151;
  margin: 0 0 1.1rem 0;
}

.hero-cta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.hero-note {
  font-size: 0.8rem;
  color: #4B5563;
}

/* Lado derecho tipo polaroids */
.hero-right {
  flex: 0 0 260px;
  display: flex;
  justify-content: center;
  position: relative;
}

.polaroid-stack {
  position: relative;
  width: 220px;
  height: 180px;
}

.polaroid {
  position: absolute;
  width: 160px;
  height: 120px;
  background: #ffffff;
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.3);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.polaroid-inner {
  flex: 1;
  border-radius: 0.5rem;
  background: radial-gradient(circle at 30% 20%, #F472B6, #4F46E5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #F9FAFB;
  font-size: 0.8rem;
  text-align: center;
  padding: 0.5rem;
}

.polaroid-caption {
  margin-top: 0.35rem;
  font-size: 0.7rem;
  color: #4B5563;
  text-align: center;
}

.polaroid-1 {
  top: 0;
  left: 10px;
  transform: rotate(-8deg);
}

.polaroid-2 {
  top: 25px;
  right: 0;
  transform: rotate(6deg);
}

.polaroid-3 {
  bottom: 0;
  left: 40px;
  transform: rotate(-2deg);
}

/* Huellita / nota */
.paw-note {
  position: absolute;
  right: 1.25rem;
  bottom: 0.75rem;
  font-size: 0.75rem;
  color: #6D28D9;
  opacity: 0.9;
}

/* Responsive hero */
@media (max-width: 720px) {
  .hero {
    padding: 1.5rem 1.2rem;
  }
  .hero-right {
    flex: 1 1 100%;
    justify-content: flex-start;
  }
  .polaroid-stack {
    transform: scale(0.9);
    transform-origin: left top;
  }
}

/* ==========
   Tarjetas, formularios y botones
   ========== */

.card {
  background: #ffffff;
  border-radius: 1.25rem;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
  margin-bottom: 1.5rem;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 0.75rem 0;
}

.card-subtitle {
  font-size: 0.9rem;
  color: #6B7280;
  margin: 0 0 1rem 0;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  padding: 0.45rem 0.95rem;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.08s ease-out, box-shadow 0.08s ease-out, background-color 0.08s ease-out, border-color 0.08s ease-out;
}

.btn-primary {
  background: #EC4899;
  color: #ffffff;
  box-shadow: 0 10px 25px rgba(236, 72, 153, 0.4);
}

.btn-primary:hover {
  background: #DB2777;
  box-shadow: 0 14px 30px rgba(236, 72, 153, 0.45);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: #4B5563;
  border-color: #E5E7EB;
}

.btn-outline:hover {
  border-color: #EC4899;
  color: #EC4899;
}

/* Formularios */
.form-group {
  margin-bottom: 0.8rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  color: #4B5563;
  margin-bottom: 0.2rem;
}

.form-input,
.form-textarea {
  width: 100%;
  max-width: 420px;
  padding: 0.45rem 0.6rem;
  border-radius: 0.6rem;
  border: 1px solid #E5E7EB;
  font-size: 0.9rem;
  color: #111827;
  background: #FFFFFF;
}

.form-textarea {
  min-height: 60px;
  resize: vertical;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: #EC4899;
  box-shadow: 0 0 0 1px rgba(236, 72, 153, 0.35);
}

/* Mensajes */
.alert-error {
  background: #FEF2F2;
  color: #B91C1C;
  border-radius: 0.75rem;
  padding: 0.65rem 0.8rem;
  font-size: 0.85rem;
  margin-bottom: 0.9rem;
}

/* ==========
   Listado de álbumes
   ========== */

.albums-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.albums-title {
  font-size: 1.3rem;
  font-weight: 700;
}

.albums-subtitle {
  font-size: 0.9rem;
  color: #6B7280;
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.album-card {
  background: #ffffff;
  border-radius: 1.1rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  transition: transform 0.08s ease-out, box-shadow 0.08s ease-out;
}

.album-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.12);
}

.album-card-banner {
  height: 6px;
  background: linear-gradient(90deg, #EC4899, #6366F1);
}

/* Variaciones suaves de color usando nth-child */
.album-grid .album-card:nth-child(3n+1) .album-card-banner {
  background: linear-gradient(90deg, #38BDF8, #6366F1);
}

.album-grid .album-card:nth-child(3n+2) .album-card-banner {
  background: linear-gradient(90deg, #22C55E, #A855F7);
}

.album-card-content {
  padding: 0.9rem 1rem 1rem;
}

.album-card-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: #111827;
}

.album-card-desc {
  font-size: 0.9rem;
  color: #6B7280;
  margin-bottom: 0.5rem;
}

.album-card-meta {
  font-size: 0.8rem;
  color: #9CA3AF;
}

/* ==========
   Login con fondo y efecto cristal
   ========== */

.login-wrapper {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;

  /* Fondo de login con foto y velo rosita.
     Ajusta la opacidad (0.7) si quieres más o menos transparencia. */
  background-image:
    linear-gradient(
      rgba(255, 247, 251, 0.5),
      rgba(255, 247, 251, 0.5)
    ),
    url('img/paris.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.login-card {
  background: rgba(255, 255, 255, 0.4);  /* transparencia del cuadro */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 1.5rem;
  padding: 1.5rem 1.75rem;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.18);
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.login-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin: 0 0 1rem 0;
  text-align: center;
}

/* ==========
   Foto en detalle (vista grande)
   ========== */

.photo-detail {
  max-width: 780px;
  margin: 0 auto 2rem auto;
}

.photo-detail-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0.75rem 0 0.25rem 0;
}

.photo-detail-meta {
  font-size: 0.85rem;
  color: #6B7280;
  margin-bottom: 0.9rem;
}

.photo-detail-image-wrapper {
  border-radius: 1rem;
  overflow: hidden;
  background: #000;
  margin-bottom: 0.75rem;
}

.photo-detail-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.photo-detail-tags {
  margin-top: 0.5rem;
}

.photo-tag-pill {
  display: inline-block;
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: #FCE7F3;
  color: #9D174D;
  margin-right: 0.25rem;
  margin-bottom: 0.2rem;
}

.photo-tag-pill:hover {
  background: #EC4899;
  color: #fff;
}

.photo-detail-tags-empty {
  font-size: 0.85rem;
  color: #9CA3AF;
}

/* ============================================================
   MOSAICO DINÁMICO (Pinterest-style) para album.php
   ============================================================ */

/* Contenedor tipo columnas */
.masonry {
  columns: 1;                  /* móvil */
  column-gap: 1rem;
  width: 100%;
  margin-top: 1.5rem;
}

@media (min-width: 520px) {
  .masonry {
    columns: 2;
  }
}

@media (min-width: 820px) {
  .masonry {
    columns: 3;
  }
}

/* Cada item se comporta como un bloque indivisible */
.masonry-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  width: 100%;
  display: inline-block;
}

/* ESTILOS DE SELECCIÓN MULTIPLE ADAPTADOS */
.masonry-item .photo-card {
  position: relative;
}

.masonry-item .photo-select-checkbox {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 20px;
  height: 20px;
  display: none;
  z-index: 5;
}

#content1.selection-mode .photo-select-checkbox {
  display: block;
}

#content1.selection-mode .photo-card.selected {
  box-shadow: 0 0 0 2px #EC4899, 0 8px 20px rgba(15,23,42,0.15);
}

/* Animación suave al cargar */
.masonry-item {
  opacity: 0;
  transform: translateY(12px);
  animation: masonryFade 0.35s ease forwards;
}

@keyframes masonryFade {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
