/* ===================================================================
   SOFTWARE.CSS — Página Pública de Softwares
   =================================================================== */

/* ─── HERO ─── */
.sw-hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 140px 0 80px;
    overflow: hidden;
}

.sw-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(10,10,10,0.85) 0%, rgba(10,10,10,0.60) 100%);
}

.sw-hero .container { position: relative; z-index: 2; }

.sw-hero-content {
    max-width: 700px;
}

.sw-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.10);
    color: var(--bluegray-200);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.10);
    margin-bottom: 20px;
}

.sw-hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1.15;
    margin-bottom: 16px;
}

.sw-hero-content .highlight {
    color: var(--bluegray-200);
}

.sw-hero-desc {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.70);
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 600px;
}

.sw-hero-stats {
    display: flex;
    gap: 40px;
}

.sw-hero-stat {
    text-align: center;
}

.sw-hero-stat-num {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1.2;
}

.sw-hero-stat-label {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.50);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ─── CATEGORIAS ─── */
.sw-categories {
    padding: 80px 0 40px;
    background: var(--white);
}

.sw-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.sw-cat-card {
    background: var(--white);
    border: 1.5px solid var(--gray-200);
    border-radius: 16px;
    padding: 28px 20px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.sw-cat-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(60, 113, 144, 0.10);
}

.sw-cat-card.active {
    border-color: var(--primary);
    background: var(--bluegray-100);
    border-width: 2px;
}

.sw-cat-img {
    width: 72px;
    height: 72px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sw-cat-img img {
    max-width: 64px;
    max-height: 64px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.sw-cat-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 6px;
}

.sw-cat-card p {
    font-size: 0.82rem;
    color: var(--gray-400);
    margin-bottom: 12px;
}

.sw-cat-count {
    display: inline-block;
    background: var(--gray-100);
    color: var(--gray-500);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 3px 14px;
    border-radius: 20px;
    transition: all 0.3s;
}

.sw-cat-card:hover .sw-cat-count {
    background: var(--primary);
    color: var(--white);
}

/* ─── LISTAGEM ─── */
.sw-listing {
    padding: 40px 0 80px;
    background: var(--gray-100);
}

.sw-listing-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.sw-listing-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--black);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sw-listing-header h2 i { color: var(--primary); }

.sw-listing-count {
    font-size: 0.85rem;
    color: var(--gray-400);
}

/* ─── GRID DE SOFTWARES ─── */
.sw-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.sw-grid-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-400);
}

.sw-grid-placeholder i {
    font-size: 3rem;
    color: var(--bluegray-200);
    margin-bottom: 16px;
    display: block;
}

.sw-grid-placeholder p {
    font-size: 0.95rem;
}

/* ─── CARD DE SOFTWARE NA LISTA ─── */
.sw-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.sw-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 28px rgba(60, 113, 144, 0.08);
    transform: translateY(-3px);
}

.sw-card-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: var(--gray-100);
}

.sw-card-img-placeholder {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    color: var(--gray-300);
    font-size: 2.5rem;
}

.sw-card-body {
    padding: 16px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sw-card-top {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.sw-card-icone {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.sw-card-icone-default {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bluegray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.sw-card-info-top {
    flex: 1;
    min-width: 0;
}

.sw-card-nome {
    font-size: 1rem;
    font-weight: 700;
    color: var(--black);
    line-height: 1.2;
}

.sw-card-versao {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
    background: var(--bluegray-100);
    display: inline-block;
    padding: 1px 8px;
    border-radius: 4px;
    margin-top: 2px;
}

.sw-card-funcao {
    font-size: 0.82rem;
    color: var(--gray-400);
    margin-bottom: 10px;
    flex: 1;
}

.sw-card-funcao i {
    margin-right: 4px;
    color: var(--primary);
}

.sw-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid var(--gray-100);
}

.sw-card-tipo {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 20px;
}

.sw-card-tipo-gratis {
    background: #dcfce7;
    color: #166534;
}

.sw-card-tipo-pago {
    background: #fef3c7;
    color: #92400e;
}

.sw-card-downloads {
    font-size: 0.75rem;
    color: var(--gray-400);
}

.sw-card-downloads i { margin-right: 4px; }

/* ═══════════════════════════════════════════
   PÁGINA DE DETALHE DO SOFTWARE
   ═══════════════════════════════════════════ */

.sw-detail-hero {
    padding: 100px 0 60px;
    background: var(--white);
}

.sw-detail-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--gray-400);
    margin-bottom: 28px;
    transition: color 0.2s;
    text-decoration: none;
}

.sw-detail-back:hover {
    color: var(--primary);
}

/* ─── Header ─── */
.sw-detail-header {
    display: flex;
    align-items: flex-start;
    gap: 28px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}

.sw-detail-icon {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    overflow: hidden;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid var(--gray-200);
}

.sw-detail-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sw-detail-icon i {
    font-size: 2.5rem;
    color: var(--primary);
}

.sw-detail-info {
    flex: 1;
    min-width: 0;
}

.sw-detail-meta-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.sw-detail-categoria {
    font-size: 0.82rem;
    color: var(--gray-500);
    background: var(--gray-100);
    padding: 3px 12px;
    border-radius: 6px;
}

.sw-detail-categoria i { margin-right: 4px; }

.sw-detail-info h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--black);
    line-height: 1.2;
    margin-bottom: 4px;
}

.sw-detail-versao {
    font-size: 1rem;
    color: var(--primary);
    font-weight: 600;
}

.sw-detail-funcao {
    font-size: 0.95rem;
    color: var(--gray-500);
    margin-bottom: 12px;
}

.sw-detail-funcao i { margin-right: 6px; color: var(--primary); }

.sw-detail-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--gray-400);
}

.sw-detail-stats i { margin-right: 4px; color: var(--primary); }

/* ─── Body ─── */
.sw-detail-body {
    max-width: 900px;
}

/* ─── Galeria ─── */
.sw-detail-gallery {
    margin-bottom: 36px;
}

.sw-gallery-main {
    width: 100%;
    max-height: 420px;
    border-radius: 14px;
    overflow: hidden;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    margin-bottom: 12px;
}

.sw-gallery-main img {
    width: 100%;
    height: 100%;
    max-height: 420px;
    object-fit: contain;
    display: block;
}

.sw-gallery-thumbs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.sw-gallery-thumb {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--gray-200);
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0.6;
}

.sw-gallery-thumb:hover {
    opacity: 0.8;
    border-color: var(--bluegray-300);
}

.sw-gallery-thumb.active {
    opacity: 1;
    border-color: var(--primary);
    border-width: 2px;
}

.sw-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ─── Descrição ─── */
.sw-detail-description {
    margin-bottom: 32px;
}

.sw-detail-description h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sw-detail-description h3 i { color: var(--primary); }

.sw-detail-description p {
    font-size: 0.95rem;
    color: var(--gray-600);
    line-height: 1.7;
}

/* ─── Info Box ─── */
.sw-detail-info-box {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    padding: 24px 28px;
    margin-bottom: 32px;
}

.sw-detail-info-box h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sw-detail-info-box h3 i { color: var(--primary); }

.sw-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.sw-info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sw-info-label {
    font-size: 0.78rem;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 600;
}

.sw-info-value {
    font-size: 0.95rem;
    color: var(--gray-700);
    font-weight: 600;
}

.sw-info-preco {
    color: #f59e0b;
}

/* ─── Download ─── */
.sw-detail-download {
    margin-bottom: 40px;
}

.sw-detail-download .btn-lg {
    padding: 16px 40px;
    font-size: 1.05rem;
    gap: 12px;
}

.sw-dl-info {
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--gray-400);
}

.sw-dl-info i { margin-right: 6px; color: var(--primary); }

.sw-dl-unavailable {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    color: #b91c1c;
    font-size: 0.9rem;
}

.sw-dl-unavailable i { font-size: 1.2rem; }

/* ─── Badges ─── */
.sw-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sw-badge-gratis {
    background: #dcfce7;
    color: #166534;
}

.sw-badge-pago {
    background: #fef3c7;
    color: #92400e;
}

/* ═══════════════════════════════════════════
   RESPONSIVO
   ═══════════════════════════════════════════ */
@media (max-width: 768px) {
    .sw-hero { min-height: 50vh; padding: 120px 0 50px; }
    .sw-hero-content h1 { font-size: 2rem; }
    .sw-hero-desc { font-size: 0.95rem; }
    .sw-hero-stats { gap: 24px; }
    .sw-hero-stat-num { font-size: 1.5rem; }

    .sw-cat-grid { grid-template-columns: 1fr 1fr; }
    .sw-grid { grid-template-columns: 1fr; }

    .sw-detail-header { flex-direction: column; align-items: center; text-align: center; }
    .sw-detail-meta-top { justify-content: center; }
    .sw-detail-info h1 { font-size: 1.5rem; }
    .sw-detail-stats { justify-content: center; }
    .sw-gallery-main { max-height: 280px; }
    .sw-info-grid { grid-template-columns: 1fr 1fr; }
    .sw-detail-download { text-align: center; }
}

@media (max-width: 480px) {
    .sw-cat-grid { grid-template-columns: 1fr; }
    .sw-detail-icon { width: 72px; height: 72px; }
    .sw-info-grid { grid-template-columns: 1fr; }
}
