:root {
  --cafe-suave: #e0d3c5;
  --cafe-medio: #c8b7a6;
  --cafe-oscuro: #8a6f5a;
  --crema: #fdf9f3;
  --rosa-suave: #f0e0d6;
  --texto-principal: #6b5446;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Quicksand', sans-serif;
  background: linear-gradient(135deg, var(--crema) 0%, var(--rosa-suave) 100%);
  color: var(--texto-principal);
  line-height: 1.7;
  padding: 0;
  margin: 0;
}

/* === Header con tipografía de ensueño === */
header {
  background: rgba(255, 255, 255, 0.9);
  padding: 2.8rem 1.5rem 2rem;
  text-align: center;
  box-shadow: 0 4px 20px rgba(138, 111, 90, 0.1);
  border-bottom: 1px solid var(--cafe-suave);
  position: relative;
  overflow: hidden;
}

header::before {
  content: "✿";
  position: absolute;
  top: 15px;
  left: 20px;
  font-size: 1.8rem;
  color: var(--cafe-medio);
  opacity: 0.3;
  transform: rotate(-15deg);
}

header::after {
  content: "✿";
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.8rem;
  color: var(--cafe-medio);
  opacity: 0.3;
  transform: rotate(15deg);
}

h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3.2rem;
  color: var(--cafe-oscuro);
  letter-spacing: 2px;
  font-weight: 600;
  margin-bottom: 0.6rem;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.03);
}

.subtitle {
  font-family: 'Quicksand', sans-serif;
  font-size: 1.15rem;
  color: var(--cafe-medio);
  font-weight: 500;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.5;
}

/* === Menú elegante con hover suave === */
nav {
  background: var(--crema);
  padding: 1rem 1.5rem;
  text-align: center;
  border-bottom: 1px solid var(--cafe-suave);
  margin-bottom: 2.5rem;
}

.nav-link {
  color: var(--cafe-oscuro);
  text-decoration: none;
  font-weight: 600;
  margin: 0 1.2rem;
  padding: 0.5rem 1rem;
  border-radius: 30px;
  transition: all 0.3s ease;
  position: relative;
  font-size: 1.05rem;
}

.nav-link:hover,
.nav-link.active {
  background: var(--cafe-oscuro);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(138, 111, 90, 0.2);
}

/* Botón Admin */
.nav-link[href="admin.php"] {
  background: var(--cafe-oscuro);
  color: white !important;
  float: right;
  margin-left: 1.5rem;
}

/* === Contenido principal === */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

/* === Entradas de diario === */
.entries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2.2rem;
}

.entry {
  background: white;
  padding: 2.2rem;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(138, 111, 90, 0.12);
  border-top: 4px solid var(--cafe-suave);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.entry:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px rgba(138, 111, 90, 0.18);
}

.entry::before {
  content: "❝";
  position: absolute;
  top: 15px;
  right: 20px;
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  color: var(--cafe-suave);
  opacity: 0.2;
  line-height: 1;
}

.entry h2 {
  font-family: 'Playfair Display', serif;
  color: var(--cafe-oscuro);
  margin-bottom: 1.2rem;
  font-size: 1.7rem;
  line-height: 1.3;
}

.entry p {
  margin-bottom: 1.1rem;
  font-size: 1.05rem;
  color: var(--texto-principal);
}

.entry.date {
  font-size: 0.9rem;
  color: var(--cafe-medio);
  font-style: italic;
  margin-top: 1rem;
  text-align: right;
  font-weight: 500;
}
/* === Galería de fotos: diseño de diario íntimo === */
.photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 2.8rem;
  justify-items: center;
  padding: 1.5rem 0 3rem;
}

.photo-card {
  width: 220px;
  background: white;
  padding: 18px 16px 30px;
  border-radius: 10px;
  box-shadow: 
    0 10px 25px rgba(138, 111, 90, 0.18),
    0 6px 10px rgba(138, 111, 90, 0.12);
  text-align: center;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='20' viewBox='0 0 100 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 10 Q 25 0 50 10 T 100 10' stroke='%23e0d3c5' fill='none' stroke-width='0.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: bottom 8px center;
  background-size: 80% 20px;
}

.photo-card:hover {
  transform: translateY(-12px) rotate(0.8deg);
  box-shadow: 
    0 16px 35px rgba(138, 111, 90, 0.25),
    0 8px 15px rgba(138, 111, 90, 0.15);
  z-index: 10;
}

.photo-frame {
  width: 100%;
  height: 180px;
  background: var(--crema);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  box-shadow: inset 0 0 0 1px rgba(138, 111, 90, 0.08);
  margin-bottom: 14px;
  overflow: hidden;
  position: relative;
}

.photo-frame::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 253, 243, 0.6);
  z-index: 1;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  transition: transform 0.35s ease;
  filter: brightness(1.02) contrast(1.05);
  z-index: 2;
  position: relative;
}

.photo-card:hover .photo-frame img {
  transform: scale(1.03);
}

.photo-title {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--cafe-oscuro);
  font-weight: 500;
  line-height: 1.4;
  padding: 0 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* === Móvil: ajuste fino === */
@media (max-width: 768px) {
  .photos-grid {
    gap: 2rem;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
  .photo-card {
    width: 180px;
  }
  .photo-frame {
    height: 150px;
  }
}

/* === Sección "Nosotros" con fondo suave === */
.nosotros-content {
  background: white;
  padding: 2.5rem;
  border-radius: 18px;
  box-shadow: 0 6px 20px rgba(138, 111, 90, 0.12);
  max-width: 750px;
  margin: 0 auto;
  border-left: 4px solid var(--rosa-suave);
}

.nosotros-content h2 {
  font-family: 'Playfair Display', serif;
  color: var(--cafe-oscuro);
  margin-bottom: 1.3rem;
  font-size: 2rem;
  text-align: center;
}

.nosotros-content p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 1.2rem;
  text-align: center;
}

.nosotros-content p:last-child {
  margin-bottom: 0;
}

/* === Footer con firma === */
footer {
  text-align: center;
  padding: 2.5rem 1.5rem 1.5rem;
  color: var(--cafe-medio);
  font-size: 0.95rem;
  margin-top: 2rem;
}

footer::before {
  content: "—";
  margin-right: 8px;
  color: var(--cafe-oscuro);
}

/* === Móvil === */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }
  .subtitle {
    font-size: 1rem;
    padding: 0 10px;
  }
  .entries-grid {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }
  .photos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  .nav-link {
    display: inline-block;
    margin: 0.4rem 0.3rem;
    padding: 0.4rem 0.9rem;
    font-size: 1rem;
  }
  .nav-link[href="admin.php"] {
    float: none;
    margin: 0.4rem auto;
    display: block;
    width: fit-content;
  }
}

.photo-title.special::after {
  content: " (solo tú sabes lo que significa)";
  color: var(--cafe-medio);
  font-size: 0.8rem;
  display: block;
  margin-top: 4px;
}