:root {
    /* Colors - Modern Pitch Black Theme */
    --bg-body: #000000;
    --bg-surface: #0a0a0a;
    --bg-surface-glass: rgba(10, 10, 10, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #2dd4bf;
    --primary-glow: rgba(45, 212, 191, 0.2);
    --primary-hover: #14b8a6;
    --accent: #38bdf8;
    --border-subtle: rgba(255, 255, 255, 0.08);
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --container-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

h1,
.section-title,
.hero-title,
h2,
h3 {
    font-family: 'Space Grotesk', sans-serif;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--spacing-lg);
    position: relative;
    display: table;
    margin-left: auto;
    margin-right: auto;
    letter-spacing: -1px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--accent));
    border-radius: 2px;
}

.overline {
    color: var(--primary);
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: var(--spacing-xs);
    text-transform: uppercase;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    border-radius: 50px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--bg-body);
    box-shadow: 0 4px 15px rgba(45, 212, 191, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(45, 212, 191, 0.4);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: rgba(45, 212, 191, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(45, 212, 191, 0.1);
}

/* Header */
.header {
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    transition: transform 0.3s ease;
}


.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

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

.nav-logo-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--primary);
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.nav-logo-img.visible {
    opacity: 1;
    transform: scale(1);
}

.accent {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

/* Navigation Dropdown */
.nav-item {
    position: relative;
    padding: 1rem 0;
    /* Increase touch target/hover area */
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    transform: translateY(10px);
    background-color: var(--bg-surface-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 0.5rem;
    min-width: 220px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    display: block;
    width: 100%;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-radius: 4px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.dropdown-menu a:hover {
    color: var(--primary);
    background: rgba(45, 212, 191, 0.1);
}

/* Mobile adjustments for dropdown */
@media (max-width: 768px) {
    .nav-item {
        width: 100%;
        text-align: center;
    }

    .dropdown-menu {
        position: static;
        transform: none;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid var(--border-subtle);
        box-shadow: none;
        padding: 0;
        margin-top: 0.5rem;
        border-radius: 8px;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .nav-item.dropdown-active .dropdown-menu {
        max-height: 400px;
        opacity: 1;
        visibility: visible;
        padding: 0.5rem 0;
    }

    .dropdown-menu li {
        display: block;
    }

    .dropdown-menu a {
        display: block;
        padding: 0.75rem 1.5rem;
        color: var(--text-muted);
        transition: all 0.2s ease;
    }

    .dropdown-menu a:hover {
        color: var(--primary);
        background: rgba(45, 212, 191, 0.1);
    }
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    /* More breathing room */
    padding-bottom: 50px;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 4rem;
}



.hero-title {
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(to right, var(--text-main), var(--text-muted));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 2rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: var(--spacing-md);
}

.hero-description {
    max-width: 600px;
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: var(--spacing-md);
}

/* Hero Image */
.hero-image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
}

.hero-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 20px;
    box-shadow: 20px 20px 0 var(--bg-surface);
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.hero-image:hover {
    transform: translateY(-10px);
}

.hero-image.transitioning {
    position: fixed;
    z-index: 1001;
    pointer-events: none;
    transition: none;
    /* Controlled by JS */
}

.hero-image.hidden {
    opacity: 0;
    visibility: hidden;
}

.hero-flying-ghost {
    position: fixed;
    z-index: 10001;
    /* Above header */
    pointer-events: none;
    border-radius: 20px;
    object-fit: cover;
    transition: border-radius 0.1s linear;
}

@media (max-width: 968px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-image-wrapper {
        order: -1;
        /* Image on top for mobile */
    }

    .hero-image {
        max-width: 300px;
    }
}

/* Section General */
.section {
    padding: 5rem 0;
}

.bg-surface {
    background-color: var(--bg-surface);
}

/* Contact */
.contact-wrapper {
    text-align: center;
}

.email-link {
    display: block;
    font-size: 1.5rem;
    color: var(--primary);
    margin: 2rem 0;
    font-weight: 600;
    word-break: break-all;
}

.footer {
    padding: 2rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--bg-surface);
}

/* Mobile */
.hamburger {
    display: none;
    cursor: pointer;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: block;
        z-index: 1001;
        /* Ensure above overlay */
    }

    .hamburger span {
        display: block;
        width: 25px;
        height: 3px;
        margin: 5px auto;
        -webkit-transition: all 0.3s ease-in-out;
        transition: all 0.3s ease-in-out;
        background-color: var(--text-main);
    }

    /* Hamburger Animation to X */
    .hamburger.toggle span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.toggle span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.toggle span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

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

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

    .section-title {
        width: 100%;
        text-align: center;
        left: 0;
        transform: none;
        display: block;
    }

    .section-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

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

    .section-title {
        font-size: 1.5rem;
        /* Smaller section titles */
        width: 100%;
        /* Prevent weird wrapping */
        text-align: center;
        left: 0;
        transform: none;
        display: block;
        margin-left: auto;
        margin-right: auto;
    }

    .section-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

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

    .service-card h3,
    .premium-card h3,
    .timeline-content h3 {
        font-size: 1.25rem;
    }

    .timeline::after {
        left: 19px;
        /* Reset for mobile */
    }

    .timeline-item {
        width: 100% !important;
        padding-left: 50px !important;
        padding-right: 0 !important;
        text-align: left !important;
    }

    .timeline-item:nth-child(even) {
        left: 0 !important;
    }

    .timeline-item:nth-child(even) .timeline-dot {
        left: 12px !important;
    }

    .timeline-item:nth-child(odd) .timeline-dot {
        left: 12px !important;
        right: auto !important;
    }
}

/* Services Carousel */
.services-carousel-wrapper {
    position: relative;
    padding: 2rem 0 4rem;
}

.services-swiper {
    padding: 2rem 1rem 4rem !important;
}

.swiper-slide {
    height: auto;
    display: flex;
}

.service-card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--border-subtle);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    height: 100%;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.service-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px var(--primary-glow);
}

.service-card .icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.service-card h3 {
    font-size: 1.25rem;
    color: var(--text-main);
    margin-bottom: 1rem;
    font-weight: 600;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Swiper Customization */
.services-swiper .swiper-pagination-bullet {
    background: var(--text-muted);
    opacity: 0.5;
    transition: all 0.3s ease;
}

.services-swiper .swiper-pagination-bullet-active {
    background: var(--primary);
    opacity: 1;
    width: 24px;
    border-radius: 4px;
}

.services-swiper .swiper-button-next,
.services-swiper .swiper-button-prev {
    color: var(--primary);
    background: rgba(255, 255, 255, 0.03);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    transition: all 0.3s ease;
}

.services-swiper .swiper-button-next::after,
.services-swiper .swiper-button-prev::after {
    font-size: 1.2rem;
    font-weight: 800;
}

.services-swiper .swiper-button-next:hover,
.services-swiper .swiper-button-prev:hover {
    background: var(--primary);
    color: var(--bg-body);
    border-color: var(--primary);
}

@media (max-width: 768px) {

    .services-swiper .swiper-button-next,
    .services-swiper .swiper-button-prev {
        display: none;
    }
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--bg-surface);
    top: 50px;
    bottom: 50px;
    left: 19px;
}

.timeline-item {
    padding: 0 0 3rem 50px;
    position: relative;
    width: 100%;
}

.timeline-dot {
    width: 16px;
    height: 16px;
    background-color: var(--primary);
    border: 4px solid var(--bg-body);
    box-shadow: 0 0 0 2px var(--primary);
    position: absolute;
    border-radius: 50%;
    left: 12px;
    /* Center on the line (19px + 1px) */
    top: 5px;
    z-index: 1;
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-content {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 12px;
    position: relative;
    border: 1px solid var(--border-subtle);
    transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.timeline-content:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.timeline-content h3 {
    margin-bottom: 0.3rem;
    font-size: 1.2rem;
    color: var(--text-main);
}

.timeline-content h4 {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: 1rem;
}

/* Responsive Timeline adjustment */
@media (min-width: 768px) {
    .timeline::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .timeline-item {
        width: 50%;
        padding: 0 40px 3rem 0;
    }

    .timeline-item:nth-child(even) {
        left: 50%;
        padding: 0 0 3rem 40px;
    }

    .timeline-item:nth-child(odd) {
        left: 0;
        text-align: right;
    }

    .timeline-item:nth-child(odd) .timeline-dot {
        left: auto;
        right: -8px;
    }

    .timeline-item:nth-child(even) .timeline-dot {
        left: -8px;
    }
}

/* Nav Mobile Active State */
.nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
    background-color: var(--bg-body);
    padding: 2rem;
    border-bottom: 1px solid var(--bg-surface);
    animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Schedule Form */
.schedule-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.schedule-form {
    background-color: var(--bg-body);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    font-size: 0.9rem;
}

input,
select {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--bg-surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-block {
    width: 100%;
    margin-top: 1rem;
}

.form-status {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
    min-height: 1.5rem;
}

.status-success {
    color: var(--primary);
}

.status-error {
    color: #ef4444;
}

@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* Honeypot for simple spam protection */
.honey {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    height: 0;
    width: 0;
    z-index: -1;
}

/* WhatsApp Floating Button */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
    color: white;
    /* Ensure icon stays white */
}

.whatsapp-btn svg {
    width: 35px;
    height: 35px;
    fill: currentColor;
}

@media (max-width: 768px) {
    .whatsapp-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }

    .whatsapp-btn svg {
        width: 28px;
        height: 28px;
    }
}

/* Premium Services Section */
.bg-surface-darker {
    background-color: var(--bg-body);
}

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

.premium-card {
    background: var(--bg-surface);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    transition: transform 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.premium-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.premium-card.highlight {
    border: 1px solid var(--primary);
    background: linear-gradient(145deg, var(--bg-surface) 0%, rgba(37, 99, 235, 0.1) 100%);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.1);
}

.premium-card .badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.premium-card h3 {
    color: var(--text-main);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.premium-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.premium-card .features {
    list-style: none;
    margin-bottom: 2rem;
}

.premium-card .features li {
    color: var(--text-main);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    opacity: 0.9;
}

.premium-card .btn-sm {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    align-self: flex-start;
}

/* WhatsApp Hover Text */
/* WhatsApp Hover Text - Permanently Visible */
.whatsapp-btn {
    width: auto;
    justify-content: center;
    overflow: hidden;
    padding: 0 15px 0 20px;
    border-radius: 50px;
}

.whatsapp-text {
    max-width: 150px;
    opacity: 1;
    white-space: nowrap;
    font-size: 0.95rem;
    font-weight: 600;
    margin-right: 10px;
}

.whatsapp-btn:hover {
    transform: translateY(-5px);
    /* Width and padding are now default */
}



/* Premium Pricing */
.premium-card .price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 1rem;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.premium-card .price .period {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-muted);
}

/* Jobs Page */
.jobs-hero {
    padding-top: 120px;
    padding-bottom: 3rem;
    text-align: center;
}

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

.job-card {
    background: var(--bg-surface);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.job-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.job-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--text-main);
}

.job-type {
    background: rgba(45, 212, 191, 0.1);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.job-company {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.job-description {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.job-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.job-tags span {
    background: var(--bg-body);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ========================================
   TUTORIALS SECTION STYLES
   ======================================== */

/* Tutorials Grid */
.tutorials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.tutorial-card {
    background: var(--bg-surface);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.tutorial-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.tutorial-card.coming-soon {
    opacity: 0.6;
}

.tutorial-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.tutorial-icon {
    font-size: 3rem;
}

.difficulty-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.difficulty-badge.beginner {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.difficulty-badge.intermediate {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
}

.difficulty-badge.advanced {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.tutorial-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.tutorial-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
    line-height: 1.6;
}

.tutorial-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Breadcrumb */
.breadcrumb {
    background: var(--bg-surface);
    padding: 1rem 0;
    margin-top: 70px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.breadcrumb a {
    color: var(--primary);
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: var(--text-muted);
}

/* Tutorial Container */
.tutorial-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* Tutorial Sidebar (TOC) */
.tutorial-sidebar {
    position: relative;
}

.toc-sticky {
    position: sticky;
    top: 100px;
    background: var(--bg-surface);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.toc-sticky h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.toc {
    list-style: none;
}

.toc li {
    margin-bottom: 0.5rem;
}

.toc a {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: block;
    padding: 0.3rem 0;
    transition: color 0.3s ease;
}

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

.toc ul {
    list-style: none;
    margin-left: 1rem;
    margin-top: 0.5rem;
}

/* Tutorial Content */
.tutorial-content {
    max-width: 900px;
}

.tutorial-header-section {
    margin-bottom: 3rem;
}

.tutorial-header-section h1 {
    font-size: 2.5rem;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.tutorial-intro {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.tutorial-section {
    margin-bottom: 3rem;
}

.tutorial-section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--bg-surface);
}

.tutorial-section h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.tutorial-section h4 {
    font-size: 1.2rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-main);
}

.tutorial-section p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: var(--text-muted);
}

.tutorial-section ul,
.tutorial-section ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
    color: var(--text-muted);
}

.tutorial-section li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Code Examples */
.code-example {
    margin: 2rem 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.code-header {
    background: #1e293b;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.code-header span {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: 'Fira Code', monospace;
}

.copy-btn {
    background: var(--primary);
    color: var(--bg-body);
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.copy-btn:hover {
    background: var(--primary-hover);
}

.code-example pre {
    margin: 0;
    padding: 1.5rem;
    background: #1e293b;
    overflow-x: auto;
}

.code-example code {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Info Boxes */
.info-box,
.warning-box,
.success-box,
.exercise-box {
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
    border-left: 4px solid;
}

.info-box {
    background: rgba(56, 189, 248, 0.1);
    border-color: #38bdf8;
}

.info-box h4 {
    color: #38bdf8;
    margin-bottom: 1rem;
}

.warning-box {
    background: rgba(251, 191, 36, 0.1);
    border-color: #fbbf24;
}

.warning-box h4 {
    color: #fbbf24;
    margin-bottom: 1rem;
}

.success-box {
    background: rgba(34, 197, 94, 0.1);
    border-color: #22c55e;
}

.success-box h4 {
    color: #22c55e;
    margin-bottom: 1rem;
}

.exercise-box {
    background: rgba(168, 85, 247, 0.1);
    border-color: #a855f7;
}

.exercise-box h4 {
    color: #a855f7;
    margin-bottom: 0.5rem;
}

.exercise-box details {
    margin-top: 1rem;
}

.exercise-box summary {
    cursor: pointer;
    color: var(--primary);
    font-weight: 600;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.exercise-box summary:hover {
    background: rgba(45, 212, 191, 0.1);
}

.exercise-box pre {
    margin-top: 1rem;
    background: #1e293b;
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
}

/* Tutorial Footer Navigation */
.tutorial-footer-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--bg-surface);
}

/* Mobile Responsive */
@media (max-width: 968px) {
    .tutorial-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .toc-sticky {
        position: static;
    }

    .tutorial-header-section h1 {
        font-size: 2rem;
    }

    .tutorial-section h2 {
        font-size: 1.5rem;
    }

    .tutorial-footer-nav {
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    .tutorial-container {
        padding: 2rem 1rem;
    }

    .tutorial-header-section h1 {
        font-size: 1.75rem;
    }

    .code-example pre {
        padding: 1rem;
        font-size: 0.85rem;
    }

    .tutorial-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ========================================
   SQL PLAYGROUND STYLES
   ======================================== */

.sql-playground {
    background: var(--bg-surface);
    border-radius: 12px;
    padding: 2.5rem;
    margin-top: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.playground-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.playground-header h4 {
    margin: 0;
    color: var(--text-main);
}

.playground-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-sample,
.btn-clear {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.btn-sample:hover {
    background: var(--primary);
    color: var(--bg-body);
    border-color: var(--primary);
}

.btn-clear {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.btn-clear:hover {
    background: rgba(239, 68, 68, 0.2);
}

#sqlEditor {
    width: 100%;
    min-height: 300px;
    padding: 1.5rem;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-main);
    font-family: 'Fira Code', monospace;
    font-size: 1rem;
    line-height: 1.8;
    resize: vertical;
}

#sqlEditor:focus {
    outline: none;
    border-color: var(--primary);
}

.query-results {
    margin-top: 2rem;
}

.success-message,
.error-message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 500;
}

.success-message {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.result-table-wrapper {
    overflow-x: auto;
    margin-top: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    background: #1e293b;
}

.result-table thead {
    background: rgba(45, 212, 191, 0.1);
}

.result-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    white-space: nowrap;
}

.result-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

.result-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.null-value {
    color: #94a3b8;
    font-style: italic;
    opacity: 0.6;
}

.result-count {
    padding: 0.75rem 1rem;
    background: #1e293b;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

@media (max-width: 600px) {
    .sql-playground {
        padding: 1rem;
    }

    .playground-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .playground-actions {
        width: 100%;
    }

    .btn-sample,
    .btn-clear {
        flex: 1;
        min-width: 70px;
    }

    #sqlEditor {
        font-size: 0.85rem;
    }

    .result-table th,
    .result-table td {
        padding: 0.5rem;
        font-size: 0.85rem;
    }
}

/* ========================================
   DATABASE SCHEMA DIAGRAM STYLES
   ======================================== */

.schema-diagram {
    background: linear-gradient(135deg, rgba(45, 212, 191, 0.05) 0%, rgba(56, 189, 248, 0.05) 100%);
    border: 2px solid rgba(45, 212, 191, 0.2);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
}

.schema-diagram h4 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.schema-tables {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.schema-table {
    background: var(--bg-surface);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.schema-table:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(45, 212, 191, 0.15);
    border-color: var(--primary);
}

.table-name {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: var(--bg-body);
    padding: 0.75rem 1rem;
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
}

.table-columns {
    padding: 1rem;
}

.column {
    padding: 0.5rem 0.75rem;
    margin: 0.25rem 0;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-left: 3px solid transparent;
}

.column.primary-key {
    background: rgba(251, 191, 36, 0.1);
    border-left-color: #fbbf24;
    color: #fbbf24;
    font-weight: 600;
}

.column.foreign-key {
    background: rgba(168, 85, 247, 0.1);
    border-left-color: #a855f7;
    color: #a855f7;
    font-weight: 600;
}

.schema-legend {
    display: flex;
    gap: 2rem;
    justify-content: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.schema-legend span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .schema-tables {
        grid-template-columns: 1fr;
    }

    .schema-legend {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }
}

/* ========================================
   TOC COLLAPSIBLE TOGGLE (MOBILE)
   ======================================== */

.toc-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.toc-toggle {
    display: none;
    background: rgba(45, 212, 191, 0.1);
    border: 1px solid rgba(45, 212, 191, 0.3);
    border-radius: 6px;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--primary);
    transition: all 0.3s ease;
}

.toc-toggle:hover {
    background: rgba(45, 212, 191, 0.2);
}

.toc-toggle svg {
    display: block;
    transition: transform 0.3s ease;
}

.toc-toggle.collapsed svg {
    transform: rotate(-90deg);
}

.toc.collapsed {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
}

.toc:not(.collapsed) {
    max-height: 2000px;
    opacity: 1;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

/* Show toggle button only on mobile */
@media (max-width: 968px) {
    .toc-toggle {
        display: block;
    }

    .toc-sticky {
        background: var(--bg-surface);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        padding: 1rem;
        margin-bottom: 2rem;
    }

    .toc-header h3 {
        margin: 0;
    }
}

/* ========================================
   SCROLL TO TOP BUTTON
   ======================================== */

.scroll-to-top {
    position: fixed;
    bottom: 100px;
    /* Elevated to avoid overlap with WhatsApp button */
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--bg-body);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(45, 212, 191, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(45, 212, 191, 0.4);
}

.scroll-to-top svg {
    width: 24px;
    height: 24px;
}



@media (max-width: 600px) {
    .scroll-to-top {
        bottom: 80px;
        /* Elevated on mobile to avoid overlap */
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* Collapsible Experience Section */
.experience-showcase {
    margin-top: 2rem;
}

.experience-toggle-container {
    text-align: center;
    margin-bottom: 2rem;
}

.experience-hint {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.experience-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    background: rgba(45, 212, 191, 0.05);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    margin-left: 0 !important;
    /* Reset btn-outline margin */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.experience-toggle-btn:hover {
    background: var(--primary);
    color: var(--bg-body);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(45, 212, 191, 0.2);
}

.experience-toggle-btn .btn-icon {
    font-size: 0.7rem;
    transition: transform 0.4s ease;
}

.experience-toggle-btn.active .btn-icon {
    transform: rotate(180deg);
}

.experience-collapse-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    visibility: hidden;
}

.experience-collapse-wrapper.expanded {
    max-height: 4000px;
    /* Large enough to contain the longest journey */
    opacity: 1;
    visibility: visible;
    margin-bottom: 2rem;
}

/* Modern Background Mesh & Parallax */
.bg-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background:
        radial-gradient(circle at 20% 20%, rgba(45, 212, 191, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(56, 189, 248, 0.05) 0%, transparent 40%);
    pointer-events: none;
    opacity: 0.8;
}

.bg-mesh::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(circle at center, black, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at center, black, transparent 80%);
}