/* ========================================
   Knowledge Center Page Styles
   Modern, Professional, and Responsive
   ======================================== */

:root {
    --primary-color: #053c23;
    --accent-color: #F1A128;
    --secondary-color: #1a1a1a;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --gray: #6c757d;
    --border-color: #e0e0e0;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Reset and Base Styles */
.knowledge-page {
    overflow-x: hidden;
    width: 100%;
}

/* ========================================
   Hero Banner Section
   ======================================== */
.knowledge-hero {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    height: 600px;
    background-image: url("/assets/images/Slider7.webp");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    overflow: hidden;
}

.knowledge-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(5, 60, 35, 0.4) 0%,
        rgba(0, 0, 0, 0.3) 50%,
        rgba(255, 122, 0, 0.25) 100%
    );
    z-index: 1;
}

.knowledge-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 20px;
    max-width: 900px;
    animation: fadeInUp 1s ease;
}

.knowledge-hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin: 0 0 20px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.5px;
    font-family: "Aptos", sans-serif;
}

.knowledge-hero-subtitle {
    font-size: 1.3rem;
    font-weight: 400;
    margin: 0;
    opacity: 0.95;
    line-height: 1.6;
    font-family: "Aptos", sans-serif;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Container
   ======================================== */
.knowledge-container {
    width: 100%;
    margin: 0 auto;
    padding: 20px 20px 100px;
    max-width: 100%;
}

/* desktop */
@media (min-width: 1200px) {
    .knowledge-container {
        max-width: 1280px;
    }
}

/* large desktop */
@media (min-width: 1400px) {
    .knowledge-container {
        max-width: 1440px;
    }
}

/* 2K */
@media (min-width: 1600px) {
    .knowledge-container {
        max-width: 1600px;
    }
}

/* 4K */
@media (min-width: 2000px) {
    .knowledge-container {
        max-width: 1800px;
    }
}

.knowledge-section-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 30px;
    text-align: center;
}

@media (max-width: 768px) {
    .knowledge-section-title {
        font-size: 1.75rem;
        margin-bottom: 20px;
    }
}

/* ========================================
   Documents Grid
   ======================================== */
.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

/* ========================================
   Document Card
   ======================================== */
.document-card {
    background: var(--white);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.document-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(
        90deg,
        var(--primary-color) 0%,
        var(--accent-color) 100%
    );
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.document-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.document-card:hover::before {
    transform: scaleX(1);
}

.document-icon {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    background: linear-gradient(
        135deg,
        var(--primary-color) 0%,
        var(--accent-color) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--white);
    font-size: 32px;
    box-shadow: 0 4px 15px rgba(5, 60, 35, 0.2);
}

.document-info {
    flex: 1;
    margin-bottom: 20px;
}

.document-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 10px;
    font-family: "Aptos", sans-serif;
    line-height: 1.3;
}

.document-description {
    font-size: 0.95rem;
    color: var(--gray);
    margin: 0 0 12px;
    line-height: 1.6;
    font-family: "Aptos", sans-serif;
}

.document-type {
    display: inline-block;
    padding: 6px 12px;
    background: var(--light-bg);
    color: var(--primary-color);
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: "Aptos", sans-serif;
}

.document-actions {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.btn-view,
.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(
        135deg,
        var(--primary-color) 0%,
        var(--accent-color) 100%
    );
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: "Aptos", sans-serif;
    box-shadow: 0 2px 8px rgba(5, 60, 35, 0.2);
}

.btn-view:hover,
.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(5, 60, 35, 0.3);
    background: linear-gradient(
        135deg,
        var(--accent-color) 0%,
        var(--primary-color) 100%
    );
}

.btn-view:active,
.btn-download:active {
    transform: translateY(0);
}

/* ========================================
   PDF Modal
   ======================================== */
.pdf-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.pdf-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.pdf-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 1;
}

.pdf-modal-container {
    position: relative;
    z-index: 2;
    width: 95%;
    max-width: 1200px;
    max-height: 95vh;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pdf-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    background: linear-gradient(
        135deg,
        var(--primary-color) 0%,
        var(--accent-color) 100%
    );
    color: var(--white);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pdf-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    font-family: "Aptos", sans-serif;
}

.pdf-modal-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-download-modal {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: "Aptos", sans-serif;
}

.btn-download-modal:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.btn-close-modal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-close-modal:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: rotate(90deg);
}

.pdf-modal-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #525252;
    position: relative;
}

.pdf-modal-body iframe {
    width: 100%;
    height: 100%;
    min-height: 600px;
    border: none;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    .knowledge-hero {
        height: 300px;
        background-attachment: scroll;
    }

    .knowledge-hero-title {
        font-size: 2.5rem;
    }

    .knowledge-hero-subtitle {
        font-size: 1.1rem;
    }

    .knowledge-container {
        padding: 40px 15px;
    }

    .documents-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .document-card {
        padding: 25px;
    }

    .pdf-modal-container {
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .pdf-modal-header {
        padding: 15px 20px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .pdf-modal-title {
        font-size: 1.2rem;
        width: 100%;
    }

    .pdf-modal-body iframe {
        min-height: 400px;
    }
}

@media (max-width: 480px) {
    .knowledge-hero-title {
        font-size: 2rem;
    }

    .knowledge-hero-subtitle {
        font-size: 1rem;
    }

    .document-card {
        padding: 20px;
    }

    .document-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }

    .document-title {
        font-size: 1.2rem;
    }

    .btn-view,
    .btn-download {
        width: 100%;
        justify-content: center;
    }
}
