:root {
    --phi-pdf-navy: #0a0f31;
    --phi-pdf-blue: #2e346c;
    --phi-pdf-red: #e31e24;
    --phi-pdf-text: #11162f;
    --phi-pdf-muted: #667085;
}

.phi-pdf-library {
    width: 100%;
    box-sizing: border-box;
}

.phi-pdf-library *,
.phi-pdf-library *::before,
.phi-pdf-library *::after {
    box-sizing: border-box;
}

.phi-pdf-heading {
    margin: 0 0 34px;
    text-align: center;
    color: var(--phi-pdf-navy);
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.phi-pdf-grid {
    display: grid;
    grid-template-columns: repeat(var(--phi-cols, 3), minmax(0, 1fr));
    gap: 64px 54px;
    align-items: start;
}

.phi-pdf-card {
    position: relative;
    min-width: 0;
    text-align: center;
}

.phi-pdf-cover {
    position: relative;
    width: min(100%, 240px);
    height: 310px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    text-decoration: none;
    overflow: visible;
    isolation: isolate;
}

.phi-pdf-cover::before {
    content: '';
    position: absolute;
    inset: 14px 6px 4px;
    background: rgba(10, 15, 49, .14);
    filter: blur(22px);
    opacity: 0;
    transform: translateY(10px) scale(.92);
    transition: .3s ease;
    z-index: -1;
}

.phi-pdf-cover img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 18px rgba(10, 15, 49, .08));
    transition: transform .3s ease, filter .3s ease;
}

.phi-pdf-cover-glow {
    position: absolute;
    left: 50%;
    bottom: 2px;
    width: 62%;
    height: 10px;
    background: rgba(46, 52, 108, .14);
    filter: blur(9px);
    transform: translateX(-50%);
    z-index: -1;
}

.phi-pdf-cover:hover img {
    transform: translateY(-7px) scale(1.018);
    filter: drop-shadow(0 18px 28px rgba(10, 15, 49, .16));
}

.phi-pdf-cover:hover::before {
    opacity: 1;
}

.phi-pdf-title {
    margin: 0 0 14px;
    color: var(--phi-pdf-text);
    font-size: 19px;
    line-height: 1.35;
    font-weight: 800;
}

.phi-pdf-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 9px;
}

.phi-pdf-btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 14px;
    border: 1px solid transparent;
    border-radius: 3px;
    font-size: 12px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: .01em;
    text-decoration: none !important;
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease;
}

.phi-pdf-btn img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex: 0 0 22px;
}

.phi-pdf-btn-view {
    background: #fff;
    border-color: #d8dbe6;
    color: var(--phi-pdf-navy) !important;
}

.phi-pdf-btn-view:hover {
    border-color: var(--phi-pdf-red);
    box-shadow: 0 8px 20px rgba(227, 30, 36, .10);
    transform: translateY(-2px);
}

.phi-pdf-btn-download {
    background: var(--phi-pdf-blue);
    border-color: var(--phi-pdf-blue);
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(46, 52, 108, .12);
}

.phi-pdf-btn-download img {
    filter: invert(1);
    width: 18px;
    height: 18px;
    flex-basis: 18px;
}

.phi-pdf-btn-download:hover {
    background: var(--phi-pdf-navy);
    border-color: var(--phi-pdf-navy);
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 11px 24px rgba(10, 15, 49, .18);
}

@media (max-width: 980px) {
    .phi-pdf-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 52px 30px;
    }
}

@media (max-width: 620px) {
    .phi-pdf-heading {
        margin-bottom: 26px;
        font-size: 30px;
    }
    .phi-pdf-grid {
        grid-template-columns: 1fr;
        gap: 44px;
    }
    .phi-pdf-cover {
        height: 280px;
        width: min(100%, 220px);
    }
    .phi-pdf-title {
        font-size: 18px;
    }
    .phi-pdf-actions {
        gap: 8px;
    }
    .phi-pdf-btn {
        min-height: 42px;
        padding: 9px 12px;
    }
}

/* PDF görüntüleme penceresi */
.phi-pdf-cover,
.phi-pdf-btn-view {
    font-family: inherit;
    cursor: pointer;
}

button.phi-pdf-cover {
    padding: 0;
    border: 0;
    appearance: none;
    -webkit-appearance: none;
}

button.phi-pdf-btn-view {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

body.phi-pdf-modal-open {
    overflow: hidden !important;
}

.phi-pdf-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.phi-pdf-modal.is-open {
    display: flex;
}

.phi-pdf-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 10, 31, .82);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.phi-pdf-modal-dialog {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(1480px, 96vw);
    height: min(920px, 92vh);
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, .18);
    box-shadow: 0 28px 80px rgba(0, 0, 0, .38);
}

.phi-pdf-modal-header {
    flex: 0 0 58px;
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 14px 0 20px;
    background: var(--phi-pdf-navy);
    color: #fff;
}

.phi-pdf-modal-title {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 15px;
    line-height: 1.2;
    font-weight: 800;
}

.phi-pdf-modal-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.phi-pdf-modal-newtab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid rgba(255,255,255,.24);
    color: #fff !important;
    text-decoration: none !important;
    font-size: 12px;
    line-height: 1;
    font-weight: 700;
    transition: background-color .18s ease, border-color .18s ease;
}

.phi-pdf-modal-newtab:hover {
    background: rgba(255,255,255,.10);
    border-color: rgba(255,255,255,.46);
    color: #fff !important;
}

.phi-pdf-modal-close {
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    background: var(--phi-pdf-red);
    color: #fff;
    font: 400 30px/36px Arial, sans-serif;
    text-align: center;
    cursor: pointer;
    transition: transform .18s ease, background-color .18s ease;
}

.phi-pdf-modal-close:hover {
    transform: scale(1.04);
    background: #c9151b;
}

.phi-pdf-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    position: relative;
    background: #eef0f5;
}

.phi-pdf-modal-frame {
    display: block;
    width: 100% !important;
    height: 100% !important;
    min-width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: #fff;
}

@media (max-width: 700px) {
    .phi-pdf-modal {
        padding: 8px;
    }
    .phi-pdf-modal-dialog {
        width: 100%;
        height: 94vh;
    }
    .phi-pdf-modal-header {
        flex-basis: 52px;
        min-height: 52px;
        padding-left: 13px;
    }
    .phi-pdf-modal-title {
        font-size: 13px;
    }
    .phi-pdf-modal-newtab {
        display: none;
    }
    .phi-pdf-modal-close {
        width: 36px;
        height: 36px;
    }
}

/* Tema/Elementor buton stillerinin PDF kapak zeminini boyamasını engelle */
.phi-pdf-library button.phi-pdf-cover,
.phi-pdf-library button.phi-pdf-cover:hover,
.phi-pdf-library button.phi-pdf-cover:focus,
.phi-pdf-library button.phi-pdf-cover:active {
    background: #fff !important;
    background-color: #fff !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
}

.phi-pdf-library .phi-pdf-card {
    background: transparent !important;
}


/* v1.0.3 - PDF Görüntüle butonu eski PHI görünümüne sabitlendi.
   Tema/Elementor genel buton stilleri bu alanı laciverte çeviremez. */
.phi-pdf-library .phi-pdf-actions .phi-pdf-btn-view,
.phi-pdf-library .phi-pdf-actions a.phi-pdf-btn-view,
.phi-pdf-library .phi-pdf-actions .phi-pdf-btn-view:link,
.phi-pdf-library .phi-pdf-actions .phi-pdf-btn-view:visited {
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
    border: 1px solid #d8dbe6 !important;
    color: #0a0f31 !important;
    box-shadow: none !important;
}

.phi-pdf-library .phi-pdf-actions .phi-pdf-btn-view span {
    color: #0a0f31 !important;
}

.phi-pdf-library .phi-pdf-actions .phi-pdf-btn-view:hover,
.phi-pdf-library .phi-pdf-actions .phi-pdf-btn-view:focus,
.phi-pdf-library .phi-pdf-actions .phi-pdf-btn-view:active {
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
    border-color: #e31e24 !important;
    color: #0a0f31 !important;
    box-shadow: 0 8px 20px rgba(227, 30, 36, .10) !important;
}

.phi-pdf-library .phi-pdf-actions .phi-pdf-btn-view img {
    filter: none !important;
}

/* İndir butonu PHI lacivertinde kalır. */
.phi-pdf-library .phi-pdf-actions .phi-pdf-btn-download,
.phi-pdf-library .phi-pdf-actions .phi-pdf-btn-download:link,
.phi-pdf-library .phi-pdf-actions .phi-pdf-btn-download:visited {
    background: #2e346c !important;
    background-color: #2e346c !important;
    border-color: #2e346c !important;
    color: #ffffff !important;
}

.phi-pdf-library .phi-pdf-actions .phi-pdf-btn-download span {
    color: #ffffff !important;
}

.phi-pdf-library .phi-pdf-actions .phi-pdf-btn-download:hover,
.phi-pdf-library .phi-pdf-actions .phi-pdf-btn-download:focus,
.phi-pdf-library .phi-pdf-actions .phi-pdf-btn-download:active {
    background: #0a0f31 !important;
    background-color: #0a0f31 !important;
    border-color: #0a0f31 !important;
    color: #ffffff !important;
}
