/* ============================================================
   Design system — Scrapbook
   Paleta extraída de Design/src/styles/theme.css
   ============================================================ */

:root {
    --background:        #FFFEF9;
    --foreground:        #1a1a2e;
    --muted-foreground:  #717182;
    --card:              #ffffff;
    --border:            rgba(0,0,0,0.08);

    --lavender:          #E6E0F0;
    --lavender-light:    #F5F3F9;
    --lavender-medium:   #D4CCE5;
    --lavender-dark:     #B8AAD0;
    --yellow:            #FFD966;
    --yellow-light:      #FFF4D1;
    --yellow-bright:     #FFC933;

    --font-serif:  Georgia, 'Times New Roman', serif;
    --font-ui:     system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

    --radius:      0.625rem;
    --shadow-sm:   0 1px 4px rgba(0,0,0,0.06);
    --shadow-md:   0 4px 16px rgba(0,0,0,0.10);
    --shadow-lg:   0 8px 32px rgba(0,0,0,0.13);
}

/* ---- Reset básico ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 17px; /* ligeramente grande para lectura cómoda */
    -webkit-text-size-adjust: 100%;
}

body {
    background: var(--background);
    color: var(--foreground);
    font-family: var(--font-serif);
    line-height: 1.75;
    min-height: 100dvh;
    overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a  { color: inherit; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 0.9rem 1.5rem 0.9rem;
    padding-top: calc(0.9rem + env(safe-area-inset-top));
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.7rem;
}

.header-logo {
    display: inline-block;
    flex-shrink: 0;
}

.header-logo img {
    height: 52px;
    width: auto;
    display: block;
}

.header-date {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    color: var(--foreground);
    letter-spacing: 0.01em;
}

.header-quote-block {
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
}

.header-divider {
    height: 2px;
    border-radius: 99px;
    background: linear-gradient(to right, var(--yellow), var(--lavender-medium));
    margin-bottom: 0.65rem;
    width: 100%;
}

.header-divider--reverse {
    background: linear-gradient(to left, var(--yellow), var(--lavender-medium));
    margin-bottom: 0;
    margin-top: 0.65rem;
}

.header-quote {
    font-family: var(--font-serif);
    font-size: 0.95rem;
    color: var(--muted-foreground);
    font-style: italic;
    line-height: 1.6;
    text-align: center;
    margin: 0;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .header-quote { white-space: normal; }
    .header-quote-block { width: 100%; }
}

.header-quote cite {
    display: block;
    font-style: normal;
    font-size: 0.82rem;
    margin-top: 0.2rem;
    color: var(--lavender-dark);
    white-space: normal;
    text-align: center;
}

/* ============================================================
   NAVBAR (idioma + acciones)
   ============================================================ */
.site-nav {
    background: var(--lavender-light);
    border-bottom: 1px solid var(--lavender-medium);
    padding: 0.5rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-family: var(--font-ui);
    font-size: 0.9rem;
}

.nav-locale a {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 99px;
    border: 1px solid var(--lavender-medium);
    color: var(--muted-foreground);
    text-decoration: none;
    transition: background 0.15s;
}

.nav-locale a.active,
.nav-locale a:hover {
    background: var(--lavender-medium);
    color: var(--foreground);
}

.nav-links {
    margin-left: auto;
    display: flex;
    gap: 0.5rem;
}

.nav-links a {
    padding: 0.3rem 0.75rem;
    border-radius: 99px;
    text-decoration: none;
    color: var(--muted-foreground);
    transition: background 0.15s;
}

.nav-links a:hover { background: var(--lavender-medium); color: var(--foreground); }
.nav-links a.nav-active {
    color: var(--foreground);
    font-weight: 600;
    background: var(--lavender-light);
    box-shadow: inset 0 -2px 0 var(--lavender-dark);
}

/* ============================================================
   FLASHES
   ============================================================ */
.flashes {
    padding: 0 1.25rem;
    margin-top: 0.75rem;
}

.flash {
    padding: 0.7rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    font-family: var(--font-ui);
    font-size: 0.9rem;
}

.flash-success { background: #d4edda; color: #155724; }
.flash-error   { background: #f8d7da; color: #721c24; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
    max-width: 680px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem;
    padding-bottom: calc(2rem + env(safe-area-inset-bottom));
}

/* ============================================================
   TARJETAS SCRAPBOOK
   Base + efecto cinta + ligera rotación
   ============================================================ */
.sc-card {
    position: relative;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    overflow: visible; /* para que la cinta sobresalga */
}

/* Rotaciones alternadas */
.sc-card:nth-child(odd)  { transform: rotate(-0.3deg); }
.sc-card:nth-child(even) { transform: rotate( 0.3deg); }
.sc-card:hover           { transform: rotate(0deg); box-shadow: var(--shadow-md); }

/* ---- Cinta superior ---- */
.sc-tape {
    position: absolute;
    top: -10px;
    width: 72px;
    height: 22px;
    border-radius: 3px;
    opacity: 0.65;
    pointer-events: none;
    z-index: 1;
}

.sc-tape-left  { left: 2.5rem;  background: var(--yellow-light); }
.sc-tape-right { right: 2.5rem; background: var(--lavender-light); }
.sc-tape-center {
    left: 50%;
    transform: translateX(-50%);
    background: var(--yellow-light);
}

/* ---- Cuerpo de la tarjeta ---- */
.sc-card-img img {
    width: 100%;
    max-height: 280px;
    object-fit: cover;
    border-radius: var(--radius) var(--radius) 0 0;
    border: 4px solid #fff;
}

.sc-card-body { padding: 1.25rem 1.25rem 1rem; }

.sc-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.6rem;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: var(--muted-foreground);
}

.sc-badge {
    display: inline-block;
    background: var(--lavender-light);
    color: var(--lavender-dark);
    border-radius: 99px;
    padding: 0.1rem 0.55rem;
    font-size: 0.75rem;
    font-family: var(--font-ui);
}

.sc-badge-featured { background: var(--yellow-light); color: #856404; }

.sc-card-title {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    line-height: 1.4;
    margin-bottom: 0.6rem;
}

.sc-card-title a { text-decoration: none; color: var(--foreground); }
.sc-card-title a:hover { color: var(--lavender-dark); }

.sc-card-excerpt {
    font-family: var(--font-serif);
    font-size: 1rem;
    color: var(--muted-foreground);
    line-height: 1.7;
    margin-bottom: 0.9rem;
}

/* ---- Tipos especiales ---- */

/* nota: fondo lavanda, sin imagen */
.sc-card--nota {
    background: var(--lavender-light);
    border: 2px solid var(--lavender-medium);
}

.sc-card--nota .sc-card-body { padding: 1.75rem 1.5rem; }

.sc-card--nota .sc-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--yellow);
    display: inline-block;
    margin-right: 0.5rem;
}

.sc-card--nota .sc-label {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted-foreground);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.sc-card--nota .sc-quote-text {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    line-height: 1.65;
    margin-bottom: 0.5rem;
}

/* agenda: borde izquierdo amarillo, lista de bullets */
.sc-card--agenda { border-left: 6px solid var(--yellow); }

.sc-agenda-list { list-style: none; padding: 0; }
.sc-agenda-list li {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.4rem 0;
}

.sc-agenda-list li::before {
    content: '';
    width: 8px; height: 8px;
    background: var(--lavender-dark);
    border-radius: 50%;
    margin-top: 0.55rem;
    flex-shrink: 0;
}

/* galeria: grid 2 cols */
.sc-galeria-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.sc-galeria-grid img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: calc(var(--radius) - 4px);
    border: 3px solid #fff;
    box-shadow: var(--shadow-sm);
}

/* momento: layout 2 cols en tablet+ */
@media (min-width: 540px) {
    .sc-card--momento .sc-momento-inner {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0;
    }

    .sc-card--momento .sc-card-img img {
        height: 100%;
        max-height: none;
        border-radius: var(--radius) 0 0 var(--radius);
    }
}

/* ---- Pie de tarjeta ---- */
.sc-card-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* ============================================================
   BOTONES
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 1.1rem;
    border-radius: 99px;
    font-family: var(--font-ui);
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.15s, transform 0.1s;
    min-height: 44px; /* accesibilidad táctil */
    -webkit-tap-highlight-color: transparent;
}

.btn:active { transform: scale(0.96); }

.btn-primary   { background: var(--lavender-dark); color: #fff; }
.btn-primary:hover { opacity: 0.85; }

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--lavender-medium);
    color: var(--foreground);
}
.btn-outline:hover { background: var(--lavender-light); }

.btn-yellow    { background: var(--yellow); color: var(--foreground); }
.btn-yellow:hover { background: var(--yellow-bright); }

.btn-fb        { background: #1877f2; color: #fff; }
.btn-fb:hover  { opacity: 0.88; }

.btn-ghost {
    background: transparent;
    color: var(--muted-foreground);
    padding: 0.4rem 0.65rem;
}
.btn-ghost:hover { background: var(--lavender-light); color: var(--foreground); }

.btn-sm { min-height: 36px; padding: 0.3rem 0.75rem; font-size: 0.82rem; }

/* ============================================================
   NOTA INSPIRACIONAL (sección no-post)
   ============================================================ */
.sc-inspiration {
    background: var(--yellow-light);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-family: var(--font-serif);
    font-size: 0.95rem;
    margin-top: 0.75rem;
}

/* ============================================================
   SECCIÓN DE COMENTARIOS
   ============================================================ */
.comments-section { margin-top: 2rem; }

.comments-title {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--lavender-medium);
}

.comment-item {
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--border);
}

.comment-item--reply {
    margin-left: 1.5rem;
    padding-left: 1rem;
    border-left: 2px solid var(--lavender-medium);
    border-bottom: none;
}

.comment-author {
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 0.9rem;
}

.comment-date {
    font-family: var(--font-ui);
    font-size: 0.78rem;
    color: var(--muted-foreground);
    margin-left: 0.5rem;
}

.comment-body {
    font-family: var(--font-serif);
    margin: 0.4rem 0 0.5rem;
    font-size: 0.97rem;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-ui);
    font-size: 0.82rem;
    color: var(--muted-foreground);
}

.vote-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem 0.4rem;
    border-radius: 6px;
    font-family: var(--font-ui);
    font-size: 0.82rem;
    color: var(--muted-foreground);
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.vote-btn:hover { background: var(--lavender-light); color: var(--foreground); }
.vote-btn.active-like    { color: #28a745; }
.vote-btn.active-dislike { color: #dc3545; }

/* ============================================================
   FORMULARIOS
   ============================================================ */
.form-group { margin-bottom: 1.1rem; }

label {
    display: block;
    font-family: var(--font-ui);
    font-size: 0.88rem;
    color: var(--muted-foreground);
    margin-bottom: 0.3rem;
}

input[type=text],
input[type=email],
input[type=password],
textarea,
select {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 1.5px solid var(--lavender-medium);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: var(--font-serif);
    background: #fff;
    color: var(--foreground);
    transition: border-color 0.15s;
    -webkit-appearance: none;
    appearance: none;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--lavender-dark);
}

textarea { resize: vertical; min-height: 110px; }

/* ============================================================
   LOGIN
   ============================================================ */
.login-wrap {
    max-width: 400px;
    margin: 2.5rem auto;
}

/* ============================================================
   ADMIN TABLE
   ============================================================ */
table  { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
th     { font-family: var(--font-ui); color: var(--muted-foreground); font-weight: 600; }

/* ============================================================
   PAGINACIÓN
   ============================================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding-bottom: 1rem;
}

/* ============================================================
   FAVORITOS / VISTOS — lista compacta
   ============================================================ */
.post-list-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
}

.post-list-thumb img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: calc(var(--radius) - 4px);
    flex-shrink: 0;
}

.post-list-info { flex: 1; min-width: 0; }

.post-list-title {
    font-family: var(--font-serif);
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 0.2rem;
}

.post-list-meta {
    font-family: var(--font-ui);
    font-size: 0.78rem;
    color: var(--muted-foreground);
}
