/* Certifications Heading - Independent Positioning */
.section-card {
    width: 100%;
    text-align: center;
    margin-bottom: 50px; /* Increased spacing to match both sections */
}

/* Certifications Grid Layout - Reduced Height */
.certifications-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); /* Keep the same width */
    gap: 10px;
    justify-content: center;
    align-items: center;
    max-width: 900px;
    margin: 20px auto;
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    overflow-x: hidden;  /* ✅ Ensures nothing goes past the screen width */
    max-width: 95vw;  /* ✅ Prevents overflow */
}

/* Individual Certificate Card - Reduced Vertical Height */
.certificate-card {
    background: rgba(255, 255, 255, 0.08);
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    box-shadow: 0 1px 4px rgba(255, 255, 255, 0.1);
    max-width: 120px;
    height: 140px; /* Reduced height */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer; /* ✅ Ensures the hand cursor appears */
}

/* Hover Effect */
.certificate-card:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 8px rgba(255, 255, 255, 0.15);
}

/* Certificate Image - Adjusted for Smaller Cards */
.certificate-card img {
    width: 100%;
    max-width: 80px;
    height: 50px; /* Reduced image height */
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border-radius: 4px;
    transition: transform 0.2s ease-in-out;
}

/* Hover Effect for Image */
.certificate-card img:hover {
    transform: scale(1.08);
}

/* Certificate Text - Adjusted for Alignment */
.certificate-card p {
    font-size: 0.6rem; /* Keep text readable */
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    text-align: center;
    word-wrap: break-word;
    margin: 5px 0 0 0;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    pointer-events: none; /* ✅ Prevents text from being clickable */
    cursor: default; /* Ensures default text cursor */
}

/* Fix issue where links inside the card remove the pointer */
.certificate-card a {
    text-decoration: none;
    color: inherit;
}

/* Ensure Certifications Heading Stays Independent */
.skills-heading {
    font-size: 2rem; /* Same as Achievements */
    font-weight: bold;
    text-align: center;
    color: white;
    margin-bottom: 50px; /* Increased to match Achievements */
    padding-bottom: 10px;
    display: block;
}

/* Adds a clear separation between heading and certificates */
.section-card {
    width: 100%;
    text-align: center;
    margin-bottom: 50px; /* Increased spacing for alignment */
}

/* Fix Certifications Grid Layout */
.certifications-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); /* Small grid */
    gap: 10px;
    justify-content: center;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
    padding: 10px;
}

/* Ensure Achievements Heading is aligned like Certifications */
.section-card:last-of-type {
    margin-top: 50px; /* Ensures correct spacing */
}

/* Achievements Section - Modernized */
.achievements-awards {
    margin-top: 50px; /* Matched the spacing to align with Certifications */
    padding: 20px;
    background: rgba(255, 255, 255, 0.05); /* Softer, more transparent */
    border-radius: 12px;
    text-align: center;
    max-width: 600px; /* Keeps it centered */
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0px 4px 15px rgba(255, 255, 255, 0.15); /* Soft white glow */
    backdrop-filter: blur(5px); /* Glassmorphic effect */
    border: 1px solid rgba(255, 255, 255, 0.1); /* Thin subtle border */
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out; /* Smooth animation */
}

/* Hover Effect - Pop Out & Glow */
.achievements-awards:hover {
    transform: scale(1.05); /* Slightly enlarges */
    box-shadow: 0px 8px 20px rgba(255, 255, 255, 0.25); /* Stronger glow effect */
}

/* Achievements Title */
.achievements-awards h3 {
    font-size: 1.5rem;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Awards List Styling */
.achievements-awards ul {
    list-style: none;
    padding: 0;
}

.achievements-awards li {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.2s ease-in-out; /* Smooth effect */
}

/* Trophy Icon Update */
.achievements-awards li::before {
    content: "\f091"; /* Trophy icon from FontAwesome */
    font-family: "Font Awesome 6 Free"; /* Ensure it's using FontAwesome */
    font-weight: 900;
    font-size: 1.3rem;
    color: silver; /* Custom color */
}

#credentials {
    position: relative;
    z-index: 1; /* Keeps content above the background */
    padding: 80px 20px; /* Adjust spacing */
    color: white;
}

#credentials .section-gradient {
    display: none; /* Remove any conflicting background */
}

#credentials .section-container {
    position: relative;
    z-index: 2;
}


/* lg */
@media (max-width: 1024px) {
    .certifications-container {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 15px;
        max-width: 90vw;  /* ✅ Keeps it responsive */
        padding: 15px;
    }
}


    /* Certifications Grid */
    .certifications-container {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); /* Adjusted for larger screens */
        gap: 15px;
        max-width: 800px;
        padding: 15px;
    }

    /* Certificate Cards */
    .certificate-card {
        max-width: 140px;
        height: 160px; /* Slightly increased height */
        padding: 12px;
    }

    .certificate-card img {
        max-width: 90px;
        height: 60px;
    }

    .certificate-card p {
        font-size: 0.7rem;
    }

    /* Section Titles */
    .skills-heading {
        font-size: 2.2rem;
        margin-bottom: 40px;
    }

    /* Achievements Section */
    .achievements-awards {
        max-width: 650px;
        padding: 25px;
    }

    .achievements-awards h3 {
        font-size: 1.7rem;
    }

    .achievements-awards li {
        font-size: 1.3rem;
    }

    /* Trophy Icon */
    .achievements-awards li::before {
        font-size: 1.5rem;
    }

    /* Credentials Section */
    #credentials {
        padding: 90px 25px;
    }

    #credentials .section-container {
        text-align: center;
    }


/* md */
@media (max-width: 768px) {
    .certifications-container {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
        gap: 12px;
        max-width: 85vw;  /* ✅ Prevents going past screen width */
        padding: 12px;
    }
}


    /* Certifications Grid */
    .certifications-container {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); /* Adjusted for medium screens */
        gap: 12px;
        max-width: 700px;
        padding: 12px;
    }

    /* Certificate Cards */
    .certificate-card {
        max-width: 130px;
        height: 150px; /* Adjusted height */
        padding: 10px;
    }

    .certificate-card img {
        max-width: 85px;
        height: 55px;
    }

    .certificate-card p {
        font-size: 0.7rem;
    }

    /* Section Titles */
    .skills-heading {
        font-size: 2rem;
        margin-bottom: 35px;
    }

    /* Achievements Section */
    .achievements-awards {
        max-width: 600px;
        padding: 22px;
    }

    .achievements-awards h3 {
        font-size: 1.6rem;
    }

    .achievements-awards li {
        font-size: 1.2rem;
    }

    /* Trophy Icon */
    .achievements-awards li::before {
        font-size: 1.4rem;
    }

    /* Credentials Section */
    #credentials {
        padding: 80px 20px;
    }

    #credentials .section-container {
        text-align: center;
    }


/* sm */
@media (max-width: 640px) {
    .container {
        max-width: 475px;
        width: 100%;
        padding: 0 15px;
    }

    /* Certifications Grid */
    .certifications-container {
        grid-template-columns: repeat(auto-fit, minmax(85px, 1fr)); /* Adjusted for smaller screens */
        gap: 10px;
        max-width: 600px;
        padding: 10px;
    }

    /* Certificate Cards */
    .certificate-card {
        max-width: 120px;
        height: 140px; /* Adjusted height */
        padding: 8px;
    }

    .certificate-card img {
        max-width: 75px;
        height: 50px;
    }

    .certificate-card p {
        font-size: 0.65rem;
    }

    /* Section Titles */
    .skills-heading {
        font-size: 1.9rem;
        margin-bottom: 30px;
    }

    /* Achievements Section */
    .achievements-awards {
        max-width: 550px;
        padding: 20px;
    }

    .achievements-awards h3 {
        font-size: 1.5rem;
    }

    .achievements-awards li {
        font-size: 1.1rem;
    }

    /* Trophy Icon */
    .achievements-awards li::before {
        font-size: 1.3rem;
    }

    /* Credentials Section */
    #credentials {
        padding: 75px 18px;
    }

    #credentials .section-container {
        text-align: center;
    }
}

/* xs */
@media (max-width: 475px) {
    .container {
        width: 100%;
        padding: 0 10px; /* Reduce padding for better space usage */
    }

    /* Certifications Grid */
    .certifications-container {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); /* Smaller column width */
        gap: 8px;
        max-width: 100%;
        padding: 8px;
    }

    /* Certificate Cards */
    .certificate-card {
        max-width: 100px;
        height: 130px; /* Adjusted for smaller screens */
        padding: 6px;
    }

    .certificate-card img {
        max-width: 70px;
        height: 45px;
    }

    .certificate-card p {
        font-size: 0.6rem;
    }

    /* Section Titles */
    .skills-heading {
        font-size: 1.8rem;
        margin-bottom: 25px;
    }

    /* Achievements Section */
    .achievements-awards {
        max-width: 480px;
        padding: 18px;
    }

    .achievements-awards h3 {
        font-size: 1.4rem;
    }

    .achievements-awards li {
        font-size: 1rem;
    }

    /* Trophy Icon */
    .achievements-awards li::before {
        font-size: 1.2rem;
    }

    /* Credentials Section */
    #credentials {
        padding: 65px 15px;
    }

    #credentials .section-container {
        text-align: center;
    }
}

/* ✅ Media Query for 1440px Screens (2K) */
@media (min-width: 1440px) {
    /* ✅ Increase Section Spacing */
    .certifications-container {
        max-width: 1200px; /* Expands the container width */
        padding: 40px; /* Adds more spacing */
        gap: 18px; /* Increased gap for better layout */
    }

    /* ✅ Adjust Certifications Grid Layout */
    .certifications-container {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); /* Larger certificate boxes */
        gap: 25px; /* Spacing between items */
    }

    /* ✅ Increase Certificate Card Size */
    .certificate-card {
        max-width: 200px; /* Wider certificate cards */
        height: 230px; /* Taller for better readability */
        padding: 18px; /* Increased padding */
        font-size: 1.4rem; /* Larger font */
        box-shadow: 0 4px 10px rgba(255, 255, 255, 0.12); /* Soft glow effect */
    }

    /* ✅ Ensure Hover Expansion */
    .certificate-card:hover {
        transform: scale(1.06);
        box-shadow: 0 4px 12px rgba(255, 255, 255, 0.22);
    }

    /* ✅ Scale Certificate Image */
    .certificate-card img {
        max-width: 150px; /* Larger certificate preview */
        height: 110px;
    }

    /* ✅ Increase Text Size */
    .certificate-card p {
        font-size: 0.95rem; /* Enlarged for visibility */
    }

    /* ✅ Ensure Heading Scales Correctly */
    .skills-heading {
        font-size: 2.8rem; /* Bigger for emphasis */
        margin-bottom: 55px; /* More spacing */
    }

    /* ✅ Achievements Section */
    .achievements-awards {
        max-width: 900px; /* Wider achievements box */
        padding: 35px; /* More spacing inside */
        font-size: 1.6rem; /* Bigger text */
    }

    .achievements-awards h3 {
        font-size: 2rem; /* Bigger title */
    }

    .achievements-awards li {
        font-size: 1.4rem; /* Bigger list items */
    }

    /* ✅ Trophy Icon */
    .achievements-awards li::before {
        font-size: 1.6rem;
    }
}


/* ✅ Media Query for 2560px Screens (4K) */
@media (min-width: 2560px) {
    /* ✅ Increase Section Spacing */
    .certifications-container {
        max-width: 1400px; /* Expands the container width */
        padding: 50px; /* Adds more spacing */
        gap: 20px; /* Increased gap for better layout */
    }

    /* ✅ Adjust Certifications Grid Layout */
    .certifications-container {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Larger certificate boxes */
        gap: 30px; /* Spacing between items */
    }

    /* ✅ Increase Certificate Card Size */
    .certificate-card {
        max-width: 220px; /* Wider certificate cards */
        height: 250px; /* Taller for better readability */
        padding: 20px; /* Increased padding */
        font-size: 1.5rem; /* Larger font */
        box-shadow: 0 5px 12px rgba(255, 255, 255, 0.15); /* Soft glow effect */
    }

    /* ✅ Ensure Hover Expansion */
    .certificate-card:hover {
        transform: scale(1.08);
        box-shadow: 0 5px 15px rgba(255, 255, 255, 0.25);
    }

    /* ✅ Scale Certificate Image */
    .certificate-card img {
        max-width: 160px; /* Larger certificate preview */
        height: 120px;
    }

    /* ✅ Increase Text Size */
    .certificate-card p {
        font-size: 1rem; /* Enlarged for visibility */
    }

    /* ✅ Ensure Heading Scales Correctly */
    .skills-heading {
        font-size: 3rem; /* Bigger for emphasis */
        margin-bottom: 60px; /* More spacing */
    }

    /* ✅ Achievements Section */
    .achievements-awards {
        max-width: 1000px; /* Wider achievements box */
        padding: 40px; /* More spacing inside */
        font-size: 1.8rem; /* Bigger text */
    }

    .achievements-awards h3 {
        font-size: 2.2rem; /* Bigger title */
    }

    .achievements-awards li {
        font-size: 1.6rem; /* Bigger list items */
    }

    /* ✅ Trophy Icon */
    .achievements-awards li::before {
        font-size: 1.8rem;
    }
}
