:root {
    --primary-color: #00aaff;
    --background-color: #111;
    --surface-color: #222;
    --text-color: #f5f5f5;
    --text-secondary-color: #aaa;
    --font-family: 'Poppins', sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #fff;
}

h1, h2, h3 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.5rem; }

/* Header */
.header {
    background: rgba(17, 17, 17, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #333;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
}

.main-nav ul {
    display: flex;
    list-style: none;
}

.main-nav ul li {
    margin-left: 2rem;
}

.main-nav a {
    color: var(--text-color);
    font-weight: 400;
    position: relative;
    padding-bottom: 0.5rem;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.main-nav a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
    background: linear-gradient(rgba(17, 17, 17, 0.7), rgba(17, 17, 17, 0.9)), url('https://source.unsplash.com/1600x900/?night,city') no-repeat center center/cover;
}

.hero-content .subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary-color);
    font-weight: 300;
}

/* Content Sections */
.content-section {
    padding: 6rem 0;
    border-bottom: 1px solid #333;
}

.content-section:last-of-type {
    border-bottom: none;
}

.content-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.content-section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-color);
}

/* Modules Section */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.module-card {
    background: var(--surface-color);
    padding: 2.5rem 2rem;
    border-radius: 10px;
    text-align: center;
    border: 1px solid transparent;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.module-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 20px rgba(0, 170, 255, 0.1);
}

.module-icon {
    margin-bottom: 1.5rem;
}

.module-icon svg {
    width: 48px;
    height: 48px;
    color: var(--primary-color);
}

.module-card h3 {
    margin-bottom: 0.5rem;
    color: #fff;
}

.module-card p {
    color: var(--text-secondary-color);
}

/* Footer */
.footer {
    background: #000;
    color: var(--text-secondary-color);
    text-align: center;
    padding: 2rem 0;
    font-size: 0.9rem;
}

.footer p {
    margin-bottom: 0.5rem;
}

/* Fade-in Animation */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Module Card Link */
.module-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.module-card-link:hover {
    color: inherit;
}

/* Gallery Styles */
.gallery-hero {
    padding: 8rem 0 4rem;
    text-align: center;
    background: var(--surface-color);
}

.gallery-hero h1 {
    margin-bottom: 1rem;
}

.gallery-hero .subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary-color);
    font-weight: 300;
}

.gallery-section {
    padding: 4rem 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 170, 255, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 90%;
    max-width: 900px;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
}

.lightbox-close {
    position: absolute;
    top: 10px;
    right: 25px;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
}

.lightbox-close:hover {
    color: var(--primary-color);
}

#lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
}

.lightbox-prev,
.lightbox-next {
    color: white;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    padding: 10px;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.5);
    transition: background 0.3s ease;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(0, 170, 255, 0.7);
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }

    .header .container {
        flex-direction: column;
    }

    .main-nav ul {
        margin-top: 1rem;
    }

    .main-nav ul li {
        margin: 0 1rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }

    .gallery-item img {
        height: 200px;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 24px;
        padding: 8px;
    }
}
