/**
 * MK-Store - Marketplace de Apps para Provedores
 * @author Pedro Filho
 * @version 1.0.0
 * @date 2025-12-05
 */

/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --secondary: #764ba2;
    --accent: #f093fb;
    --success: #43e97b;
    --warning: #fee140;
    --danger: #f5576c;
    --dark: #1a202c;
    --gray: #718096;
    --light: #f7fafc;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: var(--dark);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo i {
    color: var(--primary);
    -webkit-text-fill-color: var(--primary);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

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

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
}

.nav-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Buttons */
button {
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: all 0.3s;
    border-radius: 8px;
}

.btn-search {
    background: transparent;
    color: var(--gray);
    font-size: 1.2rem;
    padding: 0.5rem;
}

.btn-login {
    background: transparent;
    color: var(--dark);
    padding: 0.5rem 1rem;
}

.btn-login:hover {
    background: var(--light);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 0.75rem 1.5rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-primary.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-secondary {
    background: var(--light);
    color: var(--dark);
    padding: 0.75rem 1.5rem;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.btn-secondary.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--primary);
}

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

/* Hero Section */
.hero {
    padding: 6rem 0;
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text {
    z-index: 1;
}

.badge {
    display: inline-block;
    background: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--dark), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.25rem;
    color: var(--gray);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    gap: 3rem;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat strong {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.stat span {
    font-size: 0.9rem;
    color: var(--gray);
}

/* Mockup Browser */
.mockup-browser {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.browser-header {
    background: #f0f0f0;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.browser-dots {
    display: flex;
    gap: 0.5rem;
}

.browser-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e0e0e0;
}

.browser-dots span:nth-child(1) { background: #ff5f56; }
.browser-dots span:nth-child(2) { background: #ffbd2e; }
.browser-dots span:nth-child(3) { background: #27c93f; }

.browser-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.browser-content img {
    max-width: 100%;
    border-radius: 8px;
}

/* Categories */
.categories {
    padding: 6rem 0;
    background: var(--white);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 3rem;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    cursor: pointer;
    border: 2px solid transparent;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.category-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.category-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.category-card p {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Featured Apps */
.featured-apps {
    padding: 6rem 0;
    background: linear-gradient(180deg, var(--white) 0%, var(--light) 100%);
}

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

.filter-tabs {
    display: flex;
    gap: 0.5rem;
    background: var(--white);
    padding: 0.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.tab {
    background: transparent;
    color: var(--gray);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
}

.tab.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.apps-loading,
.apps-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: var(--gray);
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.app-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    position: relative;
    border: 2px solid transparent;
}

.app-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.app-card.featured {
    border: 2px solid var(--primary);
}

.app-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.app-badge.free {
    background: var(--success);
}

.app-badge.new {
    background: var(--warning);
    color: var(--dark);
}

.app-icon {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    margin-bottom: 1.5rem;
}

.app-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--dark);
}

.app-description {
    color: var(--gray);
    margin-bottom: 1.5rem;
    min-height: 3em;
}

.app-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.app-tag {
    background: #eef2ff;
    color: #3949ab;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
}

.app-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.rating,
.downloads {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray);
}

.rating i {
    color: var(--warning);
}

.app-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.app-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

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

.price.free {
    color: var(--success);
}

.btn-install {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
}

.btn-install:hover {
    transform: scale(1.05);
}

.btn-install-wm {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: not-allowed;
    opacity: 0.35;
    filter: grayscale(0.25);
    user-select: none;
    box-shadow: none;
    transform: none;
}

.btn-install-wm:hover {
    transform: none;
}

/* ── Botão SSH Install ── */
.btn-install-ssh {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-install-ssh:hover {
    background: linear-gradient(135deg, #0e8177 0%, #2bd469 100%);
    transform: scale(1.05);
}

.btn-view-screens {
    background: #eef2ff;
    color: #3047b5;
    border: 1px solid #cfd8ff;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-view-screens:hover {
    background: #e2e9ff;
    border-color: #b8c6ff;
}

.btn-view-screens.empty {
    background: #f1f5f9;
    border-color: #dbe3ee;
    color: #64748b;
}

/* ── Modal de screenshots ── */
.screens-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.screens-modal-overlay[hidden] {
    display: none;
}

.screens-modal-box {
    width: min(920px, 100%);
    background: var(--white);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow-lg);
    animation: fadeUp 0.2s ease;
}

.screens-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.screens-modal-header h3 {
    color: var(--primary);
    font-size: 1.15rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.screens-modal-close {
    background: transparent;
    border: 0;
    color: #64748b;
    font-size: 1rem;
    width: 34px;
    height: 34px;
    border-radius: 8px;
}

.screens-modal-close:hover {
    background: #eef2ff;
}

.screens-modal-subtitle {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.screens-main-wrap {
    width: 100%;
    max-height: 58vh;
    border-radius: 12px;
    overflow: hidden;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.screens-main-image {
    width: 100%;
    max-height: 58vh;
    object-fit: contain;
    display: block;
    background: #f8fafc;
}

.screens-thumbs {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.screens-thumb {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    background: #f8fafc;
    padding: 0;
    line-height: 0;
}

.screens-thumb.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.15);
}

.screens-thumb img {
    width: 100%;
    height: 82px;
    object-fit: cover;
    display: block;
}

/* ── Modal SSH ── */
.ssh-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.ssh-modal-overlay[hidden] {
    display: none;
}

.ssh-modal-box {
    background: var(--white);
    border-radius: 16px;
    padding: 32px;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
    animation: fadeUp 0.25s ease;
}

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

.ssh-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.ssh-modal-header h3 {
    color: var(--primary);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ssh-modal-close {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--gray);
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

.ssh-modal-close:hover {
    background: var(--light);
    color: var(--dark);
}

.ssh-modal-desc {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.ssh-form-group {
    margin-bottom: 14px;
}

.ssh-form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: #444;
    margin-bottom: 5px;
}

.ssh-form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
    color: var(--dark);
}

.ssh-form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.ssh-status {
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 0.88rem;
    margin-bottom: 14px;
    line-height: 1.5;
}

.ssh-status pre {
    margin-top: 8px;
    font-size: 0.76rem;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 140px;
    overflow-y: auto;
    background: rgba(0,0,0,0.06);
    padding: 8px;
    border-radius: 6px;
}

.ssh-install-list {
    margin: 8px 0 0 18px;
}

.ssh-install-note {
    margin-top: 8px;
    font-weight: 500;
}

.ssh-install-warn,
.ssh-install-next {
    margin-top: 10px;
}

.ssh-install-details {
    margin-top: 10px;
}

.ssh-install-details summary {
    cursor: pointer;
    font-weight: 700;
}

.ssh-info    { background: #e8f4fd; color: #1a6fa8; border-left: 4px solid #3b9de2; }
.ssh-success { background: #e6f9f0; color: #1a7a47; border-left: 4px solid #38ef7d; }
.ssh-danger  { background: #fdecea; color: #a93226; border-left: 4px solid var(--danger); }

.ssh-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 8px;
}

.btn-testar-ssh {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-testar-ssh:hover {
    opacity: 0.85;
    transform: scale(1.03);
}

.ssh-input-senha-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.ssh-input-senha-wrap input {
    padding-right: 44px;
}

.ssh-btn-toggle-senha {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 2px;
    color: #888;
    transition: color 0.2s;
}

.ssh-btn-toggle-senha:hover {
    color: var(--dark);
}

.load-more {
    text-align: center;
    margin-top: 3rem;
}

/* Pricing */
.pricing {
    padding: 6rem 0;
    background: var(--white);
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--gray);
    margin-top: -2rem;
    margin-bottom: 4rem;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--white);
    padding: 3rem 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    text-align: center;
    position: relative;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.pricing-card.popular {
    border-color: var(--primary);
    transform: scale(1.05);
}

.popular-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
}

.pricing-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.price {
    margin-bottom: 2rem;
}

.currency {
    font-size: 1.5rem;
    color: var(--gray);
    vertical-align: top;
}

.amount {
    font-size: 4rem;
    font-weight: 800;
    color: var(--dark);
}

.period {
    font-size: 1rem;
    color: var(--gray);
}

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

.features li {
    padding: 1rem 0;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.features li:last-child {
    border-bottom: none;
}

.features i {
    font-size: 1.1rem;
}

.features .fa-check {
    color: var(--success);
}

.features .fa-times {
    color: var(--gray);
}

/* Developers CTA */
.developers-cta {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--dark) 0%, #2d3748 100%);
    color: white;
}

.cta-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.cta-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.cta-text p {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.benefits {
    list-style: none;
    margin-bottom: 2rem;
}

.benefits li {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    font-size: 1.1rem;
}

.benefits i {
    color: var(--success);
    font-size: 1.3rem;
}

.code-preview {
    background: #1a1a2e;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.code-header {
    background: #16213e;
    padding: 1rem;
    color: white;
    font-size: 0.9rem;
}

.code-preview pre {
    padding: 2rem;
    margin: 0;
    overflow-x: auto;
}

.code-preview code {
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #a8dadc;
}

/* Footer */
.footer {
    background: var(--dark);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.footer-col p {
    opacity: 0.8;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-col h4 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col ul a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col ul a:hover {
    color: white;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    opacity: 0.7;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

/* ── Hamburger button ───────────────────────────────────────────────── */
.btn-hamburger {
    display: none;
    background: transparent;
    border: none;
    color: var(--dark);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
}
.btn-hamburger:hover { background: var(--light); }

/* Mobile drawer */
.mobile-nav {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0,0,0,0.45);
}
.mobile-nav.open { display: block; }

.mobile-nav-drawer {
    position: absolute;
    top: 0;
    right: 0;
    width: min(300px, 85vw);
    height: 100%;
    background: var(--white);
    box-shadow: -4px 0 30px rgba(0,0,0,0.15);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0;
    animation: slideInRight 0.22s ease;
    overflow-y: auto;
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
}

.mobile-nav-close {
    align-self: flex-end;
    background: var(--light);
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 1.1rem;
    cursor: pointer;
    margin-bottom: 1rem;
    color: var(--dark);
}

.mobile-nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-links li + li { border-top: 1px solid #f0f0f0; }

.mobile-nav-links a {
    display: block;
    padding: 1rem 0.5rem;
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    font-size: 1.05rem;
    transition: color 0.2s;
}
.mobile-nav-links a:hover { color: var(--primary); }

.mobile-nav-actions {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.mobile-nav-actions a { width: 100%; text-align: center; }
.mobile-nav-actions .btn-primary,
.mobile-nav-actions .btn-login {
    display: block;
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
}
.mobile-nav-actions .btn-primary { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: white; }
.mobile-nav-actions .btn-login   { background: var(--light); color: var(--dark); }

/* ── Responsive 768px ────────────────────────────────────────────────── */
@media (max-width: 768px) {
    /* --- Nav --- */
    .nav-menu, .nav-buttons { display: none; }
    .btn-hamburger { display: block; }

    /* --- Hero --- */
    .hero { padding: 3.5rem 0 2.5rem; }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero h1 { font-size: 2.1rem; }
    .hero p  { font-size: 1.05rem; margin-bottom: 1.5rem; }

    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    .hero-buttons .btn-lg { width: 100%; text-align: center; }

    .hero-stats { gap: 1.5rem; flex-wrap: wrap; }
    .stat strong { font-size: 1.6rem; }

    /* Hide browser mockup — replace with compact visual */
    .hero-image { display: none; }

    /* --- Sections spacing --- */
    .categories   { padding: 3.5rem 0; }
    .featured-apps { padding: 3.5rem 0; }
    .pricing      { padding: 3.5rem 0; }
    .developers-cta { padding: 3.5rem 0; }
    .footer       { padding: 3rem 0 1.5rem; }

    .section-title { font-size: 1.8rem; margin-bottom: 2rem; }

    /* --- Categories --- */
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.85rem;
    }
    .category-card { padding: 1.2rem 0.75rem; }
    .category-icon { width: 52px; height: 52px; font-size: 1.4rem; margin-bottom: 0.75rem; }
    .category-card h3 { font-size: 0.9rem; margin-bottom: 0.2rem; }
    .category-card p  { font-size: 0.78rem; }

    /* --- App section header --- */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    /* --- Filter tabs --- */
    .filter-tabs {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 0.4rem;
        gap: 0.35rem;
    }
    .filter-tabs::-webkit-scrollbar { display: none; }
    .tab { padding: 0.6rem 1rem; font-size: 0.875rem; white-space: nowrap; }

    /* --- Apps grid: 2 cols on tablet --- */
    .apps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    /* --- App card --- */
    .app-card { padding: 1.25rem; }
    .app-icon  { width: 56px; height: 56px; font-size: 1.7rem; margin-bottom: 1rem; }
    .app-card h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
    .app-description { font-size: 0.85rem; margin-bottom: 1rem; min-height: unset; }
    .app-tags  { gap: 0.3rem; margin-bottom: 0.75rem; }
    .app-tag   { font-size: 0.7rem; padding: 0.15rem 0.45rem; }
    .app-meta  { gap: 0.75rem; margin-bottom: 1rem; font-size: 0.8rem; }
    .app-badge { font-size: 0.72rem; padding: 0.3rem 0.65rem; }

    .app-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding-top: 1rem;
    }
    .price { font-size: 1.2rem; }
    .app-actions { width: 100%; justify-content: space-between; }
    .btn-install-ssh,
    .btn-install-wm,
    .btn-view-screens { font-size: 0.8rem; padding: 0.6rem 0.85rem; }

    /* --- Pricing --- */
    .pricing-grid { grid-template-columns: 1fr; }
    .pricing-card.popular { transform: none; }

    /* --- Developers CTA --- */
    .cta-content { grid-template-columns: 1fr; gap: 2rem; }
    .cta-text h2 { font-size: 1.8rem; }
    .cta-text p  { font-size: 1rem; }
    .benefits li { font-size: 0.95rem; }
    .code-preview { display: none; }

    /* --- Footer --- */
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    .footer-col:first-child { grid-column: 1 / -1; }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    .footer-links { gap: 1.25rem; justify-content: center; }
}

/* ── Responsive 480px (phones) ───────────────────────────────────────── */
@media (max-width: 480px) {
    .container { padding: 0 14px; }

    /* --- Nav --- */
    .navbar { padding: 0.85rem 0; }
    .logo   { font-size: 1.2rem; }

    /* --- Hero --- */
    .hero { padding: 2.5rem 0 2rem; }
    .hero h1 { font-size: 1.75rem; }
    .hero p  { font-size: 0.95rem; }
    .badge   { font-size: 0.8rem; }

    /* --- Categories: 2 cols on phone --- */
    .categories-grid { grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
    .category-card   { padding: 1rem 0.5rem; }

    /* --- Apps: single col on phones --- */
    .apps-grid { grid-template-columns: 1fr; }

    /* --- App card compact --- */
    .app-card { padding: 1rem; }
    .app-icon  { width: 48px; height: 48px; font-size: 1.4rem; margin-bottom: 0.75rem; }
    .app-card h3 { font-size: 1rem; }
    .app-badge { font-size: 0.68rem; padding: 0.25rem 0.5rem; top: 0.6rem; right: 0.6rem; }

    .btn-install-ssh,
    .btn-install-wm,
    .btn-view-screens { flex: 1; text-align: center; }

    /* --- Section title --- */
    .section-title { font-size: 1.5rem; }

    /* --- Footer grid collapse to 1 col --- */
    .footer-content { grid-template-columns: 1fr; }

    /* --- SSH modal full-screen on phone --- */
    .ssh-modal-box {
        padding: 18px 14px;
        border-radius: 12px;
        max-width: 100%;
    }
    .ssh-modal-actions { flex-direction: column-reverse; }
    .ssh-modal-actions button { width: 100%; }

    .screens-modal-box { padding: 12px; }
    .screens-thumbs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .screens-thumb img { height: 64px; }
}
