/* General Reset */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #fff;
    background-image: url('Background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll; /* Changed from 'fixed' to 'scroll' for mobile compatibility */
    text-align: center;
    min-height: 100vh;
}

/* Navbar Styles */
.navbar {
    background-color: #0f0f0f;
    padding: 10px 20px; /* Adjusted padding for consistency */
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    text-align: center;
}

.navbar a {
    color: #fff;
    text-decoration: none;
    margin: 0 10px; /* Reduced margin for better alignment */
    font-size: 14px; /* Adjusted font size */
    font-weight: bold;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #ff5555;
}

/* Education Section */
.education-section {
    padding: 100px 10px 40px; /* Reduced padding for better scaling */
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.education-section h1 {
    font-size: 32px; /* Adjusted for better readability */
    margin-bottom: 20px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
}

.education-section h1:after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: #ff5555;
    margin: 10px auto;
    border-radius: 2px;
}

/* Grid Container */
.education-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Adjusted minimum width */
    gap: 20px;
}

/* Cards */
.education-card {
    background-color: #460a0a;
    border: 1px solid #444;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 15px; /* Reduced padding for smaller cards */
    transition: transform 0.3s, box-shadow 0.3s;
}

.education-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.education-card h2 {
    font-size: 22px; /* Adjusted for mobile scaling */
    color: #fff;
    margin-bottom: 10px;
}

.education-card p {
    font-size: 14px; /* Adjusted for readability */
    color: #ccc;
    margin: 8px 0;
}

.education-card ul {
    list-style: none;
    padding: 0;
}

.education-card ul li {
    font-size: 13px;
    color: #bbb;
    margin-bottom: 6px;
}

.certificate-link {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 12px; /* Adjusted for smaller buttons */
    background-color: #ff5555;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.certificate-link:hover {
    background-color: #e67e00;
}

/* Footer */
footer {
    background-color: #000;
    color: #bbb;
    text-align: center;
    padding: 15px 0; /* Adjusted padding */
    margin-top: 30px;
}

footer p {
    margin: 0;
}

footer p a {
    color: #ff5555;
    text-decoration: none;
}

footer p a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .education-container {
        grid-template-columns: 1fr;
    }

    .navbar {
        padding: 8px 10px; /* Reduced padding for smaller devices */
    }

    .navbar a {
        font-size: 12px; /* Adjusted font size for smaller screens */
    }

    .education-section h1 {
        font-size: 24px;
    }

    .education-card h2 {
        font-size: 18px;
    }

    .education-card p {
        font-size: 12px;
    }

    .certificate-link {
        font-size: 10px;
        padding: 6px 10px;
    }
}

@media (max-width: 480px) {
    .navbar a {
        font-size: 10px; /* Reduced font size for narrow screens */
    }

    .education-card {
        padding: 10px;
    }

    .education-card h2 {
        font-size: 16px;
    }

    .education-card p {
        font-size: 11px;
    }
}
