@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --bg-dark: #0f172a;
    --bg-light: #1e293b;
    --bg-card: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --hover-bg: #2d3748;
}

body {
    font-family: "Poppins", sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* Transitions */
a,
.btn,
.certificate-card,
.filter-btn {
    transition: all 0.3s ease;
}

/* Desktop Nav */
#desktop-nav {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem 5rem;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 9999;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1400px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
}

.logo a {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    font-size: 1rem;
    font-weight: 500;
}

a {
    color: var(--text-secondary);
    text-decoration: none;
}

a:hover,
a.active {
    color: var(--primary-color);
}

/* Hamburger Menu */
#hamburger-nav {
    display: none;
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 2rem;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 9999;
}

.hamburger-menu {
    position: relative;
    display: inline-block;
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 24px;
    width: 30px;
    cursor: pointer;
    z-index: 10001;
}

.hamburger-icon span {
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    transition: all 0.3s ease-in-out;
}

.hamburger-icon.open span:first-child {
    transform: rotate(45deg) translate(10px, 5px);
}

.hamburger-icon.open span:nth-child(2) {
    opacity: 0;
}

.hamburger-icon.open span:last-child {
    transform: rotate(-45deg) translate(10px, -5px);
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100vh;
    background: var(--bg-light);
    border-right: 1px solid var(--border-color);
    z-index: 10000;
    transition: left 0.3s ease-in-out;
    overflow-y: auto;
}

.sidebar.open {
    left: 0;
}

.sidebar-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 1.5rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.close-icon {
    font-size: 2rem;
    color: var(--text-primary);
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.close-icon:hover {
    color: var(--primary-color);
}

.sidebar-links {
    list-style: none;
    padding: 2rem 0;
}

.sidebar-links li {
    margin: 0;
}

.sidebar-links a {
    display: block;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-links a:hover,
.sidebar-links a.active {
    background-color: var(--hover-bg);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Hero Section */
#hero {
    padding: 10rem 5rem 5rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.05));
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Filter Section */
#filters {
    padding: 3rem 5rem;
    background: var(--bg-dark);
}

.filter-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.filter-btn {
    padding: 0.8rem 2rem;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 2rem;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    font-family: "Poppins", sans-serif;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: transparent;
    color: white;
}

/* Certificates Section */
#certificates {
    padding: 3rem 5rem 8rem;
    background: var(--bg-dark);
}

.certificates-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.certificate-card {
    background: var(--bg-card);
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 1;
    transform: scale(1);
}

.certificate-card.hidden {
    display: none;
}

.certificate-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.3);
}

.certificate-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    cursor: pointer;
}

.certificate-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.certificate-card:hover .certificate-image img {
    transform: scale(1.1);
}

.certificate-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.certificate-card:hover .certificate-overlay {
    opacity: 1;
}

.view-text {
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 0.8rem 2rem;
    border-radius: 0.5rem;
}

.certificate-info {
    padding: 2rem;
}

.certificate-info h3 {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.certificate-issuer {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.certificate-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    padding: 0.4rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 2rem;
    font-size: 0.85rem;
    color: var(--primary-color);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: auto;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    position: relative;
    margin: 2rem auto;
    padding: 2rem;
    max-width: 90%;
    max-height: 90vh;
    text-align: center;
}

.modal-content h2 {
    color: var(--text-primary);
    margin-bottom: 2rem;
    font-size: 2rem;
}

.modal-content img {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.3);
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 2rem;
    color: var(--text-primary);
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 10002;
    transition: all 0.3s ease;
}

.close-modal:hover {
    color: var(--primary-color);
    transform: scale(1.2);
}

/* Footer */
footer {
    padding: 3rem 5rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
    background: var(--bg-dark);
}

footer nav {
    margin-bottom: 2rem;
}

footer .nav-links-container {
    display: flex;
    justify-content: center;
}

footer .nav-links {
    justify-content: center;
    font-size: 0.95rem;
}

footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive Design */
@media screen and (max-width: 1200px) {
    #desktop-nav {
        display: none;
    }

    #hamburger-nav {
        display: flex;
    }

    .certificates-container {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 2rem;
    }
}

@media screen and (max-width: 768px) {
    #hero {
        padding: 8rem 2rem 3rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    #filters {
        padding: 2rem 2rem;
    }

    .filter-btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }

    #certificates {
        padding: 2rem 2rem 5rem;
    }

    .certificates-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    footer {
        padding: 2rem 2rem;
    }

    footer .nav-links {
        flex-direction: column;
        gap: 1rem;
    }

    .modal-content {
        padding: 1rem;
        margin: 1rem auto;
    }

    .modal-content h2 {
        font-size: 1.5rem;
    }

    .close-modal {
        font-size: 2rem;
        right: 1rem;
    }
}

@media screen and (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .certificate-image {
        height: 200px;
    }

    .filter-container {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}