/* =====================================================
   CERTIFICATES PAGE - MOBILE CSS (320px - 767px)
   Professional & Attractive Animated Styles
   ===================================================== */

@media screen and (max-width: 767px) {
    
    /* =====================================================
       PAGE HEADER
       ===================================================== */
    
    .page-header {
        padding: 3rem 1rem;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        position: relative;
        overflow: hidden;
        text-align: center;
    }
    
    .page-header::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
        opacity: 0.2;
        animation: float 20s infinite linear;
    }
    
    @keyframes float {
        0% { transform: translateY(0) rotate(0deg); }
        100% { transform: translateY(-100px) rotate(360deg); }
    }
    
    .page-header .container {
        position: relative;
        z-index: 2;
        animation: fadeInUp 1s ease-out;
    }
    
    .page-header h1 {
        font-size: 1.75rem;
        line-height: 1.3;
        color: white;
        margin-bottom: 0.75rem;
        animation: slideInLeft 0.8s ease-out 0.2s both;
    }
    
    .page-header p {
        font-size: 0.9rem;
        color: rgba(255,255,255,0.95);
        line-height: 1.7;
        margin-bottom: 1.5rem;
        animation: slideInLeft 0.8s ease-out 0.4s both;
    }
    
    .header-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
        animation: fadeInUp 0.8s ease-out 0.6s both;
    }
    
    .stat-item {
        text-align: center;
        background: rgba(255,255,255,0.15);
        backdrop-filter: blur(10px);
        border-radius: 15px;
        padding: 1rem;
        border: 1px solid rgba(255,255,255,0.2);
    }
    
    .stat-number {
        display: block;
        font-size: 1.5rem;
        font-weight: 700;
        color: white;
        line-height: 1;
        margin-bottom: 0.25rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
        color: rgba(255,255,255,0.9);
        display: block;
    }
    
    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(30px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    @keyframes slideInLeft {
        from {
            opacity: 0;
            transform: translateX(-30px);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
    
    /* =====================================================
       CERTIFICATE FILTER
       ===================================================== */
    
    .certificate-filter {
        padding: 2rem 1rem;
        background: white;
        border-bottom: 2px solid rgba(0,123,255,0.05);
    }
    
    .filter-tabs {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        overflow-x: auto;
        padding: 0.5rem 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .filter-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .filter-btn {
        padding: 0.6rem 1.25rem;
        background: rgba(0,123,255,0.05);
        border: 2px solid rgba(0,123,255,0.1);
        border-radius: 25px;
        color: #6c757d;
        font-weight: 600;
        font-size: 0.85rem;
        cursor: pointer;
        transition: all 0.3s ease;
        white-space: nowrap;
    }
    
    .filter-btn:hover,
    .filter-btn.active {
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        border-color: transparent;
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(0,123,255,0.3);
    }
    
    /* =====================================================
       CERTIFICATES GRID
       ===================================================== */
    
    .certificates-section {
        padding: 3rem 1rem;
        background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 50%, #f8f9fa 100%);
        position: relative;
        overflow: hidden;
    }
    
    .certificates-section::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background:
            radial-gradient(circle at 20% 30%, rgba(0,123,255,0.03) 0%, transparent 50%),
            radial-gradient(circle at 80% 70%, rgba(0,168,89,0.03) 0%, transparent 50%);
        pointer-events: none;
    }
    
    .certificates-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1.5rem;
        position: relative;
        z-index: 1;
    }
    
    .certificate-card {
        background: white;
        border-radius: 20px;
        padding: 1.5rem;
        box-shadow: 0 5px 20px rgba(0,0,0,0.08);
        transition: all 0.3s ease;
        border: 1px solid rgba(0,123,255,0.05);
        animation: fadeInUp 0.6s ease-out both;
    }
    
    .certificate-card:nth-child(1) { animation-delay: 0.1s; }
    .certificate-card:nth-child(2) { animation-delay: 0.2s; }
    .certificate-card:nth-child(3) { animation-delay: 0.3s; }
    .certificate-card:nth-child(4) { animation-delay: 0.4s; }
    .certificate-card:nth-child(5) { animation-delay: 0.5s; }
    .certificate-card:nth-child(6) { animation-delay: 0.6s; }
    
    .certificate-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 15px 40px rgba(0,123,255,0.15);
        border-color: rgba(0,123,255,0.2);
    }
    
    .certificate-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 1.25rem;
    }
    
    .certificate-icon {
        width: 60px;
        height: 60px;
        background: linear-gradient(135deg, rgba(0,123,255,0.1), rgba(0,168,89,0.1));
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.75rem;
        color: var(--primary-color);
    }
    
    .certificate-badge {
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        border-radius: 20px;
        padding: 0.4rem 1rem;
    }
    
    .badge-text {
        color: white;
        font-size: 0.75rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .certificate-content h3 {
        font-size: 1.1rem;
        color: #2c3e50;
        margin-bottom: 0.75rem;
        font-weight: 700;
    }
    
    .cert-description {
        font-size: 0.9rem;
        line-height: 1.7;
        color: #6c757d;
        margin-bottom: 1.25rem;
    }
    
    .certificate-details {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        margin-bottom: 1.5rem;
        padding: 1rem;
        background: rgba(0,123,255,0.02);
        border-radius: 12px;
    }
    
    .detail-item {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        font-size: 0.85rem;
        color: #495057;
    }
    
    .detail-item i {
        width: 30px;
        height: 30px;
        background: rgba(0,123,255,0.1);
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.9rem;
        color: var(--primary-color);
        flex-shrink: 0;
    }
    
    .view-cert-btn {
        width: 100%;
        padding: 0.9rem;
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        color: white;
        border: none;
        border-radius: 25px;
        font-weight: 600;
        font-size: 0.9rem;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.75rem;
    }
    
    .view-cert-btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 25px rgba(0,123,255,0.4);
    }
    
    .view-cert-btn i {
        font-size: 1rem;
    }
    
    /* =====================================================
       QUALITY SECTION
       ===================================================== */
    
    .quality-section {
        padding: 3rem 1rem;
        background: white;
    }
    
    .section-title {
        font-size: 1.75rem;
        color: #2c3e50;
        margin-bottom: 0.75rem;
        text-align: center;
        font-weight: 700;
    }
    
    .section-subtitle {
        font-size: 0.9rem;
        color: #6c757d;
        text-align: center;
        margin-bottom: 2rem;
    }
    
    .quality-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .quality-item {
        background: white;
        border: 2px solid rgba(0,123,255,0.1);
        border-radius: 20px;
        padding: 1.5rem;
        text-align: center;
        transition: all 0.3s ease;
        animation: fadeInUp 0.6s ease-out both;
    }
    
    .quality-item:nth-child(1) { animation-delay: 0.1s; }
    .quality-item:nth-child(2) { animation-delay: 0.2s; }
    .quality-item:nth-child(3) { animation-delay: 0.3s; }
    .quality-item:nth-child(4) { animation-delay: 0.4s; }
    
    .quality-item:hover {
        transform: translateY(-8px);
        border-color: rgba(0,123,255,0.3);
        box-shadow: 0 15px 40px rgba(0,123,255,0.1);
    }
    
    .quality-icon {
        width: 70px;
        height: 70px;
        background: linear-gradient(135deg, rgba(0,123,255,0.1), rgba(0,168,89,0.1));
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 2rem;
        color: var(--primary-color);
        margin-bottom: 1rem;
    }
    
    .quality-item h3 {
        font-size: 1.1rem;
        color: #2c3e50;
        margin-bottom: 0.75rem;
        font-weight: 700;
    }
    
    .quality-item p {
        font-size: 0.9rem;
        line-height: 1.7;
        color: #6c757d;
        margin-bottom: 1rem;
    }
    
    .quality-features {
        display: flex;
        justify-content: center;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .feature-tag {
        padding: 0.4rem 0.9rem;
        background: rgba(0,123,255,0.1);
        color: var(--primary-color);
        border-radius: 20px;
        font-size: 0.75rem;
        font-weight: 600;
    }
    
    /* =====================================================
       CERTIFICATE MODAL
       ===================================================== */
    
    .certificate-modal {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 9999;
    }
    
    .certificate-modal.active {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .modal-overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.8);
        backdrop-filter: blur(5px);
    }
    
    .modal-content {
        background: white;
        border-radius: 25px;
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
        position: relative;
        z-index: 1;
        animation: modalSlideIn 0.3s ease-out;
    }
    
    @keyframes modalSlideIn {
        from {
            opacity: 0;
            transform: translateY(-50px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .modal-header {
        padding: 1.5rem;
        border-bottom: 2px solid rgba(0,123,255,0.1);
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    .modal-header h3 {
        font-size: 1.25rem;
        color: #2c3e50;
        font-weight: 700;
        margin: 0;
    }
    
    .close-modal {
        width: 40px;
        height: 40px;
        background: rgba(0,123,255,0.1);
        border: none;
        border-radius: 50%;
        color: var(--primary-color);
        font-size: 1.25rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
    }
    
    .close-modal:hover {
        background: var(--primary-color);
        color: white;
        transform: scale(1.1) rotate(90deg);
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .certificate-preview {
        margin-bottom: 2rem;
    }
    
    .cert-placeholder {
        width: 100%;
        height: 250px;
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        border-radius: 15px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        border: 2px dashed rgba(0,123,255,0.2);
    }
    
    .cert-placeholder i {
        font-size: 4rem;
        color: var(--primary-color);
        margin-bottom: 1rem;
        opacity: 0.3;
    }
    
    .cert-placeholder p {
        font-size: 1rem;
        color: #6c757d;
        font-weight: 600;
        margin: 0;
    }
    
    .certificate-info {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .info-section h4 {
        font-size: 1rem;
        color: #2c3e50;
        margin-bottom: 1rem;
        font-weight: 700;
    }
    
    .info-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .info-item {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
        padding: 0.75rem;
        background: rgba(0,123,255,0.02);
        border-radius: 10px;
    }
    
    .info-label {
        font-size: 0.85rem;
        color: #6c757d;
        font-weight: 600;
    }
    
    .info-value {
        font-size: 0.95rem;
        color: #2c3e50;
        font-weight: 500;
    }
    
    .scope-list {
        list-style: none;
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .scope-list li {
        padding: 0.75rem;
        background: rgba(0,123,255,0.02);
        border-left: 3px solid var(--primary-color);
        border-radius: 8px;
        font-size: 0.9rem;
        color: #495057;
    }
    
    .modal-footer {
        padding: 1.5rem;
        border-top: 2px solid rgba(0,123,255,0.1);
        display: flex;
        gap: 1rem;
    }
    
    .btn-download,
    .btn-verify {
        flex: 1;
        padding: 1rem;
        border: none;
        border-radius: 25px;
        font-weight: 600;
        font-size: 0.95rem;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.75rem;
    }
    
    .btn-download {
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        color: white;
    }
    
    .btn-download:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 25px rgba(0,123,255,0.4);
    }
    
    .btn-verify {
        background: white;
        color: var(--primary-color);
        border: 2px solid var(--primary-color);
    }
    
    .btn-verify:hover {
        background: var(--primary-color);
        color: white;
        transform: translateY(-3px);
        box-shadow: 0 10px 25px rgba(0,123,255,0.3);
    }
}

