/* CSS for certification.html */

.title {
    font-size: 3rem;
    text-align: center;
}

section {
    padding-top: 4vh;
    padding-bottom: 1vh; /* Add bottom padding */
    height: auto; /* Allow natural height */
    min-height: 96vh; /* Minimum viewport height */
    margin: 0 10rem;
    margin-bottom: 1rem; /* Add bottom margin */
    box-sizing: border-box;
}

.section_text_p1 {
    text-align: center;
    margin-bottom: 2rem;
    color: rgb(85, 85, 85);
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}

/* Main container for all certification cards */
.certification-containers {
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: 2rem; /* Subtle bottom margin */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    grid-auto-rows: auto; /* Allow rows to expand naturally */
    align-items: stretch; /* Make cards fill their grid cells */
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* Individual certification card */
.certification-card {
    padding: 2rem;
    padding-bottom: 2.5rem; /* Extra bottom padding */
    background: white;
    border-radius: 1.5rem;
    border: rgb(163, 163, 163) 0.1rem solid;
    text-align: left;
    
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    
    transition: all 300ms ease;
    min-height: 320px; /* Minimum height, can expand */
    height: auto; /* Allow natural expansion */
    position: relative;
}

.certification-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: rgb(100, 100, 100);
}

/* Certification provider logo/icon */
.cert-provider {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: #f1f3f4; /* Slightly more contrast */
    border: 1px solid #d0d7de; /* Darker border */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
}

.cert-provider img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.cert-provider i {
    font-size: 1.5rem;
    color: #495057; /* Darker gray for better contrast */
}

/* Certification title */
.cert-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: rgb(53, 53, 53);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

/* Certification organization */
.cert-organization {
    font-size: 1rem;
    color: rgb(85, 85, 85);
    font-weight: 500;
    margin-bottom: 1rem;
}

/* Certification details */
.cert-details {
    font-size: 0.9rem;
    color: rgb(115, 115, 115);
    margin-bottom: 1.5rem;
    flex-grow: 1;
    line-height: 1.4;
}

/* Certification date and status */
.cert-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: auto;
}

.cert-date {
    font-size: 0.85rem;
    color: rgb(115, 115, 115);
    font-weight: 500;
}

/* Certification status badges */
.cert-status {
    padding: 0.4rem 0.8rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cert-status.completed {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.cert-status.in-progress {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.cert-status.no-expiry {
    background: #e2e3e5;
    color: #495057;
    border: 1px solid #ced4da;
}

/* External link icon */
.cert-link {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #d0d7de;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #24292f; /* Darker color for better contrast */
    transition: all 300ms ease;
    opacity: 0.8; /* Slightly more visible */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
}

.cert-link:hover {
    opacity: 1;
    background: #0969da; /* GitHub blue for better branding */
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(9, 105, 218, 0.3); /* Blue shadow on hover */
}

.cert-link i {
    font-size: 0.9rem;
}

/* Mobile Optimizations */

/* Large tablets and small desktops */
@media screen and (max-width: 1200px) {
    section {
        margin: 0 5rem;
    }
    
    .certification-containers {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }
    
    .cert-title {
        font-size: 1.3rem;
    }
    
    .cert-details {
        font-size: 0.85rem;
    }
}

/* Tablets */
@media screen and (max-width: 768px) {
    section {
        margin: 0 2rem;
        padding-top: 3vh;
    }
    
    .title {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .section_text_p1 {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        padding: 0 0.5rem;
    }
    
    .certification-containers {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 1.5rem;
    }
    
    .certification-card {
        min-height: 280px;
        height: auto;
        padding: 1.5rem;
        padding-bottom: 2rem;
    }
    
    .cert-provider {
        width: 50px;
        height: 50px;
        margin-bottom: 1.2rem;
    }
    
    .cert-provider i {
        font-size: 1.3rem;
    }
    
    .cert-title {
        font-size: 1.2rem;
        line-height: 1.2;
    }
    
    .cert-organization {
        font-size: 0.9rem;
        margin-bottom: 0.8rem;
    }
    
    .cert-details {
        font-size: 0.8rem;
        margin-bottom: 1.2rem;
        line-height: 1.3;
    }
    
    .cert-date {
        font-size: 0.8rem;
    }
    
    .cert-link {
        width: 30px;
        height: 30px;
        top: 1.2rem;
        right: 1.2rem;
    }
    
    .cert-link i {
        font-size: 0.8rem;
    }
}

/* Mobile phones */
@media screen and (max-width: 480px) {
    section {
        margin: 0 1rem;
        padding-top: 2vh;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .section_text_p1 {
        font-size: 0.8rem;
        margin-bottom: 1.2rem;
        padding: 0;
    }
    
    .certification-containers {
        gap: 0.8rem;
        margin-top: 1.2rem;
    }
    
    .certification-card {
        min-height: 260px;
        padding: 1.2rem;
        padding-bottom: 1.8rem;
    }
    
    .cert-provider {
        width: 45px;
        height: 45px;
        margin-bottom: 1rem;
    }
    
    .cert-provider i {
        font-size: 1.2rem;
    }
    
    .cert-title {
        font-size: 1.1rem;
        line-height: 1.1;
        margin-bottom: 0.4rem;
    }
    
    .cert-organization {
        font-size: 0.85rem;
        margin-bottom: 0.7rem;
    }
    
    .cert-details {
        font-size: 0.75rem;
        margin-bottom: 1rem;
        line-height: 1.2;
    }
    
    .cert-date {
        font-size: 0.75rem;
    }
    
    .cert-link {
        width: 28px;
        height: 28px;
        top: 1rem;
        right: 1rem;
    }
    
    .cert-link i {
        font-size: 0.75rem;
    }
    
    .cert-status {
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
    }
}

/* Extra small devices */
@media screen and (max-width: 320px) {
    section {
        margin: 0 0.5rem;
    }
    
    .title {
        font-size: 1.8rem;
    }
    
    .section_text_p1 {
        font-size: 0.85rem;
    }
    
    .certification-card {
        min-height: 240px;
        padding: 1rem;
        padding-bottom: 1.5rem;
    }
    
    .cert-provider {
        width: 40px;
        height: 40px;
        margin-bottom: 0.8rem;
    }
    
    .cert-provider i {
        font-size: 1.1rem;
    }
    
    .cert-title {
        font-size: 1rem;
        line-height: 1.1;
    }
    
    .cert-organization {
        font-size: 0.8rem;
        margin-bottom: 0.6rem;
    }
    
    .cert-details {
        font-size: 0.7rem;
        margin-bottom: 0.8rem;
        line-height: 1.15;
    }
    
    .cert-date {
        font-size: 0.7rem;
    }
    
    .cert-link {
        width: 25px;
        height: 25px;
        top: 0.8rem;
        right: 0.8rem;
    }
    
    .cert-link i {
        font-size: 0.7rem;
    }
}

/* Disable hover effects on touch devices */
@media (hover: none) and (pointer: coarse) {
    .certification-card:hover {
        transform: none;
        box-shadow: none;
        border-color: rgb(163, 163, 163);
    }
    
    .cert-link:hover {
        opacity: 0.8;
        background: rgba(255, 255, 255, 0.95);
        color: #24292f;
        transform: none;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
}
