/* ====== CodeLens - Complete Styling ====== */
/* All styling for the learning platform */

:root {
    --bg-primary: #f0f2f5;
    --bg-secondary: #ffffff;
    --bg-dark: #1a1a2e;
    --bg-card: #16213e;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-light: #ffffff;
    --color-html: #e94560;
    --color-css: #53d8fb;
    --color-js: #fd971f;
    --shadow: 0 4px 20px rgba(0,0,0,0.1);
    --radius: 12px;
    --transition: all 0.3s ease;
}

/* ====== DARK MODE ====== */
body.dark-mode {
    --bg-primary: #0d0d1a;
    --bg-secondary: #16213e;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: var(--transition);
    padding-top: 70px;
}

/* ====== HEADER ====== */
#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    box-shadow: var(--shadow);
    z-index: 1000;
    padding: 0 20px;
    transition: var(--transition);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
}

.logo-icon {
    background: var(--color-html);
    color: #fff;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 1.2rem;
}

.logo-text .highlight {
    color: var(--color-html);
}

nav {
    display: flex;
    gap: 10px;
}

.nav-btn {
    background: none;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-primary);
    border-radius: 6px;
    transition: var(--transition);
}

.nav-btn:hover {
    background: var(--color-html);
    color: #fff;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-primary);
}

/* ====== HERO ====== */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    align-items: center;
    min-height: 80vh;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 15px;
}

.hero-content h1 .highlight {
    color: var(--color-html);
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 25px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
}

.btn-primary {
    background: var(--color-html);
    color: #fff;
}

.btn-primary:hover {
    background: #c73652;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(233, 69, 96, 0.4);
}

.btn-secondary {
    background: var(--bg-dark);
    color: #fff;
}

.btn-secondary:hover {
    background: #2a2a4a;
    transform: translateY(-2px);
}

.hero-image img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* ====== SECTIONS ====== */
section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

section h2 {
    font-size: 2.2rem;
    margin-bottom: 30px;
    text-align: center;
}

.highlight { color: var(--color-html); }
.highlight-css { color: var(--color-css); }
.highlight-js { color: var(--color-js); }

/* ====== ABOUT ====== */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.about-card {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
    border-top: 4px solid var(--color-html);
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.about-card:nth-child(2) { border-top-color: var(--color-css); }
.about-card:nth-child(3) { border-top-color: var(--color-js); }

.card-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 10px;
}

.about-card h3 {
    margin-bottom: 8px;
}

.card-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.card-details.open {
    max-height: 200px;
}

.card-details ul {
    list-style: none;
    padding: 10px 0;
}

.card-details li {
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

/* ====== SERVICES ====== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.service-item {
    background: var(--bg-secondary);
    padding: 25px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.service-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.12);
}

.service-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 10px;
}

/* ====== COUNTER ====== */
.counter-section {
    background: var(--bg-dark);
    color: #fff;
    border-radius: var(--radius);
    margin: 20px auto;
    padding: 40px 20px;
}

.counter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    text-align: center;
}

.counter-number {
    font-size: 3rem;
    font-weight: bold;
    color: var(--color-css);
    display: block;
}

.counter-label {
    font-size: 1rem;
    opacity: 0.8;
}

/* ====== ACCORDION / FAQ ====== */
.faq-section {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 40px 20px;
    box-shadow: var(--shadow);
}

.accordion-item {
    border-bottom: 1px solid #ddd;
    cursor: pointer;
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    padding: 15px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1.05rem;
}

.accordion-icon {
    transition: transform 0.3s ease;
}

.accordion-item.open .accordion-icon {
    transform: rotate(180deg);
}

.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    padding: 0 10px;
}

.accordion-item.open .accordion-body {
    max-height: 200px;
    padding: 10px 10px 20px;
}

/* ====== GALLERY ====== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    cursor: pointer;
    box-shadow: var(--shadow);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 10px;
    text-align: center;
    transition: bottom 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    bottom: 0;
}

/* ====== LIGHTBOX ====== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.lightbox.show {
    display: flex;
}

.lightbox-content {
    max-width: 80%;
    max-height: 80%;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 3rem;
    color: #fff;
    cursor: pointer;
    transition: var(--transition);
}

.lightbox-close:hover {
    color: var(--color-html);
    transform: rotate(90deg);
}

/* ====== CONTACT ====== */
.contact {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 40px 20px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--color-html);
    outline: none;
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.2);
}

/* ====== FOOTER ====== */
footer {
    background: var(--bg-dark);
    color: #e0e0e0;
    margin-top: 40px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.footer-section h4 {
    color: #fff;
    margin-bottom: 15px;
}

.footer-section a {
    display: block;
    color: #a0a0a0;
    text-decoration: none;
    padding: 5px 0;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--color-css);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    font-size: 1.8rem;
    text-decoration: none;
}

.footer-bottom {
    text-align: center;
    padding: 20px;
    border-top: 1px solid #2a2a4a;
    color: #666;
}

/* ====== TOAST ====== */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 15px 25px;
    border-radius: 8px;
    color: #fff;
    font-weight: 500;
    z-index: 9998;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s ease;
    max-width: 400px;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success { background: #2d5a4e; }
.toast.error { background: #5a2a4e; }
.toast.info { background: #2a4a5e; }
.toast.warning { background: #5a4a2e; }

/* ====== RESPONSIVE ====== */
@media (max-width: 992px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    nav {
        display: none;
    }
    
    nav.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        padding: 20px;
        box-shadow: var(--shadow);
    }
    
    .menu-toggle {
        display: block;
    }
    
    .counter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .services-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}