* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --public-bg: #f3f6fb;
    --public-surface: rgba(255,255,255,0.94);
    --public-surface-strong: #ffffff;
    --public-text: #16233a;
    --public-muted: #64748b;
    --public-line: rgba(184, 197, 220, 0.58);
    --public-primary: #2658cf;
    --public-secondary: #0f8b8d;
    --public-shadow: 0 24px 52px rgba(16, 30, 58, 0.10);
    --public-radius: 24px;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: "Segoe UI", "Trebuchet MS", Arial, sans-serif;
    color: var(--public-text);
    line-height: 1.6;
    background:
        radial-gradient(circle at top left, rgba(58, 122, 255, 0.12), transparent 26%),
        radial-gradient(circle at top right, rgba(15, 139, 141, 0.08), transparent 22%),
        linear-gradient(180deg, #edf2f9 0%, #f7f9fc 44%, #eef3f8 100%);
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 22px;
}

.public-home {
    padding-bottom: 40px;
}

.archive-toolbar,
.edition-card,
.social-share-float {
    border: 1px solid var(--public-line);
    box-shadow: var(--public-shadow);
}

.section-kicker {
    display: inline-block;
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 700;
}

.editions-archive {
    padding: 34px 0 30px;
}

.archive-toolbar {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 18px 20px;
    margin-bottom: 24px;
    border-radius: 24px;
    background: var(--public-surface);
}

.archive-toolbar-copy {
    display: grid;
    gap: 6px;
}

.section-kicker {
    color: #667891;
}

.section-title {
    font-size: clamp(1.7rem, 2.6vw, 2.5rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.archive-toolbar-actions {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.archive-select,
.calendar-select {
    padding: 11px 14px;
    border: 1px solid #d6dfec;
    border-radius: 14px;
    background: #fff;
    color: var(--public-text);
}

.archive-calendar-btn,
.calendar-nav-btn {
    border: none;
    cursor: pointer;
}

.archive-calendar-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--public-primary), #3eaacb);
    color: #fff;
    font-weight: 700;
}

.calendar-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(420px, calc(100vw - 44px));
    padding: 18px;
    border-radius: 22px;
    background: rgba(255,255,255,0.98);
    box-shadow: 0 22px 38px rgba(10, 24, 48, 0.16);
    z-index: 1000;
    border: 1px solid var(--public-line);
}

.calendar-dropdown.is-open {
    display: block;
}

.calendar-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.calendar-nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--public-primary), #3eaacb);
    color: #fff;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    background: #e6edf7;
    border-radius: 16px;
    overflow: hidden;
    padding: 4px;
}

.calendar-head {
    background: #f6f9fd;
    padding: 9px 4px;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: #60718b;
    border-radius: 10px;
}

.editions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
}

.edition-card {
    background: var(--public-surface-strong);
    border-radius: 24px;
    overflow: hidden;
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.edition-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 54px rgba(16, 30, 58, 0.14);
}

.edition-card a {
    display: block;
    color: inherit;
    text-decoration: none;
}

.edition-card-media {
    position: relative;
    padding: 14px 14px 0;
}

.edition-card img {
    width: 100%;
    height: 310px;
    object-fit: cover;
    display: block;
    border-radius: 18px;
    background: #f3f6fb;
}

.edition-badge {
    position: absolute;
    top: 24px;
    left: 24px;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(11, 23, 43, 0.82);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.edition-info {
    padding: 18px 18px 20px;
}

.edition-info h3 {
    font-size: 1.2rem;
    line-height: 1.2;
    margin-bottom: 10px;
    color: var(--public-text);
}

.edition-place,
.edition-date {
    color: var(--public-muted);
    font-size: 14px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.edition-meta {
    color: #50627b;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid rgba(214, 223, 236, 0.8);
}

.views { margin-left: auto; }

.editions-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 46px 20px;
    border-radius: 24px;
    background: rgba(255,255,255,0.92);
    border: 1px dashed rgba(162, 178, 205, 0.72);
    color: var(--public-muted);
}

.editions-empty i {
    font-size: 46px;
    color: #8ea2c1;
    margin-bottom: 12px;
}

.editions-empty p {
    font-size: 1rem;
}

.editions-empty.is-error {
    color: #b24040;
}

.social-share-float {
    position: fixed;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
    padding: 12px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(16px);
}

.social-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    font-size: 18px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.16);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
    cursor: pointer;
    border: none;
}

.social-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 22px rgba(0,0,0,0.22);
}

.social-btn.whatsapp { background: #25D366; }
.social-btn.facebook { background: #1877F2; }
.social-btn.twitter { background: #1DA1F2; }
.social-btn.instagram { background: linear-gradient(45deg, #F58529, #DD2A7B, #8134AF, #515BD4); }
.social-btn.linkedin { background: #0A66C2; }
.social-btn.telegram { background: #0088cc; }
.social-btn.download { background: #27ae60; }

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .archive-toolbar,
    .edition-card {
        border-radius: 22px;
    }

    .archive-toolbar {
        padding: 20px;
    }

    .archive-toolbar {
        align-items: stretch;
    }

    .archive-toolbar-actions {
        width: 100%;
    }

    .archive-select,
    .archive-calendar-btn {
        width: 100%;
        justify-content: center;
    }

    .calendar-toolbar {
        gap: 8px;
    }

    .calendar-toolbar > div {
        display: flex;
        gap: 8px;
        flex: 1 1 auto;
        min-width: 0;
    }

    .calendar-select {
        flex: 1 1 0;
        min-width: 0;
    }

    .calendar-dropdown {
        left: 0;
        right: 0;
        width: 100%;
    }

    .editions-grid {
        grid-template-columns: 1fr;
    }

    .edition-card img {
        height: 260px;
    }

    .social-share-float {
        right: auto;
        left: 50%;
        bottom: 14px;
        top: auto;
        transform: translateX(-50%);
        flex-direction: row;
        gap: 8px;
        padding: 10px 12px;
        max-width: calc(100vw - 24px);
        overflow-x: auto;
        overflow-y: hidden;
        border-radius: 24px;
    }

    .social-btn {
        width: 38px;
        height: 38px;
        font-size: 15px;
        flex: 0 0 auto;
    }
}
