:root {
    --primary: #0f172a;
    --secondary: #1e293b;
    --accent: #2563eb;
    --accent-dark: #1d4ed8;
    --text: #334155;
    --muted: #64748b;
    --bg: #f8fafc;
    --white: #ffffff;
    --success: #16a34a;
    --warning: #d97706;
    --border: #e2e8f0;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.13);
    --radius: 18px;
}

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

.logoHeader {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 20px;
    font-weight: bold;
}

.logoHeader img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: min(1120px, 92%);
    margin: 0 auto;
}

/* ── BUTTONS ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 22px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.btn-primary {
    background: var(--accent);
    color: var(--white);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-ghost {
    background: #eff6ff;
    color: var(--accent);
    border: 1px solid #bfdbfe;
}

.btn-ghost:hover {
    background: #dbeafe;
}

.btn-sm {
    padding: 9px 16px;
    font-size: 0.88rem;
}

/* ── HEADER ── */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(248, 250, 252, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    gap: 16px;
}

.logo {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 18px;
    align-items: center;
}

.nav-links a {
    font-size: 0.95rem;
    color: var(--text);
    font-weight: 500;
}

.menu-toggle {
    display: none;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--white);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: var(--primary);
    border-radius: 99px;
    transition: 0.3s ease;
    display: block;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

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

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── BREADCRUMB ── */
.breadcrumb {
    font-size: 0.9rem;
    color: var(--muted);
    padding: 16px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--muted);
    transition: color 0.2s;
}

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

.breadcrumb-sep {
    color: #cbd5e1;
}

/* ── HERO DETAIL ── */
.detail-hero {
    background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);
    padding: 40px 0 0;
}

.detail-hero-inner {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 36px;
    align-items: start;
}

.detail-tag-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    align-items: center;
}

.tag {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
}

.tag-blue {
    background: #dbeafe;
    color: #1e40af;
}

.tag-green {
    background: #dcfce7;
    color: #15803d;
}

.tag-orange {
    background: #ffedd5;
    color: #c2410c;
}

.tag-purple {
    background: #ede9fe;
    color: #6d28d9;
}

.tag-gray {
    background: #f1f5f9;
    color: #475569;
}

.detail-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: var(--primary);
    line-height: 1.2;
    margin-bottom: 14px;
    font-weight: 800;
}

.detail-hero-desc {
    font-size: 1.05rem;
    color: var(--muted);
    margin-bottom: 24px;
    max-width: 680px;
}

.detail-hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

/* ── META CARD ── */
.meta-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 88px;
}

.meta-card h3 {
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.meta-list {
    list-style: none;
    display: grid;
    gap: 14px;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.92rem;
}

.meta-label {
    color: var(--muted);
    font-weight: 500;
    flex-shrink: 0;
}

.meta-value {
    color: var(--primary);
    font-weight: 600;
    text-align: right;
}

.meta-divider {
    height: 1px;
    background: var(--border);
    margin: 6px 0;
}

.meta-cta {
    margin-top: 20px;
    display: grid;
    gap: 10px;
}

.meta-cta .btn {
    width: 100%;
    justify-content: center;
}

/* ── PREVIEW AREA ── */
.preview-section {
    padding: 56px 0;
}

.preview-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 10px 20px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.25s ease;
    font-family: inherit;
}

.tab-btn.active {
    background: var(--accent);
    color: var(--white);
    border-color: var(--accent);
}

.tab-btn:hover:not(.active) {
    border-color: var(--accent);
    color: var(--accent);
}

.tab-panel {
    display: none;
}

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

/* ── SCREENSHOT GALLERY ── */
.screenshot-main {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    margin-bottom: 16px;
    background: #0f172a;
    position: relative;
}

.screenshot-main img {
    width: 100%;
    height: 480px;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}

.screenshot-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.thumb-item {
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: 0.25s ease;
    box-shadow: var(--shadow);
}

.thumb-item:hover,
.thumb-item.active {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.thumb-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
}

/* ── VIDEO PANEL ── */
.video-wrap {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    background: #0f172a;
    position: relative;
}

.video-wrap video {
    width: 100%;
    height: 480px;
    object-fit: cover;
    display: block;
}

.video-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.45);
    transition: 0.3s ease;
}

.video-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.play-big {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 1.6rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease;
}

.play-big:hover {
    transform: scale(1.08);
}

/* ── LIVE DEMO PANEL ── */
.demo-frame-wrap {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.demo-frame-bar {
    background: #1e293b;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.frame-dots {
    display: flex;
    gap: 7px;
}

.frame-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
}

.frame-dot:nth-child(1) {
    background: #ef4444;
}

.frame-dot:nth-child(2) {
    background: #f59e0b;
}

.frame-dot:nth-child(3) {
    background: #22c55e;
}

.frame-url {
    flex: 1;
    background: #0f172a;
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 0.82rem;
    color: #94a3b8;
    font-family: monospace;
}

.demo-frame-wrap iframe {
    width: 100%;
    height: 520px;
    border: none;
    display: block;
    background: #f8fafc;
}

.demo-frame-placeholder {
    width: 100%;
    height: 520px;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: var(--muted);
}

.demo-frame-placeholder .placeholder-icon {
    font-size: 3rem;
}

.demo-frame-placeholder p {
    font-size: 1rem;
    font-weight: 500;
}

/* ── CONTENT SECTIONS ── */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 36px;
    padding: 0 0 72px;
    align-items: start;
}

.content-main {
    min-width: 0;
}

.section-block {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    margin-bottom: 22px;
}

.section-block h2 {
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.section-block h3 {
    font-size: 1.05rem;
    color: var(--primary);
    margin: 18px 0 8px;
}

.section-block p {
    color: var(--muted);
    font-size: 0.97rem;
    margin-bottom: 12px;
}

.section-block p:last-child {
    margin-bottom: 0;
}

/* ── FEATURE LIST ── */
.feature-list {
    list-style: none;
    display: grid;
    gap: 12px;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.97rem;
    color: var(--text);
}

.feature-check {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: #dcfce7;
    color: var(--success);
    display: grid;
    place-items: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ── TECH STACK ── */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
}

.tech-item {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    text-align: center;
    transition: 0.25s ease;
}

.tech-item:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.tech-icon {
    font-size: 1.6rem;
    margin-bottom: 8px;
}

.tech-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
}

.tech-role {
    font-size: 0.78rem;
    color: var(--muted);
    margin-top: 2px;
}

/* ── STATS ROW ── */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 22px;
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 500;
}

/* ── SIDEBAR ── */
.content-sidebar {
    position: sticky;
    top: 88px;
}

.sidebar-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    margin-bottom: 18px;
}

.sidebar-card h3 {
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

/* ── RELATED PROJECTS ── */
.related-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    transition: 0.2s ease;
}

.related-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.related-item:first-child {
    padding-top: 0;
}

.related-item:hover {
    color: var(--accent);
}

.related-thumb {
    width: 56px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.related-info {
    min-width: 0;
}

.related-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.related-tag {
    font-size: 0.78rem;
    color: var(--muted);
}

/* ── SHARE ── */
.share-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.share-btn {
    flex: 1;
    min-width: 80px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--white);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    text-align: center;
    transition: 0.25s ease;
    font-family: inherit;
}

.share-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ── CTA BOTTOM ── */
.cta-bottom {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    border-radius: 24px;
    padding: 48px 32px;
    text-align: center;
    color: white;
    margin-bottom: 72px;
}

.cta-bottom h2 {
    font-size: clamp(1.5rem, 3.5vw, 2.2rem);
    margin-bottom: 12px;
}

.cta-bottom p {
    color: #dbeafe;
    max-width: 600px;
    margin: 0 auto 24px;
    font-size: 1rem;
}

.cta-bottom-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── FOOTER ── */
footer {
    padding: 28px 0;
    text-align: center;
    color: var(--muted);
    font-size: 0.95rem;
    border-top: 1px solid var(--border);
}

/* ── WHATSAPP FLOAT ── */
.whatsapp-float {
    position: fixed;
    right: 18px;
    bottom: 18px;
    background: #25d366;
    color: white;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    box-shadow: 0 12px 30px rgba(37, 211, 102, 0.35);
    z-index: 1001;
    transition: transform 0.2s ease;
}

.whatsapp-float:hover {
    transform: scale(1.08);
}

/* ── BACK TO TOP ── */
.back-top {
    position: fixed;
    right: 18px;
    bottom: 90px;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--primary);
    display: grid;
    place-items: center;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: var(--shadow);
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s ease;
}

.back-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.back-top:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .detail-hero-inner,
    .content-grid {
        grid-template-columns: 1fr;
    }

    .meta-card,
    .content-sidebar {
        position: static;
    }

    .screenshot-main img,
    .video-wrap video,
    .demo-frame-wrap iframe,
    .demo-frame-placeholder {
        height: 260px;
    }

    .screenshot-thumbs {
        grid-template-columns: repeat(4, 1fr);
    }

    .stats-row {
        grid-template-columns: repeat(3, 1fr);
    }

    .menu-toggle {
        display: inline-flex;
    }

    .nav-links {
        position: fixed;
        top: 78px;
        left: 0;
        right: 0;
        background: rgba(248, 250, 252, 0.98);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--border);
        padding: 18px 4%;
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        transform: translateY(-140%);
        opacity: 0;
        pointer-events: none;
        transition: 0.3s ease;
        z-index: 1002;
    }

    .nav-links.show {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 560px) {
    .stats-row {
        grid-template-columns: 1fr 1fr;
    }

    .stats-row .stat-card:last-child {
        grid-column: span 2;
    }

    .screenshot-thumbs {
        grid-template-columns: repeat(2, 1fr);
    }

    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
