/* assets/css/styles.css */

:root {
    --primary-color: #007396;
    --secondary-color: #f89820;
    --dark-bg: #1a1a2e;
    --light-bg: #f8f9fa;
    --jakarta-color: #6f42c1;
    --spring-color: #6db33f;
    
    /* Light theme colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #333333;
    --text-secondary: #6c757d;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
}

/* Dark theme colors */
body.dark-theme {
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --text-primary: #e8e9ed;
    --text-secondary: #b8b9bd;
    --card-bg: #252c48;
    --border-color: #2d3548;
    --light-bg: #16213e;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Navbar Styles */
.navbar {
    background: linear-gradient(135deg, var(--dark-bg) 0%, #16213e 100%);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    background: none;
    border: none;
    color: rgba(255,255,255,0.85);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.theme-toggle:hover {
    color: var(--secondary-color);
    background: rgba(248, 152, 32, 0.1);
    transform: rotate(20deg);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: white !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.navbar-brand i {
    font-size: 2rem;
    color: var(--secondary-color);
}

.navbar-toggler {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.navbar-nav {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: rgba(255,255,255,0.85) !important;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    text-decoration: none;
    padding: 0.5rem 0;
}

.nav-link:hover {
    color: var(--secondary-color) !important;
    transform: translateY(-2px);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background: var(--secondary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: white;
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><text x="10" y="50" font-size="60" opacity="0.05" fill="white">%7B%7D</text></svg>');
    background-repeat: repeat;
    animation: float 20s linear infinite;
    pointer-events: none;
}

@keyframes float {
    0% { transform: translateY(0); }
    100% { transform: translateY(-100px); }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease;
}

.hero .lead {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
    opacity: 0.95;
}

.hero .instructor-info {
    background: rgba(255,255,255,0.1);
    padding: 2rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    margin: 2rem auto;
    max-width: 600px;
    animation: fadeInUp 1.2s ease;
    border: 1px solid rgba(255,255,255,0.1);
}

.hero .instructor-name {
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.hero .instructor-title {
    font-size: 1.1rem;
    opacity: 0.9;
}

.btn-primary {
    background: var(--secondary-color);
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: 0 8px 20px rgba(248, 152, 32, 0.3);
    transition: all 0.3s ease;
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    animation: fadeInUp 1.4s ease;
    margin-top: 1.5rem;
    cursor: pointer;
}

.btn-primary:hover {
    background: #e08a1c;
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(248, 152, 32, 0.4);
    color: white;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Course Section */
.course-section {
    padding: 80px 0;
    background: var(--bg-secondary);
    transition: background-color 0.3s ease;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.section-title p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.section-title .underline {
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    margin: 1rem auto;
    border-radius: 2px;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

/* Course Cards */
.course-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    transition: all 0.4s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

body.dark-theme .course-card {
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.course-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

body.dark-theme .course-card:hover {
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.card-img-wrapper {
    position: relative;
    overflow: hidden;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-img-wrapper i {
    font-size: 5rem;
    color: rgba(255,255,255,0.95);
    transition: all 0.4s ease;
}

.course-card:hover .card-img-wrapper i {
    transform: scale(1.1) rotate(5deg);
}

/* Module Colors */
.course-card.fundamentals .card-img-wrapper {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.course-card.javase .card-img-wrapper {
    background: linear-gradient(135deg, var(--primary-color) 0%, #005f7f 100%);
}

.course-card.jakarta .card-img-wrapper {
    background: linear-gradient(135deg, var(--jakarta-color) 0%, #5a32a3 100%);
}

.course-card.spring .card-img-wrapper {
    background: linear-gradient(135deg, var(--spring-color) 0%, #509e2f 100%);
}

.badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255,255,255,0.95);
    color: var(--dark-bg);
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
}

.card-body {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.card-text {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    font-weight: 600;
    padding: 10px 30px;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    cursor: pointer;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(5px);
}

/* Contact Section */
.contact-section {
    background: linear-gradient(135deg, var(--dark-bg), #16213e);
    color: white;
    padding: 60px 0;
}

.contact-section h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateX(10px);
}

.contact-item i {
    font-size: 2rem;
    color: var(--secondary-color);
}

.contact-item a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--secondary-color);
}

/* Footer */
footer {
    background: var(--dark-bg);
    color: rgba(255,255,255,0.7);
    padding: 2rem 0;
    text-align: center;
}

footer p {
    margin: 0;
}

/* Content Pages */
.content-page {
    padding: 80px 0;
    background: var(--bg-primary);
    transition: background-color 0.3s ease;
}

.content-page .container {
    max-width: 900px;
}

.content-page h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 4px solid var(--primary-color);
}

.content-page h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.content-page h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.content-page p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.content-page ul, .content-page ol {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.content-page li {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

.content-page code {
    background: var(--bg-secondary);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: var(--primary-color);
}

.content-page pre {
    background: var(--dark-bg);
    color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.content-page pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* Responsive Design */
@media (max-width: 992px) {
    .course-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .navbar-toggler {
        display: block;
    }

    .navbar-right {
        order: 2;
    }

    .navbar-nav {
        display: none;
        flex-direction: column;
        gap: 1rem;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--dark-bg);
        padding: 2rem;
        order: 3;
        width: 100%;
    }

    .navbar-nav.active {
        display: flex;
    }

    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero .lead {
        font-size: 1.1rem;
    }

    .hero .instructor-name {
        font-size: 1.5rem;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .course-grid {
        grid-template-columns: 1fr;
    }

    .content-page h1 {
        font-size: 2rem;
    }

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

    .container {
        padding: 0 1rem;
    }
}

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

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

    .section-title h2 {
        font-size: 1.75rem;
    }
}