/* General page styling */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f2f5;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 800px;
    text-align: center;
}

/* Search box styling */
.search-box {
    background: #ffffff;
    padding: 25px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.search-box h1 {
    margin-bottom: 20px;
    color: #1a237e;
}

.search-box input[type="text"] {
    width: calc(100% - 22px);
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 15px;
}

.search-box button {
    width: 100%;
    padding: 12px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.search-box button:hover {
    background-color: #218838;
}

.error {
    color: #D8000C;
    background-color: #FFD2D2;
    padding: 10px;
    border-radius: 8px;
    margin-top: 15px;
    text-align: center;
}


/* Member Card Styling */
#card-wrapper {
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.member-card {
    position: relative;
    width: 700px; /* Width of the card image */
    height: 438px; /* Height of the card image */
    margin: 0 auto; /* Center the card */
    background-image: url('MEMBERS_CARD1.jpg');
    background-size: cover; /* Ensure the image covers the div */
    background-repeat: no-repeat;
    border-radius: 10px;
}

/* Styling for the data fields */
.member-card .data {
    position: absolute;
    font-family: 'Roboto', sans-serif; /* A bold, clear font */
    font-size: 22px;
    font-weight: 700;
    color: #000;
    padding: 5px;
    left: 190px;
}

/* Fine-tuning the position for each field */
.member-card .name { top: 235px; }
.member-card .id-number { top: 283px; }
.member-card .member-id { top: 325px; }
.member-card .state { top: 368px; }

/* --- NEW STYLES --- */
.action-buttons {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 15px; /* Adds space between buttons */
}

.print-button, .download-button {
    padding: 10px 25px;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    text-decoration: none; /* For the <a> tag */
    display: inline-block;
    transition: background-color 0.3s ease;
}

.print-button {
    background-color: #007bff;
}

.print-button:hover {
    background-color: #0056b3;
}

.download-button {
    background-color: #17a2b8;
}

.download-button:hover {
    background-color: #117a8b;
}
/* --- END NEW STYLES --- */


/* Print-specific styles */
@media print {
    body * { visibility: hidden; }
    #card-wrapper, #card-wrapper * { visibility: visible; }
    .action-buttons { display: none; } /* Hide buttons when printing */
    #card-wrapper {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        padding: 0;
        margin: 0;
        box-shadow: none;
    }
    .member-card { margin: 0; border-radius: 0; }
}
