* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
    color: #e0e7ff;
    min-height: 100vh;
    padding: 20px;
}

.header {
    text-align: center;
    padding: 120px 20px 40px;
    position: relative;
}

.header h1 {
    font-size: 3em;
    background: linear-gradient(45deg, #a78bfa, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    animation: fadeInDown 0.8s ease-out;
}

.header p {
    font-size: 1.2em;
    color: #c4b5fd;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 27, 75, 0.9);
    backdrop-filter: blur(10px);
    padding: 15px 30px;
    border-radius: 50px;
    box-shadow: 0 8px 32px rgba(167, 139, 250, 0.3);
    z-index: 1000;
    animation: floatNav 3s ease-in-out infinite;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav a {
    color: #c4b5fd;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    padding: 5px 10px;
}

nav a:hover {
    color: #a78bfa;
    transform: translateY(-2px);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #a78bfa, #ec4899);
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

.category {
    max-width: 1400px;
    margin: 60px auto;
    padding: 40px 20px;
}

.category-title {
    font-size: 2.5em;
    margin-bottom: 40px;
    text-align: center;
    color: #e0e7ff;
    animation: slideInLeft 0.6s ease-out;
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.cert-card {
    background: rgba(30, 27, 75, 0.6);
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    transition: all 0.4s ease;
    border: 2px solid rgba(167, 139, 250, 0.2);
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
    display: flex;
    flex-direction: column;
    min-height: 380px;
}

.cert-card:nth-child(1) { animation-delay: 0.1s; }
.cert-card:nth-child(2) { animation-delay: 0.2s; }
.cert-card:nth-child(3) { animation-delay: 0.3s; }
.cert-card:nth-child(4) { animation-delay: 0.4s; }

.cert-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(167, 139, 250, 0.4);
    border-color: #a78bfa;
}

.cert-image {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #4c1d95, #312e81);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.cert-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}

.cert-card:hover .cert-image::before {
    left: 100%;
}

.cert-image img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.cert-name {
    font-size: 1.1em;
    font-weight: 600;
    color: #c4b5fd;
    margin-bottom: 15px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-btn {
    background: linear-gradient(45deg, #7c3aed, #ec4899);
    color: white;
    border: none;
    padding: 12px 35px;
    border-radius: 25px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
    margin-top: auto;
}

.info-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(124, 58, 237, 0.6);
}

.info-btn:active {
    transform: scale(0.98);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    padding: 40px;
    border-radius: 25px;
    max-width: 600px;
    width: 90%;
    border: 2px solid #a78bfa;
    box-shadow: 0 20px 60px rgba(167, 139, 250, 0.5);
    animation: scaleIn 0.4s ease-out;
    position: relative;
}

.modal-content h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2em;
    background: linear-gradient(45deg, #a78bfa, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.info-item {
    margin-bottom: 20px;
    text-align: left;
    line-height: 1.8;
}

.info-label {
    color: #a78bfa;
    font-weight: 700;
    margin-right: 10px;
}

.info-value {
    color: #e0e7ff;
}

.info-value a {
    color: #ec4899;
    text-decoration: none;
    transition: color 0.3s;
}

.info-value a:hover {
    color: #f9a8d4;
}

.close-btn {
    background: linear-gradient(45deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 12px 40px;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.close-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 25px rgba(16, 185, 129, 0.6);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes floatNav {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, -10px); }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

html {
    scroll-behavior: smooth;
}

@media (max-width: 768px) {
    nav ul {
        gap: 15px;
    }

    .header h1 {
        font-size: 2em;
    }

    .category-title {
        font-size: 1.8em;
    }

    .cert-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
}