/* Yayınlar Container */
.yayinlar-container {
    margin: 0;
    padding: 10px;
}

/* Filter Bar */
.yayinlar-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.yayinlar-search-box {
    flex: 1;
    min-width: 240px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0 14px;
    height: 46px;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

@media (max-width: 1024px) {
    .yayinlar-search-box {
        min-width: 0;
    }
}

.yayinlar-search-box:focus-within {
    border-color: #153d25;
}

.yayinlar-search-box svg {
    flex-shrink: 0;
    color: #888;
}

.yayinlar-search-input {
    flex: 1;
    width: 100%;
    border: none;
    outline: none;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
    height: 100%;
    background: transparent;
    padding: 0;
}

.yayinlar-filter-dropdown {
    position: relative;
}

.yayinlar-filter-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 46px;
    padding: 0 18px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: #333;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.yayinlar-filter-toggle:hover,
.yayinlar-filter-toggle.open,
.yayinlar-filter-toggle.active {
    border-color: #153d25;
    color: #153d25;
}

.yayinlar-filter-toggle .yayinlar-chevron {
    transition: transform 0.2s ease;
}

.yayinlar-filter-toggle.open .yayinlar-chevron {
    transform: rotate(180deg);
}

.yayinlar-filter-count {
    background: #153d25;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    border-radius: 10px;
    padding: 3px 7px;
}

.yayinlar-filter-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: none;
    padding: 18px;
    min-width: 280px;
    z-index: 50;
}

.yayinlar-filter-panel[hidden] {
    display: none;
}

.yayinlar-filter-group {
    margin-bottom: 14px;
}

.yayinlar-filter-group:last-of-type {
    margin-bottom: 0;
}

.yayinlar-filter-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.yayinlar-filter-select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
    background: #fff;
    box-sizing: border-box;
}

.yayinlar-filter-select:focus {
    outline: none;
    border-color: #153d25;
}

/* Kategoriler - kapalı çoklu seçim dropdown */
.yayinlar-msdropdown {
    position: relative;
}

.yayinlar-msdropdown-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    background-color: #fff;
    cursor: pointer;
    box-sizing: border-box;
    text-align: left;
    color: #333;
}

.yayinlar-msdropdown-trigger:hover,
.yayinlar-msdropdown-trigger.open {
    border-color: #153d25;
}

.yayinlar-msdropdown-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.yayinlar-chevron-sm {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.yayinlar-msdropdown-trigger.open .yayinlar-chevron-sm {
    transform: rotate(180deg);
}

.yayinlar-msdropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    padding: 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 60;
}

.yayinlar-msdropdown-menu[hidden] {
    display: none;
}

.yayinlar-msdropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    color: #333;
    user-select: none;
}

.yayinlar-msdropdown-item:hover {
    background: #f5f5f5;
}

.yayinlar-msdropdown-item input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin: 0;
    border: 1.5px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    position: relative;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.yayinlar-msdropdown-item input[type="checkbox"]:hover {
    border-color: #153d25;
}

.yayinlar-msdropdown-item input[type="checkbox"]:checked {
    background-color: #153d25;
    border-color: #153d25;
}

.yayinlar-msdropdown-item input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.yayinlar-msdropdown-item span {
    padding-left: 5px;
}

.yayinlar-filter-select option {
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 400 !important;
}

.yayinlar-filter-panel-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #eee;
}

.yayinlar-clear-filters {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #555;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    transition: all 0.2s;
}

.yayinlar-clear-filters:hover {
    background: #fdf0f0;
    border-color: #d9534f;
    color: #d9534f;
}

.yayinlar-no-results {
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border: 2px dashed #e5e7eb;
    border-radius: 12px;
}

.yayinlar-no-results svg {
    color: #9ca3af;
    margin-bottom: 16px;
}

.yayinlar-no-results p {
    color: #6b7280;
    font-size: 16px;
    margin: 0;
}

/* Pagination */
.yayinlar-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 30px 0 20px;
    flex-wrap: wrap;
}

.yayinlar-pagination a,
.yayinlar-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #153d25;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    background: #fff;
    gap: 6px;
}

.yayinlar-pagination a:hover {
    background: #153d25;
    color: #fff;
    border-color: #153d25;
    transform: translateY(-2px);
}

.yayinlar-pagination span.current {
    background: #153d25;
    color: #fff;
    border-color: #153d25;
    font-weight: 600;
}

.yayinlar-pagination span.dots {
    border: none;
    background: none;
    color: #999;
}

.yayinlar-pagination a svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.yayinlar-pagination .prev,
.yayinlar-pagination .next {
    font-weight: 600;
}

.yayin-item.hidden {
    display: none;
}

/* Responsive Filter Bar */
@media (max-width: 768px) {
    .yayinlar-container {
        padding: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: visible;
    }

    .yayinlar-filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        width: 100%;
        max-width: 100%;
        margin-bottom: 16px;
        box-sizing: border-box;
    }

    .yayinlar-search-box,
    .yayinlar-filter-dropdown,
    .yayinlar-filter-toggle {
        flex: 1 1 auto;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    .yayinlar-filter-toggle {
        justify-content: center;
    }

    .yayinlar-filter-panel {
        position: static;
        top: auto;
        right: auto;
        left: auto;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        margin-top: 8px;
        box-sizing: border-box;
        box-shadow: none;
    }

    .yayinlar-msdropdown-menu {
        max-height: 180px;
    }

    .yayinlar-search-input,
    .yayinlar-filter-select,
    .yayinlar-msdropdown-trigger {
        font-size: 16px !important;
    }
    
    /* Pagination mobile */
    .yayinlar-pagination {
        gap: 6px;
        margin: 20px 0;
    }
    
    .yayinlar-pagination a,
    .yayinlar-pagination span {
        min-width: 36px;
        height: 36px;
        padding: 0 8px;
        font-size: 13px;
    }
}

/* Yayınlar Grid */
.yayinlar-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
    margin: 20px 0;
}

@media (min-width: 768px) {
    .yayinlar-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .yayinlar-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Yayın Item */
.yayin-item {
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 20px;
    transition: all 0.3s ease;
    background: #fff;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
    position: relative;
}

.yayin-item-content {
    flex: 1;
    cursor: pointer;
}

.yayin-item:hover {
    transform: translateY(-2px);
}

.yayin-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.yayin-item-info {
    flex: 1;
    cursor: pointer;
}

.yayin-item-info:hover {
    opacity: 0.8;
}

.yayin-item-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    align-items: center;
}

.yayin-action-btn {
    background: #153d25;
    background-color: #153d25;
    color: #fff;
    border: 1px solid #153d25;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    text-decoration: none;
    box-sizing: border-box;
}

.yayin-action-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    color: inherit;
}

.yayin-action-btn:is(:hover, :focus-visible),
.yayin-action-btn.view-btn:is(:hover, :focus-visible),
.yayin-action-btn.download-btn:is(:hover, :focus-visible) {
    background: #fff !important;
    background-color: #fff !important;
    background-image: none !important;
    color: #153d25 !important;
    border-color: #ddd !important;
    transform: none;
    box-shadow: none;
}

.yayin-action-btn:is(:hover, :focus-visible) svg,
.yayin-action-btn:is(:hover, :focus-visible) svg * {
    color: #153d25 !important;
    fill: none !important;
    stroke: #153d25 !important;
}

.yayin-action-btn.view-btn {
    background: #153d25;
    background-color: #153d25;
}

.yayin-action-btn.download-btn {
    background: #153d25;
    background-color: #153d25;
}

.yayin-kategori {
    font-weight: bold;
    color: #153d25;
    margin-bottom: 8px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.yayin-baslik {
    font-size: 16px;
    line-height: 1.4;
    color: #333;
}

.yayin-item-info:hover .yayin-baslik {
    color: #153d25;
}

.yayin-meta {
    margin-top: 10px;
    font-size: 12px;
    color: #666;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

.yayin-meta span {
    display: block;
    margin-bottom: 4px;
}

/* Mobil - Butonları alta al */
@media (max-width: 768px) {
    .yayin-item-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .yayin-item-actions {
        width: auto;
        justify-content: flex-start;
        margin-top: 10px;
    }
    
    .yayin-action-btn {
        flex: 0 0 auto;
    }
}

/* Flipbook Modal */
.yayinlar-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    overflow: hidden;
}

.yayinlar-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.yayinlar-modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.yayinlar-modal-header {
    background: #153d25;
    color: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.yayinlar-modal-title {
    font-size: 18px;
    font-weight: bold;
    margin: 0;
    color: #fff;
}

.yayinlar-modal-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.yayinlar-modal-close:hover {
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
}

.yayinlar-modal-body {
    flex: 1;
    overflow: hidden;
    position: relative;
    background: #525659;
}

.yayinlar-pdf-viewer {
    width: 100%;
    height: 100%;
    border: none;
}

/* Flipbook Container */
.yayinlar-flipbook {
    width: 100%;
    height: 100%;
    display: none;
    position: relative;
    overflow: hidden;
}

.yayinlar-flipbook.is-zoomed {
    touch-action: none;
    cursor: grab;
}

.yayinlar-flipbook.is-zoomed .yayinlar-flipbook-wrapper {
    touch-action: none;
}

.yayinlar-flipbook-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

#yayinlar-flipbook-container {
    width: 922px;
    height: 600px;
    margin: 0 auto;
    position: relative;
    transition: transform 0.3s ease;
    will-change: transform;
}

#yayinlar-flipbook-container.is-panning {
    transition: none !important;
    cursor: grabbing;
}

#yayinlar-flipbook-container .page {
    background-color: white;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

#yayinlar-flipbook-container .page img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
}

/* Turn.js Shadow */
#yayinlar-flipbook-container .even {
    background: linear-gradient(to right, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0) 10%);
}

#yayinlar-flipbook-container .odd {
    background: linear-gradient(to left, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0) 10%);
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
    #yayinlar-flipbook-container {
        width: 85vw;
        height: calc(85vw * 0.65);
    }
}

/* Responsive - Mobil (Tek Sayfa) */
@media (max-width: 768px) {
    #yayinlar-flipbook-container {
        width: 90vw;
        height: calc(90vw * 1.4);
    }
    
    .yayinlar-flipbook-wrapper {
        width: 100%;
        height: 100%;
    }
}

/* Flipbook Controls */
.yayinlar-flipbook-controls {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.85);
    padding: 8px 15px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.yayinlar-flipbook-btn {
    background: transparent;
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.yayinlar-flipbook-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.yayinlar-flipbook-btn:hover:not(:disabled) {
    background: rgba(255,255,255,0.15);
    transform: scale(1.1);
}

.yayinlar-flipbook-btn:active:not(:disabled) {
    background: rgba(255,255,255,0.25);
    transform: scale(0.95);
}

.yayinlar-flipbook-btn:disabled {
    color: #666;
    cursor: not-allowed;
    opacity: 0.3;
}

.yayinlar-flipbook-btn.download-btn {
    background: #153d25;
    color: #fff;
}

.yayinlar-flipbook-btn.download-btn:is(:hover, :focus-visible) {
    background: #fff !important;
    background-color: #fff !important;
    color: #153d25 !important;
    border: 1px solid #153d25;
}

.yayinlar-page-info {
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    min-width: 60px;
    text-align: center;
    padding: 0 8px;
    flex-shrink: 0;
}

.yayinlar-controls-divider {
    width: 1px;
    height: 24px;
    background: rgba(255,255,255,0.2);
    flex-shrink: 0;
}

/* Mobil uyumluluk */
@media (max-width: 768px) {
    .yayinlar-flipbook-controls {
        padding: 6px 10px;
        gap: 6px;
        bottom: 10px;
        max-width: 95%;
    }
    
    .yayinlar-flipbook-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .yayinlar-page-info {
        font-size: 12px;
        min-width: 50px;
        padding: 0 4px;
    }
    
    .yayinlar-flipbook-btn.hide-mobile {
        display: none;
    }
}

/* Loading Spinner */
.yayinlar-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
}

.yayinlar-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #153d25;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

/* Error State */
.yayinlar-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #d63638;
    max-width: 500px;
    padding: 20px;
}

.yayinlar-error-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.yayinlar-error h4 {
    margin: 0 0 10px 0;
    color: #d63638;
}

.yayinlar-error p {
    margin: 0 0 15px 0;
    color: #666;
}

.yayinlar-download-btn {
    background: #153d25;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    transition: background 0.3s;
}

.yayinlar-download-btn:is(:hover, :focus-visible) {
    background: #fff !important;
    background-color: #fff !important;
    color: #153d25 !important;
    border: 1px solid #153d25;
    box-shadow: none;
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Image Lightbox */
.yayinlar-lightbox {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: hidden;
}

.yayinlar-lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.yayinlar-lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.yayinlar-lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.yayinlar-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 40px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    z-index: 100000;
    transition: opacity 0.2s ease;
}

.yayinlar-lightbox-close:hover {
    opacity: 0.7;
}

@media (max-width: 768px) {
    .yayinlar-lightbox-close {
        top: 10px;
        right: 15px;
        font-size: 32px;
    }
}
