/* certificates-theme.css */

body {
    background: #000000; /* Match main theme background */
    color: #ffffff; /* Match main theme text color */
}

.certificates-section {
    background: #000000; /* Ensuring section background is black */
    padding: 150px 0px; /* Adjust padding as needed */
    position: relative;
    color: #ffffff;
}

.certificates-section .number {
    color: #ffffff; /* Ensure number is visible on dark background */
}

.certificates-section h3 {
    color: #ffffff; /* Title color */
    text-align: center;
    margin-bottom: 60px; /* Space below title */
}

.certificates-section h3 span {
    color: #a9a9a9; /* Sub-title color, slightly dimmer */
}

.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive grid */
    gap: 40px; /* Space between items */
    padding: 0 20px; /* Padding for the grid container */
}

.certificate-item {
    background: #1a1a1a; /* Darker card background */
    border: 1px solid #333333; /* Subtle border */
    border-radius: 8px; /* Rounded corners */
    padding: 25px;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Distributes space for content and link */
}

.certificate-item:hover {
    transform: translateY(-5px); /* Slight lift on hover */
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1); /* Softer glow effect */
}

.certificate-image-container {
    width: 100%;
    max-height: 200px; /* Limit image height */
    overflow: hidden; /* Crop image if it's too tall */
    border-radius: 4px; /* Rounded corners for the image container */
    margin-bottom: 20px;
}

.certificate-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensure image covers the container */
    display: block;
}

.certificate-info h4 {
    font-size: 1.4em; /* Slightly larger title */
    color: #ffffff;
    margin-bottom: 8px;
    font-weight: 600; /* Bolder title */
    text-transform: none; /* Keep original case for certificate titles */
}

.certificate-info p {
    font-size: 0.95em;
    color: #cccccc; /* Lighter paragraph text */
    margin-bottom: 15px;
    line-height: 1.6;
}

.certificate-link {
    display: inline-block;
    padding: 8px 15px;
    background-color: rgba(255, 255, 255, 0.1); /* Subtle background */
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.9em;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2); /* Subtle border for the button */
}

.certificate-link:hover {
    background-color: #3c5ae0; /* Highlight color from main theme */
    color: #000000; /* Text color for highlight */
}

/* Ensure footer links are visible */
.footer a {
    color: #a9a9a9; /* Light gray for footer links */
}

.footer a:hover {
    color: #ffffff; /* White on hover */
}

.footer .outline-button { /* Style for the "Back to Home" button */
    color: #fff; 
    border: 1px solid #fff; 
    padding: 8px 15px; 
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.footer .outline-button:hover {
    background-color: #fff;
    color: #000;
}

/* Adjust hero section for certificates page */
.hero h1 {
    font-size: 90px; /* Adjust size as needed */
    line-height: 90px;
    top: 50%; /* Center vertically a bit more */
    transform: translateY(-30%);
}

@media (max-width: 767px) {
    .hero h1 {
        font-size: 45px;
        line-height: 45px;
         top: 55%;
    }
    .certificates-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 30px;
    }
    .certificate-item {
        padding: 20px;
    }
     .certificates-section {
        padding: 100px 0px;
    }
}

div.logo {
    width: 140px;
    margin: auto;
    margin-bottom: -50px;
}
div.scroll {
    width: 20px;
    height: 30px;
    margin: auto;
}
div.scroll svg,
div.scroll img {
    width: 20px;
    height: 30px;
}

/* certificates-theme.css - ADD THESE STYLES FOR MODAL */

/* The Modal (background) */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top - higher than navigation */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
    padding-top: 60px; /* Location of the box */
}

/* Modal Content (Image) */
.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    border: 3px solid #555; /* Optional border for the image */
    border-radius: 5px;
}

/* Add Animation - Zoom in the modal */
.modal-content {
    animation-name: zoom;
    animation-duration: 0.4s;
}

@keyframes zoom {
    from {transform:scale(0)}
    to {transform:scale(1)}
}

/* The Close Button */
.close-modal-btn {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    z-index: 1001; /* Ensure it's above the modal content */
}

.close-modal-btn:hover,
.close-modal-btn:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Mobile Compatibility for Modal Image */
@media (max-width: 767px) {
    .modal-content {
        width: 95%; /* Use more width on smaller screens */
        margin-top: 15vh; /* Adjust top margin if needed */
    }
    .close-modal-btn {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }
}

/* Ensure certificate link still looks like a button */
.certificate-link {
    cursor: pointer; /* Indicate it's clickable */
}