body {
    margin: 0;
    padding: 0;
    width: 100%;
    background: #f4f4f4;
}

/* Color Variables */
:root {
    --primary-color: #2ecc71;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --hover-color: #706cd9;
    --text-dark: #2c3e50;
    --text-light: #ecf0f1;
    --highlight-color: yellow;
    --dark-header: rgb(12, 62, 92);
    --all-bg-color: gray;
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
    justify-content: center;
    width: 100%;          /* Make sure it can go full width */
    box-sizing: border-box;
}

.pdf-thumbnail {
    width: auto;
    height: 100%;
}

.card1 img {
    width: auto;
    cursor: pointer;
    border-radius: 5px;
}

.popup {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
}

.popup-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border-radius: 10px;
    width: 80%;
    max-width: 800px;
    position: relative;
}

.popup iframe {
    width: 100%;
    height: 500px;
    border: none;
}

.popup-footer {
    text-align: right;
    padding: 10px;
    background: #eee;
    border-top: 1px solid #ccc;
}

.popup-footer button {
    margin-left: 10px;
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.btn-close {
    background-color: #ccc;
}

.btn-download {
    background-color: #4CAF50;
    color: white;
}

/* Updated Card Styles */
.card1 {
    display: flex;
    /*flex-direction: row;*/
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
    position: relative;
    width: 100%;
    max-width: 700px;
    min-height: 350px;
    overflow: hidden;
    /*margin: 20px auto;*/
}

.card-left {
    flex: 0 0 35%;
    background-color: #f0f9eb;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

.card-left canvas.pdf-thumbnail {
    width: 100%;
    height: auto;
    max-height: 320px;
    object-fit: contain;
    cursor: pointer;
    border-radius: 5px;
}

.card-right {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 400px;
    background-color: #fffbe6;
}

.card-right h3 {
    font-size: 20px;
    margin: 0 0 10px;
    font-weight: bold;
    color: #333;
}

.card-right p {
    font-size: 16px;
    color: #555;
    margin: 0;
    text-align: justify;
    line-height: 1.5;
}

/* Responsive for smaller screens */
@media (max-width: 768px) {
    .card1 {
        flex-direction: column;
        min-height: auto;
    }

    .card-left, .card-right {
        width: 100%;
    }

    .card-left {
        padding: 10px 0;
    }

    .card-right {
        padding: 15px;
    }

    .card-right h3 {
        font-size: 18px;
        text-align: center;
    }

    .card-right p {
        font-size: 14px;
        text-align: justify;
    }
}