/*
Theme Name: Nice4PC
Theme URI: https://softvibepc.com
Author: SoftVibePC Team
Author URI: https://softvibepc.com
Description: Premium, fully responsive WordPress theme for Software and Game Downloading Directories (Nice4PC). Includes clean white top bar, emerald green hover/active category tabs with icons, horizontal row cards, 75%/25% two-column single software details, dynamic custom fields, and SoftVibePC footer.
Version: 1.0.0
Tested up to: 6.7
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nice4pc
Tags: software-directory, games-download, two-columns, custom-background, custom-menu, featured-images, theme-options, translation-ready
*/

:root {
  --primary-green: #007f5f;
  --primary-dark: #00664c;
  --primary-light: #e6f7f2;
  --primary-border: #a3e0ce;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  font-size: 15px;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

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

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 16px;
}

/* 1. TOP HEADER STRIP (White Background) */
.sg-top-header {
  background-color: #ffffff;
  color: #0f172a;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.sg-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.sg-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #0f172a;
}

.sg-logo-icon {
  background: var(--primary-green);
  color: #ffffff;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
}

/* Right-Aligned Rounded Search Bar */
.sg-search-bar {
  margin-left: auto;
  width: 100%;
  max-width: 440px;
  position: relative;
}

.sg-search-form {
  position: relative;
  display: flex;
  align-items: center;
}

.sg-search-input {
  width: 100%;
  padding: 9px 44px 9px 20px;
  border-radius: 9999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  font-size: 14px;
  color: #111827;
  outline: none;
  transition: all 0.2s ease;
}

.sg-search-input:focus {
  background: #ffffff;
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgba(0, 127, 95, 0.15);
}

.sg-search-submit {
  position: absolute;
  right: 6px;
  background: var(--primary-green);
  color: #ffffff;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.sg-search-submit:hover {
  transform: scale(1.05);
}

/* Right Header Links */
.sg-header-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.sg-header-nav a {
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  opacity: 0.92;
}

.sg-header-nav a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* 2. EXACT NICE4PC CATEGORY NAVIGATION TABS (Matching Screenshot) */
.sg-category-nav-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.sg-category-tabs {
  display: flex;
  align-items: center;
  overflow-x: auto;
  white-space: nowrap;
  padding: 0;
  border-left: 1px solid var(--border-color);
}

.sg-tab-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 600;
  color: #0284c7;
  background: #ffffff;
  border-right: 1px solid var(--border-color);
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}

.sg-tab-item svg {
  color: #263238;
  fill: currentColor;
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.sg-tab-item:hover,
.sg-tab-item.active {
  background-color: #008369 !important;
  color: #ffffff !important;
}

.sg-tab-item:hover svg,
.sg-tab-item.active svg {
  color: #ffffff !important;
  fill: #ffffff !important;
}

/* HOME DIRECTORY: Vertical Categories & Horizontal Row Cards */
.sg-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 32px 0 16px 0;
  padding-bottom: 8px;
}

.sg-category-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* User requirement: Green vertical indicator line beside category title */
.sg-vertical-indicator {
  width: 4px;
  height: 24px;
  background-color: var(--primary-green);
  border-radius: 2px;
  display: inline-block;
}

.sg-category-title {
  font-size: 20px;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.3px;
}

.sg-view-all-btn {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-green);
  border: 1px solid var(--primary-border);
  background: #ffffff;
  padding: 5px 14px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.sg-view-all-btn:hover {
  background: var(--primary-green);
  color: #ffffff;
}

/* Horizontal Row Cards */
.sg-card-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sg-software-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px 18px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.sg-software-row:hover {
  border-color: var(--primary-green);
  box-shadow: 0 4px 14px rgba(0, 127, 95, 0.08);
  transform: translateY(-1px);
}

.sg-row-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.sg-software-icon {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid #f1f5f9;
}

.sg-row-content {
  flex: 1;
  min-width: 0;
}

.sg-row-title {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.sg-software-row:hover .sg-row-title {
  color: var(--primary-green);
}

.sg-row-desc {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.sg-row-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #64748b;
}

.sg-badge-platform {
  background: #f1f5f9;
  color: #475569;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 11px;
}

.sg-stars {
  color: #f59e0b;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* User requirement: Extreme right bold text file size (e.g. 6.51 GB) */
.sg-row-right {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-left: 20px;
  flex-shrink: 0;
}

.sg-file-size {
  font-size: 16px;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.2px;
  text-align: right;
  min-width: 78px;
}

.sg-row-action-btn {
  background: var(--primary-light);
  color: var(--primary-green);
  border: 1px solid var(--primary-border);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.sg-software-row:hover .sg-row-action-btn {
  background: var(--primary-green);
  color: #ffffff;
  border-color: var(--primary-green);
}

/* 3. SINGLE POST PAGE (2 COLUMNS: 75% LEFT, 25% RIGHT) */
.sg-single-layout {
  display: flex;
  gap: 28px;
  margin: 32px 0 60px 0;
}

.sg-main-column {
  flex: 0 0 75%;
  max-width: 75%;
}

.sg-sidebar-column {
  flex: 0 0 25%;
  max-width: 25%;
}

/* Left Column Styling */
.sg-post-header {
  margin-bottom: 20px;
}

.sg-post-title {
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
  margin-bottom: 12px;
}

.sg-post-banner {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  margin-bottom: 28px;
}

.sg-content-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 24px;
}

.sg-section-h2 {
  font-size: 19px;
  font-weight: 800;
  color: #111827;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-light);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sg-features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sg-features-list li {
  position: relative;
  padding-left: 26px;
  font-size: 14.5px;
  color: #334155;
}

.sg-features-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--primary-green);
  font-weight: 900;
  font-size: 16px;
}

/* System Requirements Table */
.sg-req-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 14px;
}

.sg-req-box {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
}

.sg-req-heading {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary-green);
  margin-bottom: 12px;
}

.sg-req-item {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid #e2e8f0;
  font-size: 13px;
}

.sg-req-item:last-child {
  border-bottom: none;
}

.sg-req-label {
  font-weight: 600;
  color: #64748b;
}

.sg-req-val {
  font-weight: 500;
  color: #0f172a;
  text-align: right;
  max-width: 60%;
}

/* Right Sidebar Styling */
.sg-sidebar-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

/* Sidebar Top Download Box */
.sg-download-card {
  text-align: center;
  border-top: 4px solid var(--primary-green);
}

.sg-side-filesize {
  font-size: 32px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.sg-side-rating {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 18px;
}

.sg-download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: var(--primary-green);
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  padding: 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 127, 95, 0.35);
  transition: all 0.2s ease;
  text-decoration: none;
}

.sg-download-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 127, 95, 0.45);
}

.sg-fast-link {
  display: block;
  font-size: 12.5px;
  color: var(--primary-green);
  font-weight: 600;
  margin-top: 12px;
  text-decoration: underline;
}

.sg-side-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

.sg-action-icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #64748b;
  cursor: pointer;
  background: none;
  border: none;
}

.sg-action-icon-btn:hover {
  color: var(--primary-green);
}

/* Product Info Table */
.sg-info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.sg-info-table tr {
  border-bottom: 1px solid #f1f5f9;
}

.sg-info-table tr:last-child {
  border-bottom: none;
}

.sg-info-table td {
  padding: 9px 0;
}

.sg-info-table td.sg-info-key {
  color: #64748b;
  font-weight: 600;
}

.sg-info-table td.sg-info-val {
  color: #0f172a;
  font-weight: 600;
  text-align: right;
}

/* Related Products Box */
.sg-related-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sg-related-item {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.sg-related-item:hover .sg-rel-title {
  color: var(--primary-green);
}

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

.sg-rel-info {
  flex: 1;
  min-width: 0;
}

.sg-rel-title {
  font-size: 13px;
  font-weight: 700;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sg-rel-size {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-green);
}

/* FOOTER */
.sg-footer {
  background: #111827;
  color: #9ca3af;
  padding: 48px 0 24px 0;
  margin-top: 60px;
}

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

.sg-footer-h4 {
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
}

.sg-footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
}

.sg-footer-links a:hover {
  color: #ffffff;
  padding-left: 4px;
}

.sg-social-icons {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.sg-social-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #1f2937;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.sg-social-icon:hover {
  background: var(--primary-green);
  transform: translateY(-2px);
}

.sg-footer-bottom {
  border-top: 1px solid #1f2937;
  padding-top: 24px;
  text-align: center;
  font-size: 13px;
  color: #6b7280;
}

.sg-footer-bottom a {
  color: #ffffff;
  text-decoration: underline;
  font-weight: 600;
}

.sg-footer-bottom a:hover {
  color: #34d399;
}

/* RESPONSIVE BREAKPOINTS */
@media (max-width: 992px) {
  .sg-single-layout {
    flex-direction: column;
  }
  .sg-main-column,
  .sg-sidebar-column {
    flex: 0 0 100%;
    max-width: 100%;
  }
  .sg-footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .sg-header-inner {
    flex-wrap: wrap;
  }
  .sg-search-bar {
    order: 3;
    max-width: 100%;
    width: 100%;
  }
  .sg-software-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .sg-row-right {
    width: 100%;
    justify-content: space-between;
    padding-left: 0;
    border-top: 1px dashed #e2e8f0;
    padding-top: 8px;
  }
  .sg-footer-grid {
    grid-template-columns: 1fr;
  }
  .sg-req-grid {
    grid-template-columns: 1fr;
  }
}
