/* ==========================================================================
   CERTIFICATES SECTION STYLES
   =============================================================================
   Professional certifications and credentials display section.
   Uses BEM-like naming convention to prevent conflicts.
   
   Table of Contents:
   1. Section Container
   2. Section Title
   3. Grid Container
   4. Certificate Card
   5. Card Elements (Icon, Name, Issuer, Description, Date)
   6. Responsive Breakpoints
   
   Dependencies: Font Awesome for icons, Montserrat font
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. SECTION CONTAINER
   -------------------------------------------------------------------------- */
#certificates.row {
    min-height: 100vh;
    background-color: #ecf0f1;
    padding-top: 60px;
    padding-bottom: 100px;
}

/* --------------------------------------------------------------------------
   2. SECTION TITLE
   -------------------------------------------------------------------------- */
.certificates-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 45px;
    font-weight: 700;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 40px;
    margin-top: 20px;
}

/* --------------------------------------------------------------------------
   3. GRID CONTAINER
   -------------------------------------------------------------------------- */
.certificates-grid {
    width: min(75rem, 100%);
    margin-inline: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 2rem;
    max-width: 1200px;
    padding: 0 20px;
}

/* --------------------------------------------------------------------------
   4. CERTIFICATE CARD
   -------------------------------------------------------------------------- */
.certificate-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #444447;
    padding: 2rem;
    min-height: 250px;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-family: system-ui, sans-serif;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
    
    /* Fixed width for consistent centering */
    width: 100%;
    max-width: 350px;
    flex: 0 1 350px;
    box-sizing: border-box;
}

.certificate-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* --------------------------------------------------------------------------
   5. CARD ELEMENTS
   -------------------------------------------------------------------------- */

/* Certificate Header - Icon + Date */
.certificate-card__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-bottom: 1rem;
    position: relative;
}

/* Certificate Icon */
.certificate-card__icon {
    width: 80px;
    height: 50px;
    border-radius: 8px;
    background: linear-gradient(135deg, #00bceb 0%, #0097b2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 15px rgba(0, 188, 235, 0.3);
    overflow: hidden;
}

.certificate-card__icon i,
.certificate-card__icon .cisco-logo {
    width: 70px;
    height: 40px;
    object-fit: contain;
}

.certificate-card__date {
    position: absolute;
    top: 0;
    right: 0;
    display: inline-block;
    padding: 0.3rem 0.6rem;
    background-color: #00bceb;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
}

/* Certificate Name */
.certificate-card__name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

/* Certificate Actions - Button + Link */
.certificate-card__actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
    flex-wrap: wrap;
}

.certificate-card__btn {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #00bceb 0%, #0097b2 100%);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.certificate-card__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 188, 235, 0.4);
}

.certificate-card__link {
    padding: 0.5rem 1rem;
    color: #0097b2;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid #0097b2;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.certificate-card__link:hover {
    background-color: #0097b2;
    color: white;
}

/* Certificate Issuer */
.certificate-card__issuer {
    font-size: 0.9rem;
    font-weight: 600;
    color: #4a90e2;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Certificate Description */
.certificate-card__description {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex-grow: 1;
}

/* --------------------------------------------------------------------------
   6. RESPONSIVE BREAKPOINTS
   -------------------------------------------------------------------------- */

/* Small phones: max 576px */
@media (max-width: 576px) {
    .certificates-title {
        font-size: 32px;
        margin-bottom: 30px;
    }
    
    .certificates-grid {
        flex-direction: column;
        align-items: center;
        padding: 0 15px;
        gap: 1.5rem;
    }
    
    .certificate-card {
        min-height: 220px;
        padding: 1.5rem;
    }
    
    .certificate-card__icon {
        width: 55px;
        height: 55px;
        margin-bottom: 1rem;
    }
    
    .certificate-card__icon i {
        font-size: 22px;
    }
    
    .certificate-card__name {
        font-size: 1rem;
    }
    
    .certificate-card__description {
        font-size: 0.85rem;
    }
}

/* Tablets: 577px - 768px */
@media (min-width: 577px) and (max-width: 768px) {
    .certificates-title {
        font-size: 38px;
    }
    
    .certificate-card {
        min-height: 240px;
        padding: 1.5rem;
    }
}

/* Small laptops: 769px - 1024px */
@media (min-width: 769px) and (max-width: 1024px) {
    .certificate-card {
        flex: 0 1 calc(33.333% - 1.5rem);
        max-width: 380px;
    }
}

/* Large desktop: 1440px+ */
@media (min-width: 1440px) {
    .certificates-grid {
        max-width: 1400px;
    }
    
    .certificate-card {
        min-height: 280px;
        padding: 2.5rem;
        flex: 0 1 calc(25% - 2rem);
        max-width: 350px;
    }
    
    .certificate-card__name {
        font-size: 1.2rem;
    }
    
    .certificate-card__description {
        font-size: 1rem;
    }
}

/* Medium desktop: 1025px - 1439px (default state) */
@media (min-width: 769px) {
    .certificate-card {
        flex: 0 1 350px;
        max-width: 350px;
    }
}

/* --------------------------------------------------------------------------
   CERTIFICATE MODAL STYLES
   -------------------------------------------------------------------------- */

/* Modal Overlay */
.certificate-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
    align-items: center;
    justify-content: center;
}

/* Modal Content */
.certificate-modal-content {
    background-color: #fff;
    margin: auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Close Button - Simple style like portfolio modal */
.certificate-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #ffffff;
    cursor: pointer;
    z-index: 10000;
    transition: color 0.3s;
    line-height: 1;
    width: 32px;
    height: 32px;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
}

.certificate-modal-close:hover {
    color: #dc2626;
    background-color: rgba(0, 0, 0, 0.8);
}

/* Modal Body */
.certificate-modal-body {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 20px;
    background-color: #1a1a1a;
}

/* Certificate Image */
.certificate-modal-image {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    display: block;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .certificate-modal-content {
        width: 95%;
        max-height: 85vh;
    }
    
    .certificate-modal-close {
        top: 10px;
        right: 10px;
        font-size: 24px;
    }
    
    .certificate-modal-body {
        padding: 10px;
    }
}
