/* VexFab Premium Theme - Advanced Styles */

/* ===== NAVBAR ===== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(9, 9, 11, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(39, 39, 42, 0.5);
    padding: 16px 0;
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.navbar-brand a,
.navbar-brand .site-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 32px;
    flex: 1;
}

.navbar-nav {
    display: flex;
    list-style: none;
    gap: 32px;
    margin: 0;
    padding: 0;
}

.navbar-nav a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
    transition: color 0.3s ease;
}

.navbar-nav a:hover {
    color: var(--accent-primary);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.navbar-search {
    display: flex;
    align-items: center;
    background: rgba(39, 39, 42, 0.5);
    border: 1px solid rgba(39, 39, 42, 0.8);
    border-radius: 8px;
    padding: 8px 12px;
    gap: 8px;
}

.search-input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    width: 200px;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

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

.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.navbar-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.navbar-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.navbar-toggle.active span:nth-child(2) {
    opacity: 0;
}

.navbar-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* Mobile Menu Drawer */
.mobile-menu-drawer {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: var(--bg-base);
    z-index: 999;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.mobile-menu-drawer.active {
    right: 0;
}

.mobile-menu-close {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 20px;
    cursor: pointer;
    color: var(--text-primary);
}

.mobile-menu-content {
    padding: 20px;
}

.mobile-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mobile-nav a {
    display: block;
    color: var(--text-primary);
    font-weight: 500;
    padding: 12px;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.mobile-nav a:hover {
    background: rgba(139, 92, 246, 0.1);
}

/* ===== HERO SECTION ===== */
.hero {
    padding: 80px 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(99, 102, 241, 0.05) 100%);
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

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

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-graphic {
    width: 100%;
    max-width: 600px;
    aspect-ratio: 4/3;
    animation: float 6s ease-in-out infinite;
}

.hero-graphic img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

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

/* ===== FEATURED SECTION ===== */
.featured-section {
    padding: 80px 0;
}

.section-header {
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* ===== CATEGORIES SECTION ===== */
.categories-section {
    padding: 80px 0;
    background: rgba(139, 92, 246, 0.02);
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}

.category-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 0 30px var(--glow-purple);
    transform: translateY(-8px);
}

.category-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 12px;
    margin-bottom: 16px;
    color: var(--accent-primary);
}

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

.category-card p {
    font-size: 14px;
    color: var(--text-muted);
}

/* ===== CTA SECTION ===== */
.cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    border-radius: var(--border-radius);
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.cta-content p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.btn-lg {
    padding: 16px 40px;
    font-size: 16px;
}

/* ===== ARCHIVE LAYOUT ===== */
.archive-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    margin-top: 40px;
}

.archive-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.filter-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
}

.filter-section h3 {
    font-size: 16px;
    margin-bottom: 16px;
}

.filter-input,
.filter-select {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
}

.filter-input::placeholder {
    color: var(--text-muted);
}

.filter-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.checkbox-label input {
    cursor: pointer;
    accent-color: var(--accent-primary);
}

.archive-main {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.archive-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.view-options {
    display: flex;
    gap: 12px;
}

.view-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.view-btn:hover,
.view-btn.active {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.workflows-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* ===== WORKFLOW CARD ===== */
.workflow-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.workflow-card:hover .card-image img {
    transform: scale(1.05);
}

.card-image .badge {
    position: absolute;
    top: 12px;
    right: 12px;
}

.card-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    padding: 20px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
}

.card-title a {
    color: var(--text-primary);
}

.card-title a:hover {
    color: var(--accent-primary);
}

.card-excerpt {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.card-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-actions {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

/* ===== SINGLE WORKFLOW ===== */
.workflow-header {
    margin-bottom: 40px;
}

.workflow-title-section {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.workflow-title-section h1 {
    margin: 0;
}

.workflow-meta-quick {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.workflow-layout {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 40px;
    margin-bottom: 60px;
}

.sticky-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-card h3 {
    font-size: 16px;
    margin-bottom: 16px;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.info-item .label {
    color: var(--text-secondary);
}

.info-item .value {
    color: var(--text-primary);
    font-weight: 600;
}

.share-buttons {
    display: flex;
    gap: 12px;
}

.share-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    color: var(--accent-primary);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.share-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: var(--accent-primary);
}

/* Gallery Slider */
.workflow-gallery {
    position: relative;
    margin-bottom: 40px;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.gallery-slider {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    border-radius: var(--border-radius);
}

.gallery-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    flex-shrink: 0;
    scroll-snap-align: start;
}

.gallery-controls {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
}

.gallery-prev,
.gallery-next {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.gallery-prev:hover,
.gallery-next:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* Tabs */
.workflow-tabs {
    margin-bottom: 40px;
}

.tabs-header {
    display: flex;
    gap: 32px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 32px;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 600;
    padding: 12px 0;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
    position: relative;
    bottom: -1px;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tutorial-steps {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.tutorial-step {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 24px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.step-number {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 50%;
    font-weight: 700;
    font-size: 20px;
    color: white;
    flex-shrink: 0;
}

.step-content h4 {
    margin-bottom: 12px;
}

.step-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.step-image-wrapper {
    margin-top: 24px;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.step-image-lightbox {
    display: block;
    position: relative;
    cursor: zoom-in;
}

.step-image-lightbox:hover .step-image {
    transform: scale(1.02);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
}

.step-image-lightbox:hover .image-overlay {
    opacity: 1;
}

/* Simple Lightbox Modal Styles */
.vexfab-lightbox-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    cursor: zoom-out;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.workflow-video {
    margin-bottom: 40px;
}

.workflow-video h3 {
    margin-bottom: 20px;
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--border-radius);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: var(--border-radius);
}

/* Related Workflows */
.related-workflows {
    padding: 60px 0;
    border-top: 1px solid var(--border-color);
}

.related-workflows h2 {
    margin-bottom: 40px;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 20px;
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h4 {
    font-size: 16px;
    margin-bottom: 20px;
}

.footer-brand h3 {
    margin-bottom: 12px;
}

.footer-brand p {
    font-size: 14px;
    color: var(--text-secondary);
}

.footer-nav,
.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-nav a,
.footer-links a {
    color: var(--text-secondary);
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-nav a:hover,
.footer-links a:hover {
    color: var(--accent-primary);
}

.newsletter-form {
    display: flex;
    gap: 8px;
}

.newsletter-form input {
    flex: 1;
    padding: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
}

.newsletter-form input::placeholder {
    color: var(--text-muted);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-secondary);
}

.footer-socials {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 6px;
    color: var(--accent-primary);
    transition: var(--transition);
}

.social-link:hover {
    background: rgba(139, 92, 246, 0.2);
    transform: translateY(-2px);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .navbar-search {
        display: none;
    }

    .hero .container {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        display: none;
    }

    .archive-layout {
        grid-template-columns: 1fr;
    }

    .workflow-layout {
        grid-template-columns: 1fr;
    }

    .sticky-sidebar {
        position: static;
    }
}

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

    .navbar-toggle {
        display: flex;
    }

    .mobile-menu-drawer {
        display: block;
    }

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

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
        text-align: center;
    }

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

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

    .archive-sidebar {
        display: none;
    }

    .tabs-header {
        gap: 16px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tab-btn {
        white-space: nowrap;
    }

    .tutorial-step {
        grid-template-columns: 1fr;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .navbar-container {
        padding: 0 16px;
        gap: 12px;
    }

    .navbar-actions {
        gap: 8px;
    }

    .btn {
        padding: 10px 16px;
        font-size: 12px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

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

    .workflow-meta-quick {
        gap: 12px;
    }

    .meta-item {
        font-size: 11px;
    }
}
