/* ============================================================
   AppsHero - Main Stylesheet
   Dark theme para sitio de descarga de software
   ============================================================ */

:root {
  --bg-primary:    #0d0f14;
  --bg-secondary:  #141720;
  --bg-card:       #1a1d27;
  --bg-elevated:   #1f2235;
  --border:        #2a2d3e;
  --border-light:  #343750;
  --accent:        #00d4ff;
  --accent-hover:  #00b8e0;
  --accent-glow:   rgba(0,212,255,.18);
  --green:         #00e676;
  --red:           #ff4d6d;
  --yellow:        #ffd600;
  --orange:        #ff6b35;
  --purple:        #9b6bff;
  --text-primary:  #e8eaf0;
  --text-secondary:#9098b5;
  --text-muted:    #5c6385;
  --font-main:     'Inter', sans-serif;
  --font-body:     'Inter', sans-serif;
  --font-mono:     'JetBrains Mono', monospace;
  --radius:        10px;
  --radius-sm:     6px;
  --radius-lg:     16px;
  --shadow:        0 4px 24px rgba(0,0,0,.45);
  --shadow-glow:   0 0 24px rgba(0,212,255,.2);
  --transition:    .2s cubic-bezier(.4,0,.2,1);
  --header-h:      64px;
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: .95rem;
  line-height: 1.65;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: .9rem;
  padding: .5rem .75rem;
  outline: none;
  transition: border var(--transition);
  width: 100%;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
select option { background: var(--bg-elevated); }

/* ── Container ─────────────────────────────────────────── */
.container { max-width: 1400px; margin: 0 auto; padding: 0 20px; }
.container-wide { max-width: 1440px; margin: 0 auto; padding: 0 20px; }

/* ── HEADER ────────────────────────────────────────────── */
#site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(13,15,20,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 100%;
}
.site-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-top: 9px;
}
.site-logo .custom-logo {
  max-height: 50px;
  width: auto;
  height: auto;
}
.logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: #fff;
}
.logo-text {
  font-family: var(--font-main);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--text-primary);
  letter-spacing: -.5px;
}
.logo-text span { color: var(--accent); }

/* Search bar */
.header-search {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  max-width: 100%;
}
.header-search input {
  background: var(--bg-card);
  border-color: var(--border);
  border-radius: 50px;
  padding: .55rem 3rem .55rem 1.2rem;
  font-size: .9rem;
  height: 42px;
  width: 100%;
  max-width: 520px;
}
.header-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.search-btn {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--text-secondary);
  font-size: .95rem; padding: 4px;
}
.search-btn:hover { color: var(--accent); }
/* Live search dropdown */
.live-search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 999;
  display: none;
  max-height: 400px;
  overflow-y: auto;
}
.live-search-results.active { display: block; }
.live-result-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.live-result-item:last-child { border-bottom: none; }
.live-result-item:hover { background: var(--bg-elevated); }
.live-result-thumb { width: 40px; height: 40px; border-radius: var(--radius-sm); object-fit: cover; }
.live-result-info .title { font-size: .85rem; font-weight: 600; color: var(--text-primary); }
.live-result-info .meta  { font-size: .75rem; color: var(--text-muted); }

/* Navigation */
.main-nav-bar { 
  background: var(--bg-secondary); 
  border-bottom: 1px solid var(--border); 
  position: relative; 
  z-index: 900; 
}
.nav-menu-inner { 
  display: flex; 
  gap: 2px; 
  padding: 0; 
  margin: 0; 
  list-style: none;
}
.nav-menu-inner > li { position: relative; }
.nav-menu-inner > li > a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-secondary);
  font-size: .85rem;
  font-weight: 600;
  padding: 14px 18px;
  transition: all var(--transition);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.nav-menu-inner > li:hover > a,
.nav-menu-inner > li.current-menu-item > a {
  color: var(--accent);
  background: var(--accent-glow);
}

/* --- DESKTOP DROPDOWNS --- */
@media (min-width: 901px) {
  .nav-menu-inner li { position: relative; }
  .nav-menu-inner li ul {
    position: absolute; top: 100%; left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    min-width: 220px;
    display: none;
    flex-direction: column;
    padding: 8px 0;
    box-shadow: var(--shadow);
    z-index: 1000;
  }
  .nav-menu-inner li:hover > ul { display: flex; animation: fadeInMenu .2s ease; }
  .nav-menu-inner li ul li a { border-radius: 0; padding: 10px 20px; width: 100%; text-transform: none; letter-spacing: 0; }
  .nav-menu-inner li ul li a:hover { background: var(--bg-elevated); color: var(--accent); }
  
  /* Mega Menu Support */
  .nav-menu-inner li.mega-menu { position: static; }
  .nav-menu-inner li.mega-menu > ul {
    width: 100%; left: 0; right: 0;
    grid-template-columns: repeat(4, 1fr);
    padding: 25px;
  }
  .nav-menu-inner li.mega-menu:hover > ul { display: grid; }
  .main-nav-bar .dropdown-toggle { display: none; }
}

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

/* --- MOBILE COLLAPSIBLE MENU --- */
@media (max-width: 900px) {
  .mobile-menu .menu-item-has-children { display: flex; flex-wrap: wrap; align-items: center; }
  .mobile-menu .menu-item-has-children > a { flex: 1; }
  .mobile-menu .dropdown-toggle {
    background: rgba(255,255,255,0.05);
    border: none; color: var(--text-muted);
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.3s;
  }
  .mobile-menu .sub-menu {
    width: 100%; display: none;
    background: rgba(0,0,0,0.15);
    padding-left: 15px;
  }
  .mobile-menu .menu-item-has-children.active > .sub-menu { display: block; }
  .mobile-menu .menu-item-has-children.active > .dropdown-toggle { transform: rotate(180deg); color: var(--accent); }
}

/* Mobile Navigation Fix */
@media (max-width: 900px) {
  .main-nav-bar { display: none; }
  .header-search { margin-right: 15px; }
}

/* Desktop Dropdowns */
@media (min-width: 901px) {
  .nav-menu-inner li ul {
    position: absolute; top: 100%; left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    min-width: 200px;
    display: none;
    flex-direction: column;
    padding: 8px 0;
    box-shadow: var(--shadow);
    z-index: 100;
  }
  .nav-menu-inner li:hover > ul { display: flex; }
  .nav-menu-inner li ul li a { border-radius: 0; padding: 10px 18px; width: 100%; }
  .main-nav-bar .dropdown-toggle { display: none; }

  /* Mega Menu Support */
  .nav-menu-inner li.mega-menu { position: static; }
  .nav-menu-inner li.mega-menu > ul {
    width: 100%; left: 0; right: 0;
    display: none; 
    grid-template-columns: repeat(4, 1fr);
    padding: 20px;
  }
  .nav-menu-inner li.mega-menu:hover > ul { display: grid; }
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none; border: none;
  color: var(--text-primary);
  font-size: 1.3rem;
  padding: 8px;
  margin-left: auto;
}

/* ── CATEGORY NAV BAR ──────────────────────────────────── */
.cat-nav {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.cat-nav::-webkit-scrollbar { display: none; }
.cat-nav-inner {
  display: flex;
  gap: 2px;
  padding: 0 20px;
  white-space: nowrap;
}
.cat-nav-inner ul {
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cat-nav-inner li {
  list-style: none;
}
.cat-nav-inner a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-secondary);
  font-size: .82rem;
  font-weight: 500;
  padding: 10px 14px;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
}
.cat-nav-inner a:hover,
.cat-nav-inner a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.cat-nav-inner a i {
  font-size: .9rem;
  width: 16px;
  text-align: center;
}

/* ── HERO SECTION ──────────────────────────────────────── */
.site-hero {
  background: linear-gradient(135deg, #0d0f14 0%, #141720 50%, #0d1a2e 100%);
  padding: 60px 0 50px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.site-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(0,212,255,.08), transparent);
  pointer-events: none;
}
.hero-title {
  font-family: var(--font-main);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  letter-spacing: -1px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-subtitle { color: var(--text-secondary); font-size: 1.05rem; margin-bottom: 32px; }
.hero-search {
  max-width: 580px; margin: 0 auto;
  display: flex; gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0,212,255,.1);
}
.hero-search input {
  border: none; background: none;
  padding: 14px 22px;
  font-size: 1rem;
  border-radius: 0;
  height: auto;
}
.hero-search-btn {
  background: var(--accent);
  border: none; color: #000;
  font-weight: 700;
  font-size: .9rem;
  padding: 0 28px;
  transition: background var(--transition);
  white-space: nowrap;
}
.hero-search-btn:hover { background: var(--accent-hover); }
.hero-stats {
  display: flex; justify-content: center; gap: 36px;
  margin-top: 32px;
}
.hero-stat { text-align: center; }
.hero-stat .num {
  font-family: var(--font-main);
  font-size: 1.6rem; font-weight: 800;
  color: var(--accent);
}
.hero-stat .label { font-size: .75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }

/* ── SECTION HEADERS ───────────────────────────────────── */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.section-title {
  font-family: var(--font-main);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex; align-items: center; gap: 10px;
}
.section-title::before {
  content: '';
  display: inline-block;
  width: 3px; height: 20px;
  background: var(--accent);
  border-radius: 2px;
}
.section-link { font-size: .82rem; color: var(--text-secondary); }
.section-link:hover { color: var(--accent); }

/* ── SOFTWARE GRID ─────────────────────────────────────── */
.appshero-grid {
  display: grid;
  gap: 16px;
}
.appshero-grid.cols-4 { grid-template-columns: repeat(4, 1fr) !important; }
.appshero-grid.cols-5 { grid-template-columns: repeat(5, 1fr) !important; }
.appshero-grid.cols-6 { grid-template-columns: repeat(6, 1fr) !important; }

/* ── SOFTWARE CARD ─────────────────────────────────────── */
.software-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  position: relative;
  display: flex; flex-direction: column;
}
.software-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(0,212,255,.12);
  transform: translateY(-2px);
}
.card-thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  position: relative;
  background: var(--bg-elevated);
}
.card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.software-card:hover .card-thumb img { transform: scale(1.05); }
.card-thumb-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; color: var(--text-muted);
}
.card-badges {
  position: absolute; top: 8px; left: 8px;
  display: flex; flex-wrap: wrap; gap: 4px;
}
.badge {
  font-size: .68rem; font-weight: 700;
  padding: 2px 7px; border-radius: 4px;
  text-transform: uppercase; letter-spacing: .3px;
  font-family: var(--font-main);
}
.badge-new     { background: var(--green);  color: #000; }
.badge-hot     { background: var(--red);    color: #fff; }
.badge-updated { background: var(--yellow); color: #000; }
.badge-featured{ background: var(--purple); color: #fff; }
.badge-safe    { background: rgba(0,230,118,.15); color: var(--green); border: 1px solid rgba(0,230,118,.3); }
.badge-os      { background: rgba(0,212,255,.12); color: var(--accent); border: 1px solid rgba(0,212,255,.25); }

.card-body { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.card-title {
  font-family: var(--font-main);
  font-size: .95rem; font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  display: flex; align-items: center; gap: 12px;
  font-size: .75rem; color: var(--text-muted);
  margin-top: auto; padding-top: 10px;
  border-top: 1px solid var(--border);
}
.card-meta-item { display: flex; align-items: center; gap: 4px; }
.card-version {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--text-muted);
  background: var(--bg-elevated);
  padding: 1px 6px;
  border-radius: 3px;
}
/* Ajustes específicos para Grid de 5 y 6 columnas (tarjetas estrechas) */
.appshero-grid.cols-5 .card-meta,
.appshero-grid.cols-6 .card-meta {
  justify-content: center !important;
  text-align: center !important;
}
.appshero-grid.cols-5 .card-version,
.appshero-grid.cols-6 .card-version {
  margin-left: 0 !important;
  margin-right: 0 !important;
  width: 100% !important;
  display: block !important;
  text-align: center !important;
  margin-top: 4px !important;
  flex: 0 0 100% !important;
}
.card-dl-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  font-size: .82rem;
  font-family: var(--font-main);
  padding: 9px;
  border-radius: 0 0 var(--radius) var(--radius);
  transition: all var(--transition);
  border: none;
  width: 100%;
  text-decoration: none;
  margin-top: 0;
}
.card-dl-btn:hover { background: var(--accent-hover); color: #000; }

/* ── LAYOUT PRINCIPAL ──────────────────────────────────── */
.site-content { padding: 32px 0; }
.content-sidebar-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
}
.main-content { min-width: 0; }
.sidebar { min-width: 0; }

/* ── BREADCRUMBS ───────────────────────────────────────── */
.breadcrumbs {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  font-size: .8rem; color: var(--text-muted);
  margin-bottom: 22px;
}
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { color: var(--border-light); }

/* ── SINGLE SOFTWARE ───────────────────────────────────── */
.software-single { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }

.software-hero {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  padding: 28px;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-elevated));
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.software-icon {
  width: 132px; height: 132px;
  border-radius: var(--radius);
  object-fit: cover;
  border: 2px solid var(--border);
  display: block;
  margin: 0 auto;
}
.software-icon-placeholder {
  width: 132px; height: 132px;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 3.5rem; color: var(--text-muted);
  border: 2px solid var(--border);
  margin: 0 auto;
}
.software-title-area { flex: 1; }
.software-title {
  font-family: var(--font-main);
  font-size: 2rem; font-weight: 900;
  letter-spacing: -.5px;
  margin-bottom: 8px;
}
.software-tagline { color: var(--text-secondary); font-size: .95rem; margin-bottom: 12px; }
.software-meta-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: .78rem;
  color: var(--text-secondary);
}
.pill i { color: var(--accent); font-size: .8rem; }
.pill.pill-safe { border-color: rgba(0,230,118,.3); color: var(--green); }
.pill.pill-safe i { color: var(--green); }

.software-actions { display: flex; flex-direction: column; gap: 10px; }

/* DOWNLOAD BUTTONS */
.btn-download {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--accent);
  color: #000;
  font-weight: 800;
  font-size: 1rem;
  font-family: var(--font-main);
  padding: 14px 28px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-download:hover { background: var(--accent-hover); color: #000; transform: translateY(-1px); box-shadow: var(--shadow-glow); }
.btn-download.btn-lg { font-size: 1.1rem; padding: 16px 36px; }
.btn-outline {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: .875rem;
  transition: all var(--transition);
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* SOFTWARE DETAILS TABLE */
.software-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.info-row {
  display: flex;
  border-bottom: 1px solid var(--border);
}
.info-row:last-child { border-bottom: none; }
.info-row:nth-child(even) .info-val { background: var(--bg-elevated); }
.info-label {
  background: var(--bg-elevated);
  padding: 11px 16px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-secondary);
  width: 140px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  display: flex; align-items: center; gap: 7px;
}
.info-label i { color: var(--accent); font-size: .75rem; }
.info-val {
  padding: 11px 16px;
  font-size: .85rem;
  color: var(--text-primary);
  flex: 1;
  word-break: break-word;
}

/* DOWNLOAD SECTION */
.download-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 24px 0;
}
.download-section-header {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 22px;
  background: linear-gradient(90deg, rgba(0,212,255,.08), transparent);
  border-bottom: 1px solid var(--border);
}
.download-section-header h3 {
  font-family: var(--font-main);
  font-size: 1.05rem; font-weight: 700;
}
.download-section-header i { color: var(--accent); font-size: 1.1rem; }

.download-timer-wrap {
  padding: 20px 22px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.download-timer {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 24px;
  font-size: .9rem;
  color: var(--text-secondary);
}
.timer-countdown {
  font-family: var(--font-mono);
  font-size: 1.2rem; font-weight: 700;
  color: var(--accent);
  min-width: 28px;
}

.download-links-list { padding: 16px 22px; display: flex; flex-direction: column; gap: 10px; }
.download-link-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
}
.download-link-item:hover { border-color: var(--accent); }
.dl-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: #fff; flex-shrink: 0;
}
.dl-icon.mega     { background: #d9272e; }
.dl-icon.gdrive   { background: #4285f4; }
.dl-icon.mediafire{ background: #1a81f5; }
.dl-icon.onedrive { background: #0078d4; }
.dl-icon.direct   { background: var(--green); }
.dl-icon.torrent  { background: var(--orange); }
.dl-icon.external { background: var(--purple); }
.dl-info { flex: 1; }
.dl-info .dl-name { font-weight: 600; font-size: .9rem; }
.dl-info .dl-type { font-size: .75rem; color: var(--text-muted); }
.dl-password {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--yellow);
}
.dl-password .copy-pw { cursor: pointer; color: var(--text-muted); }
.dl-password .copy-pw:hover { color: var(--accent); }
.dl-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  font-size: .82rem;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  font-family: var(--font-main);
}
.dl-btn:hover { background: var(--accent-hover); color: #000; }
.dl-btn:disabled, .dl-btn[aria-disabled="true"] { opacity: .4; pointer-events: none; }

/* SCREENSHOTS */
.screenshots-section { margin: 24px 0; }
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.screenshot-item {
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border);
  aspect-ratio: 16/10;
}
.screenshot-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.screenshot-item:hover img { transform: scale(1.04); }

/* LIGHTBOX */
.lightbox-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.9);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.lightbox-overlay.active { opacity: 1; pointer-events: all; }
.lightbox-img { max-width: 90vw; max-height: 85vh; border-radius: var(--radius); }
.lightbox-close {
  position: absolute; top: 20px; right: 24px;
  background: none; border: none; color: #fff;
  font-size: 2rem; cursor: pointer;
}
.lightbox-prev, .lightbox-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.1); border: none; color: #fff;
  width: 50px; height: 50px; border-radius: 50%;
  font-size: 1.3rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,.2); }

/* CONTENT BODY */
.software-content-body {
  padding: 28px;
  border-top: 1px solid var(--border);
}
.software-content-body h2 {
  font-family: var(--font-main); font-size: 1.2rem; font-weight: 700;
  margin: 24px 0 14px; color: var(--text-primary);
}
.software-content-body h2:first-child { margin-top: 0; }
.software-content-body p { color: var(--text-secondary); line-height: 1.75; margin-bottom: 14px; }
.software-content-body ul { list-style: disc; padding-left: 1.5rem; color: var(--text-secondary); }
.software-content-body ul li { margin-bottom: 6px; }
.software-content-body a { color: var(--accent); }

/* VIDEO EMBED */
.video-embed-wrap {
  position: relative; padding-bottom: 56.25%; height: 0;
  border-radius: var(--radius); overflow: hidden;
  margin: 20px 0;
}
.video-embed-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

/* TAGS */
.software-tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 16px 0; }
.tag-pill {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: .75rem;
  padding: 3px 10px;
  border-radius: 20px;
  transition: all var(--transition);
}
.tag-pill:hover { border-color: var(--accent); color: var(--accent); }

/* LIKES / SHARE */
.software-actions-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 28px;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
}
.like-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit; font-size: .875rem;
  transition: all var(--transition);
}
.like-btn:hover, .like-btn.liked { border-color: var(--red); color: var(--red); }
.like-btn .count { font-weight: 700; }
.share-btns { display: flex; gap: 8px; margin-left: auto; }
.share-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; color: #fff; transition: opacity var(--transition);
  border: none; cursor: pointer;
}
.share-btn:hover { opacity: .8; }
.share-btn.fb  { background: #1877f2; }
.share-btn.tw  { background: #1da1f2; }
.share-btn.wa  { background: #25d366; }
.share-btn.tg  { background: #229ed9; }
.share-btn.cp  { background: var(--bg-elevated); color: var(--text-secondary); border: 1px solid var(--border); }

/* VIRUS TOTAL */
.virustotal-bar {
  display: flex; align-items: center; gap: 12px;
  background: rgba(0,230,118,.06);
  border: 1px solid rgba(0,230,118,.2);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin: 16px 0;
}
.vt-icon { color: var(--green); font-size: 1.2rem; }
.vt-text { flex: 1; font-size: .85rem; color: var(--text-secondary); }
.vt-link { font-size: .8rem; color: var(--green); font-weight: 600; }

/* RATING STARS */
.star-rating { display: flex; gap: 2px; }
.star { color: var(--yellow); font-size: .9rem; }
.star.empty { color: var(--border-light); }

/* ── SIDEBAR WIDGETS ───────────────────────────────────── */
.widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  overflow: hidden;
}
.widget-title {
  font-family: var(--font-main);
  font-size: .9rem; font-weight: 700;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-primary);
  display: flex; align-items: center; gap: 8px;
}
.widget-title i { color: var(--accent); }
.widget-body { padding: 14px 16px; }

/* Recent/Popular list */
.widget-post-list { display: flex; flex-direction: column; gap: 12px; }
.widget-post-item { display: flex; gap: 10px; align-items: center; }
.widget-post-thumb {
  width: 120px; height: 65px; border-radius: var(--radius-sm);
  object-fit: cover; flex-shrink: 0;
  border: 1px solid var(--border);
}
.widget-post-info .wpi-title {
  font-size: .82rem; font-weight: 600;
  color: var(--text-primary);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.widget-post-info .wpi-meta { font-size: .7rem; color: var(--text-muted); margin-top: 2px; }

/* Category widget */
.widget-cat-list { display: flex; flex-direction: column; }
.widget-cat-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: .83rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}
.widget-cat-item:last-child { border-bottom: none; }
.widget-cat-item:hover { color: var(--accent); }
.widget-cat-count {
  background: var(--bg-elevated);
  border-radius: 20px;
  padding: 1px 8px;
  font-size: .72rem;
  color: var(--text-muted);
}

/* Search widget */
.widget-search { display: flex; gap: 0; }
.widget-search input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.widget-search button {
  background: var(--accent); border: none;
  color: #000; padding: 0 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  cursor: pointer; font-size: .9rem;
}

/* Ads widget */
.widget-ads { text-align: center; }
.widget-ads-label { font-size: .65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }

/* ── ADS ZONES ─────────────────────────────────────────── */
.ads-zone { margin: 24px 0; text-align: center; }
.ads-zone-label { font-size: .65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; display: block; margin-bottom: 6px; }

/* ── ARCHIVE / CATEGORY PAGE ───────────────────────────── */
.archive-header {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 28px;
  padding: 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.archive-cat-icon {
  width: 56px; height: 56px;
  background: var(--accent-glow);
  border: 1px solid rgba(0,212,255,.2);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; color: var(--accent);
  flex-shrink: 0;
}
.archive-title { font-family: var(--font-main); font-size: 1.5rem; font-weight: 800; }
.archive-count { font-size: .82rem; color: var(--text-muted); margin-top: 4px; }

/* Filter bar */
.filter-bar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 22px; flex-wrap: wrap;
}
.filter-select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: .82rem;
  width: auto;
}
.filter-label { font-size: .82rem; color: var(--text-muted); }
.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: .82rem;
  transition: all var(--transition);
  cursor: pointer;
  font-family: inherit;
}
.filter-btn:hover, .filter-btn.active { border-color: var(--accent); color: var(--accent); }

/* ── PAGINATION ────────────────────────────────────────── */
.appshero-pagination {
  display: flex; justify-content: center; gap: 6px;
  margin: 32px 0;
}
.appshero-pagination a,
.appshero-pagination span {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: .875rem; font-weight: 600;
  transition: all var(--transition);
}
.appshero-pagination a:hover { border-color: var(--accent); color: var(--accent); }
.appshero-pagination .current {
  background: var(--accent); border-color: var(--accent);
  color: #000;
}

/* ── COMMENTS ──────────────────────────────────────────── */
.comments-section { margin-top: 28px; }
.comments-title {
  font-family: var(--font-main); font-size: 1.1rem; font-weight: 700;
  margin-bottom: 20px;
}
.comment-list { display: flex; flex-direction: column; gap: 16px; }
.comment-item {
  display: flex; gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.comment-avatar { flex-shrink: 0; }
.comment-avatar img { border-radius: 50%; width: 40px; height: 40px; }
.comment-meta { font-size: .75rem; color: var(--text-muted); margin-bottom: 6px; }
.comment-meta .author { font-weight: 600; color: var(--text-secondary); margin-right: 8px; }
.comment-text { font-size: .875rem; color: var(--text-secondary); }
.comment-form-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 20px;
}
.comment-form-wrap h3 { font-family: var(--font-main); font-size: 1rem; font-weight: 700; margin-bottom: 16px; }
.comment-form-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.comment-form-fields .full { grid-column: 1 / -1; }
.btn-submit {
  background: var(--accent); color: #000;
  font-weight: 700; font-family: var(--font-main);
  padding: 11px 24px; border: none;
  border-radius: var(--radius-sm);
  cursor: pointer; font-size: .9rem;
  transition: all var(--transition);
}
.btn-submit:hover { background: var(--accent-hover); }

/* ── FOOTER ────────────────────────────────────────────── */
#site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 30px 0 0;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 25px;
}
.footer-brand .logo-text { font-size: 1.5rem; margin-bottom: 12px; display: block; }
.footer-desc { font-size: .85rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 16px; }
.social-links { display: flex; gap: 8px; }
.social-link {
  width: 36px; height: 36px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: .9rem;
  transition: all var(--transition);
}
.social-link:hover { border-color: var(--accent); color: var(--accent); }
.footer-widget-title {
  font-family: var(--font-main); font-size: .9rem; font-weight: 700;
  color: var(--text-primary); margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.footer-link-list { display: flex; flex-direction: column; gap: 8px; }
.footer-link-list a { font-size: .83rem; color: var(--text-muted); transition: color var(--transition); }
.footer-link-list a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 12px 0;
  display: flex; align-items: center; justify-content: space-between;
  font-size: .78rem; color: var(--text-muted);
}
.footer-bottom a { color: var(--text-muted); }
.footer-bottom a:hover { color: var(--accent); }

/* ── SEARCH RESULTS ────────────────────────────────────── */
.search-header { margin-bottom: 24px; }
.search-header h1 { font-family: var(--font-main); font-size: 1.4rem; font-weight: 700; }
.search-header .search-count { font-size: .875rem; color: var(--text-muted); margin-top: 4px; }

/* ── NOT FOUND ─────────────────────────────────────────── */
.not-found-wrap { text-align: center; padding: 80px 20px; }
.not-found-wrap .code { font-family: var(--font-main); font-size: 6rem; font-weight: 900; color: var(--accent); opacity: .2; }
.not-found-wrap h2 { font-family: var(--font-main); font-size: 1.5rem; font-weight: 700; margin-bottom: 12px; }
.not-found-wrap p { color: var(--text-secondary); }

/* ── NOTICE BOXES ──────────────────────────────────────── */
.notice {
  display: flex; align-items: flex-start; gap: 12px;
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 16px 0;
  font-size: .875rem;
}
.notice i { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.notice-info    { background: rgba(0,212,255,.07); border: 1px solid rgba(0,212,255,.2); color: var(--text-secondary); }
.notice-info i  { color: var(--accent); }
.notice-warning { background: rgba(255,214,0,.07);  border: 1px solid rgba(255,214,0,.2);  color: var(--text-secondary); }
.notice-warning i { color: var(--yellow); }
.notice-success { background: rgba(0,230,118,.07); border: 1px solid rgba(0,230,118,.2); color: var(--text-secondary); }
.notice-success i { color: var(--green); }

/* ── SCROLL TO TOP ─────────────────────────────────────── */
#scroll-top {
  position: fixed; bottom: 24px; right: 24px; z-index: 999;
  width: 42px; height: 42px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: #000; font-size: .9rem;
  box-shadow: var(--shadow);
  opacity: 0; pointer-events: none;
  transition: all var(--transition);
  cursor: pointer; border: none;
}
#scroll-top.visible { opacity: 1; pointer-events: all; }
#scroll-top:hover { background: var(--accent-hover); transform: translateY(-2px); }

/* Previous Versions Table (Moved from functions.php) */
.previous-versions { margin: 30px 0; }
.previous-versions h3 { color: var(--text-primary); font-family: var(--font-main); margin-bottom: 8px; }
.version-note { color: var(--text-secondary); font-size: .9rem; margin-bottom: 15px; }
.versions-table { width: 100%; border-collapse: collapse; margin-top: 10px; background: var(--bg-card); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.versions-table th, .versions-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); color: var(--text-primary); }
.versions-table th { background: var(--bg-elevated); font-weight: 600; color: var(--accent); font-family: var(--font-main); }
.versions-table tbody tr:hover { background: var(--bg-secondary); }
.versions-table .download-btn { background: var(--accent); color: var(--bg-primary); padding: 6px 12px; text-decoration: none; border-radius: var(--radius-sm); display: inline-block; font-weight: 500; transition: var(--transition); }
.versions-table .download-btn:hover { background: var(--accent-hover); box-shadow: var(--shadow-glow); }
@media (max-width: 768px) {
    .versions-table th, .versions-table td { padding: 8px 10px; font-size: .85rem; }
    .versions-table .download-btn { padding: 5px 8px; font-size: .85rem; }
}

/* ── LOADING SKELETON ──────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-card) 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.4s infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-loading { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* ── MOBILE MENU ───────────────────────────────────────── */
.mobile-menu-overlay {
  position: fixed; inset: 0; z-index: 1999;
  background: rgba(0,0,0,.7);
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.mobile-menu-overlay.active { opacity: 1; pointer-events: all; }
.mobile-menu {
  position: fixed; top: 0; left: -100%; bottom: 0;
  width: 280px; z-index: 2000;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  transition: left .3s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
}
.mobile-menu.active { left: 0; }
.mobile-menu-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.mobile-menu-close { background: none; border: none; color: var(--text-secondary); font-size: 1.3rem; cursor: pointer; }
.mobile-menu nav ul { display: flex; flex-direction: column; }
.mobile-menu nav ul li a {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: var(--text-secondary); font-size: .9rem;
  transition: all var(--transition);
  flex: 1;
}
.mobile-menu nav ul li a:hover { color: var(--accent); background: var(--accent-glow); }
.mobile-menu .menu-item-has-children { display: flex; flex-wrap: wrap; align-items: center; }
.mobile-menu .dropdown-toggle {
  background: none; border: none; color: var(--text-muted);
  padding: 15px; cursor: pointer; transition: transform 0.3s;
}
.mobile-menu .sub-menu {
  width: 100%; display: none;
  background: rgba(0,0,0,0.2);
  padding-left: 15px;
}
.mobile-menu .menu-item-has-children.active > .sub-menu { display: block; }
.mobile-menu .menu-item-has-children.active > .dropdown-toggle { transform: rotate(180deg); color: var(--accent); }

/* ── UTILITIES ─────────────────────────────────────────── */
.text-accent { color: var(--accent); }
.text-muted  { color: var(--text-muted); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.mt-0 { margin-top: 0; }
.hidden { display: none !important; }

/* ── RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 1100px) {
  .appshero-grid.cols-4 { grid-template-columns: repeat(3,1fr) !important; } /* 4 columnas -> 3 */
  .appshero-grid.cols-5 { grid-template-columns: repeat(4,1fr) !important; } /* 5 columnas -> 4 */
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }
}
@media (max-width: 900px) {
  .content-sidebar-wrap { grid-template-columns: 1fr; }
  .container { padding: 0 15px; }
  .sidebar { display: none; }
  .appshero-grid.cols-5 { grid-template-columns: repeat(3,1fr) !important; } /* 5 columnas -> 3 */
  .appshero-grid.cols-4 { grid-template-columns: repeat(2,1fr) !important; } /* 4 columnas -> 2 */
  .software-hero { grid-template-columns: auto 1fr; }
  .software-actions { grid-column: 1 / -1; flex-direction: row; }
  .software-info-grid { grid-template-columns: 1fr; }
  .info-row { grid-column: 1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-stats { gap: 20px; }
}
@media (max-width: 640px) {
  .header-nav { display: none; }
  .menu-toggle { display: flex; margin-left: auto; }
  .header-search { max-width: 180px; }
  .hero-title { font-size: 1.8rem; }
  .hero-subtitle { font-size: 0.95rem; }
  .hero-stats { gap: 15px; }
  .hero-stat .num { font-size: 1.3rem; }
  .appshero-grid.cols-4 { grid-template-columns: repeat(2,1fr) !important; } /* 4 columnas -> 2 */
  .appshero-grid.cols-5 { grid-template-columns: repeat(2,1fr) !important; } /* 5 columnas -> 2 */
  .appshero-grid.cols-6 { grid-template-columns: repeat(2,1fr) !important; }
  .software-hero { 
    grid-template-columns: 1fr; 
    text-align: center;
    padding: 20px 15px;
  }
  .software-icon, .software-icon-placeholder { width: 100px; height: 100px; margin: 0 auto 10px; }
  .software-title { font-size: 1.6rem; }
  .card-title { font-size: 0.85rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .hero-stats { gap: 14px; flex-wrap: wrap; justify-content: center; }
  .screenshots-grid { grid-template-columns: repeat(2,1fr); }
  .comment-form-fields { grid-template-columns: 1fr; }
  .software-actions-bar { flex-wrap: wrap; }
}
@media (max-width: 400px) {
  .appshero-grid { grid-template-columns: 1fr !important; }
  .download-link-item {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding: 15px;
  }
  .dl-icon { margin: 0 auto 5px; }
  .dl-password { justify-content: center; }
  .dl-btn { width: 100%; justify-content: center; }
  .header-search { display: none; } /* Ocultar búsqueda en header en pantallas muy pequeñas para dar espacio al logo */
}

/* Optimización de targets táctiles */
.nav-menu-inner li a, .btn-download, .dl-btn, .like-btn, .share-btn {
  min-height: 44px; /* Tamaño mínimo recomendado por Google para elementos táctiles */
}
