/* =========================
   ZINE / BULLETIN SASTRA
========================= */

/* Hero */
.zine-hero {
    padding: 190px 60px 60px;
}

.zine-back-link {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    display: inline-block;
    margin-bottom: 15px;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.zine-back-link:hover {
    text-decoration: underline;
    opacity: 1;
}

.zine-title {
    font-size: 32px;
    font-weight: 700;
    color: #000000;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.zine-excerpt {
    max-width: 700px;
    opacity: 0.9;
    font-size: 1.1rem;
    color: rgba(0, 0, 0, 0.95);
    line-height: 1.6;
}

/* =========================
   CATEGORY TABS & SEARCH
========================= */

.zine-category-tabs {
    background: #fdf8f3;
    padding: 20px 60px;
    border-bottom: none;
}

/* Filter Wrapper */
.zine-filter-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Search Container */
.zine-search-container {
    width: 100%;
    display: flex;
    justify-content: center;
}

.zine-search-form {
    width: 100%;
    max-width: 500px;
}

.zine-search-form .search-input-wrapper {
    display: flex;
    border: 2px solid #ddd;
    border-radius: 30px;
    overflow: hidden;
    background: #fff;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.zine-search-form .search-input-wrapper:focus-within {
    border-color: #d52c2c;
    box-shadow: 0 4px 12px rgba(213, 44, 44, 0.15);
}

.zine-search-form .search-input {
    flex: 1;
    padding: 12px 24px;
    border: none;
    outline: none;
    font-size: 1rem;
}

.zine-search-form .search-input::placeholder {
    color: #999;
}

.zine-search-form .search-btn {
    padding: 12px 20px;
    background: #d52c2c;
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

.zine-search-form .search-btn:hover {
    background: #b02424;
}

/* Category Tabs Container */
.category-tabs-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
}

.category-tab {
    padding: 10px 24px;
    border-radius: 25px;
    text-decoration: none;
    color: #333;
    background: #fff;
    border: 2px solid #ddd;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
}

.category-tab:hover {
    border-color: #d52c2c;
    color: #d52c2c;
    transform: translateY(-2px);
}

.category-tab.active {
    background: #d52c2c;
    border-color: #d52c2c;
    color: #fff;
}

/* =========================
   INDEX PAGE
========================= */

.zine-section {
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    padding: 60px;
}

.zine-card {
    width: 320px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
}

.zine-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.zine-card-cover {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-bottom: 3px solid #000;
    position: relative;
}

.zine-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.zine-card:hover .zine-card-cover img {
    transform: scale(1.05);
}

/* Cover Placeholder */
.zine-cover-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Issue Badge */
.zine-issue-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

.zine-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.zine-card-category {
    display: inline-block;
    background: #d52c2c;
    color: #fff;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    width: fit-content;
}

.zine-card h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.zine-card-excerpt {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    flex: 1;
    line-height: 1.6;
}

/* Zine Meta Info */
.zine-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 10px 0;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
    font-size: 0.85rem;
    color: #666;
}

.zine-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.zine-meta i {
    font-size: 0.9rem;
}

/* Zine Buttons */
.zine-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.zine-card .btn-outline {
    margin-top: auto;
}

.zine-card .btn-outline i {
    margin-right: 6px;
}

.btn-outline {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border: 2px solid;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.btn-primary {
    border-color: #667eea;
    color: #667eea;
}

.btn-primary:hover {
    background: #667eea;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    border-color: #6c757d;
    color: #6c757d;
}

.btn-secondary:hover {
    background: #6c757d;
    color: #fff;
    transform: translateY(-2px);
}

.zine-empty {
    text-align: center;
    width: 100%;
    padding: 60px 20px;
    color: #666;
    font-size: 1.1rem;
}

/* Loading State */
.zine-section.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Card hover effects */
.zine-card:hover h3,
.zine-card:hover .zine-card-excerpt {
    color: #fff !important;
}

.zine-card:hover .zine-card-category {
    background: #fff;
    color: #d52c2c;
}

/* =========================
   DETAIL PAGE
========================= */

.zine-section-detail {
    padding: 40px 80px;
    flex-direction: column;
    align-items: center;
}

.zine-article {
    max-width: 900px;
    width: 100%;
}

.zine-detail-category {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

.zine-cover {
    width: 100%;
    max-width: 600px;
    max-height: 400px;
    height: auto;
    margin: 0 auto 30px;
    display: block;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* PDF Link Section */
.zine-pdf-link {
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px solid #eee;
    margin-bottom: 30px;
}

.zine-pdf-link svg {
    margin-bottom: 20px;
}

.zine-pdf-link p:first-of-type {
    margin: 0 0 20px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #d52c2c;
}

.zine-pdf-link p:nth-of-type(2) {
    margin-bottom: 20px;
    color: #666;
}

.zine-pdf-link .btn-primary {
    background: #d52c2c;
    color: white;
    padding: 15px 30px;
    border-radius: 25px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.zine-pdf-link .btn-primary:hover {
    background: #b02424;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(213, 44, 44, 0.3);
}

/* PDF Viewer (Legacy) */
.zine-pdf-container {
    background: #fff;
    border-radius: 10px;
    border: 3px solid #000;
    box-shadow: 5px 5px 0 #000;
    overflow: hidden;
    margin-bottom: 30px;
}

.zine-pdf-embed {
    display: block;
    border: none;
}

.zine-pdf-fallback {
    display: none;
    padding: 40px;
    text-align: center;
    background: #f8f9fa;
}

.zine-pdf-fallback p {
    margin-bottom: 20px;
    color: #666;
}

/* Show fallback when embed fails */
.zine-pdf-embed:not([src])+.zine-pdf-fallback,
.zine-pdf-container:has(.zine-pdf-embed:empty) .zine-pdf-fallback {
    display: block;
}

/* Content body (legacy) */
.zine-content-body {
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    border: 3px solid #000;
    box-shadow: 5px 5px 0 #000;
    font-size: 17px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 30px;
}

.zine-content-body h1,
.zine-content-body h2,
.zine-content-body h3,
.zine-content-body h4 {
    color: #d52c2c;
    margin: 25px 0 15px;
    font-weight: 700;
}

.zine-content-body h1 {
    font-size: 2rem;
}

.zine-content-body h2 {
    font-size: 1.8rem;
}

.zine-content-body h3 {
    font-size: 1.5rem;
}

.zine-content-body h4 {
    font-size: 1.2rem;
}

.zine-content-body p {
    margin-bottom: 18px;
    text-align: justify;
}

.zine-content-body em {
    font-style: italic;
    color: #000;
}

.zine-content-body ul,
.zine-content-body ol {
    margin-bottom: 1.2rem;
    padding-left: 2rem;
}

.zine-content-body li {
    margin-bottom: 0.5rem;
}

.zine-content-body blockquote {
    border-left: 4px solid #667eea;
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #555;
}

/* Images and figures in content */
.zine-content-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
}

.zine-content-body figure {
    max-width: 100%;
    margin: 20px 0;
    text-align: center;
}

.zine-content-body figure img {
    margin: 0 auto 10px;
}

.zine-content-body figcaption {
    font-size: 14px;
    color: #666;
    font-style: italic;
}

/* WordPress gallery blocks */
.zine-content-body .wp-block-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.zine-content-body .wp-block-gallery figure {
    margin: 0;
}

/* Embedded videos/iframes */
.zine-content-body iframe {
    max-width: 100%;
    margin: 20px auto;
    display: block;
}

/* Footer */
.zine-footer {
    margin-top: 40px;
    padding-top: 2rem;
    border-top: 2px solid #eee;
    display: flex;
    justify-content: flex-start;
    gap: 15px;
    flex-wrap: wrap;
}

.zine-footer .btn-primary {
    background: #d52c2c;
    color: #fff;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    border: 2px solid #d52c2c;
    transition: all 0.3s ease;
}

.zine-footer .btn-primary:hover {
    background: #b02424;
    border-color: #b02424;
    transform: translateY(-2px);
}

.zine-footer .btn-primary i,
.zine-footer .btn-outline i {
    margin-right: 6px;
}

.zine-footer .btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 2px solid #000;
    text-decoration: none;
    color: #ffffff;
    font-weight: 600;
    border-radius: 8px;
    background: #d52c2c;
    transition: all 0.15s ease;
    flex: none;
    /* Override flex:1 dari .btn-outline general */
    width: auto;
    position: relative;
}

.zine-footer .btn-outline:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 4px 4px 0 #d52c2c;
    background: #000;
}

.zine-footer .btn-outline:active {
    transform: translateY(1px);
    box-shadow: 1px 1px 0 #d52c2c;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 992px) {
    .zine-title {
        font-size: 2rem;
    }

    .zine-excerpt {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .zine-hero {
        padding: 100px 20px 40px;
    }

    .zine-category-tabs {
        padding: 15px 20px;
    }

    .category-tab {
        padding: 8px 16px;
        font-size: 13px;
    }

    .zine-section {
        padding: 30px 20px;
    }

    .zine-card {
        width: 100%;
        max-width: 400px;
    }

    /* Index Page Buttons */
    .zine-buttons {
        flex-direction: column;
    }

    .btn-outline {
        width: 100%;
    }

    .zine-meta {
        font-size: 0.8rem;
        gap: 0.75rem;
    }

    /* Detail Page */
    .zine-section-detail {
        padding: 30px 20px;
    }

    .zine-title {
        font-size: 1.75rem;
    }

    .zine-excerpt {
        font-size: 0.95rem;
    }

    .zine-pdf-embed {
        height: 500px;
    }

    .zine-pdf-link {
        padding: 30px 20px;
    }

    .zine-pdf-link svg {
        width: 48px;
        height: 48px;
    }

    .zine-content-body {
        padding: 20px;
        font-size: 1rem;
    }

    .zine-content-body h2 {
        font-size: 1.5rem;
    }

    .zine-content-body h3 {
        font-size: 1.3rem;
    }

    .zine-content-body h4 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .zine-filter-wrapper {
        gap: 1rem;
    }

    .zine-search-form .search-input {
        padding: 10px 18px;
        font-size: 0.9rem;
    }

    .zine-search-form .search-btn {
        padding: 10px 16px;
    }

    .zine-title {
        font-size: 1.5rem;
    }

    .zine-pdf-link {
        padding: 25px 15px;
    }

    .zine-pdf-link .btn-primary {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
}

/* =========================
   ACCESSIBILITY
========================= */

.btn-outline:focus,
.btn-primary:focus,
.zine-search-form .search-btn:focus {
    outline: 3px solid rgba(213, 44, 44, 0.4);
    outline-offset: 2px;
}

/* =========================
   PRINT STYLES
========================= */

@media print {

    .zine-buttons,
    .zine-footer,
    .zine-search-container,
    .category-tabs-container {
        display: none;
    }

    .zine-content-body {
        font-size: 12pt;
        line-height: 1.5;
        border: none;
        box-shadow: none;
    }
}

/* =========================
   CONTRIBUTOR INFO (Zine Detail)
   Copied from blog.css for consistency
========================= */

.article-contributor {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.contributor-avatar {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    background: #f0f0f0;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #f8f8f8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.contributor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contributor-details p {
    margin: 0;
    font-size: 16px;
    color: #555;
    line-height: 1.5;
}

.contributor-by {
    font-weight: 500;
}

.contributor-by a {
    font-weight: 700;
    color: #333;
    text-decoration: none;
    border-bottom: 2px solid #d52c2c;
    transition: all 0.2s ease;
}

.contributor-by a:hover {
    background: #d52c2c;
    color: #fff;
    padding: 0 4px;
    border-radius: 4px;
}