/* ==========================================================================
   Ainggamer.com - Modern Clean White Portal Theme
   ========================================================================== */

:root {
  --primary: #ff6b00;
  --primary-hover: #e05a00;
  --primary-light: #fff7ed;
  --primary-border: #fed7aa;

  --cat-game: #ff6b00;
  --cat-anime: #8b5cf6;
  --cat-tekno: #0284c7;
  --cat-review: #10b981;
  --cat-esports: #ef4444;

  --bg-body: #f8fafc;
  --bg-white: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-header: #ffffff;
  --bg-navbar: #0f172a;
  --bg-navbar-hover: #1e293b;
  --bg-footer: #0f172a;

  --text-heading: #0f172a;
  --text-main: #334155;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;

  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --border-hover: #ff6b00;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.1);

  --font-heading: 'Rubik', 'Montserrat', sans-serif;
  --font-body: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: all 0.2s ease-in-out;
}

/* Reset & Global */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.site-wrapper {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-heading);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.65rem;
}

h1 { font-size: 2.1rem; }
h2 { font-size: 1.65rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: 0.95rem; }

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

p {
  margin-bottom: 1.15rem;
}

/* Container & Grid */
.container {
  width: 100%;
  max-width: 1220px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.row {
  display: flex !important;
  flex-wrap: wrap !important;
  margin-left: -12px;
  margin-right: -12px;
}

[class*="col-"] {
  position: relative;
  width: 100%;
  padding-left: 12px;
  padding-right: 12px;
}

.col-12 { flex: 0 0 100%; max-width: 100%; }
.col-8, .col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-6, .col-md-6 { flex: 0 0 50%; max-width: 50%; }
.col-4, .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-3, .col-md-3 { flex: 0 0 25%; max-width: 25%; }
.col-2, .col-md-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }

@media (max-width: 991px) {
  .col-md-8, .col-md-6, .col-md-4, .col-md-3 { flex: 0 0 100%; max-width: 100%; }
  .col-sm-6 { flex: 0 0 50%; max-width: 50%; }
}

@media (max-width: 767px) {
  .col-sm-6 { flex: 0 0 100%; max-width: 100%; }
}

/* --- Top Bar (Trending & Social) --- */
.site-topbar {
  background-color: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 0;
  font-size: 12.5px;
  color: var(--text-muted);
}

.site-topbar__inner {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-direction: row !important;
}

.topbar-trending {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.trending-badge {
  background-color: #ffedd5;
  color: var(--primary);
  font-weight: 800;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.topbar-social {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  list-style: none !important;
}

.topbar-social li {
  display: inline-block !important;
}

.topbar-social a {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: var(--text-muted);
  transition: var(--transition);
}

.topbar-social a:hover {
  color: var(--primary);
}

/* --- Main Brand Header --- */
.site-header {
  background-color: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 999;
}

.header-main {
  padding: 16px 0;
  background-color: var(--bg-white);
}

.header-main-inner {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-direction: row !important;
}

.header-logo {
  display: flex !important;
  align-items: center !important;
}

.header-logo a {
  display: flex !important;
  align-items: center !important;
}

.header-logo img {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.header-logo img:not(:first-of-type),
.header-logo noscript {
  display: none !important;
}

/* Header Quick Search Box */
.header-search-bar {
  display: flex !important;
  align-items: center !important;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-full);
  padding: 4px 6px 4px 16px;
  width: 320px;
  transition: var(--transition);
}

.header-search-bar:focus-within {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.12);
}

.header-search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 13.5px;
  color: var(--text-heading);
}

.header-search-bar button {
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-full);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.header-search-bar button:hover {
  background: var(--primary-hover);
}

@media (max-width: 767px) {
  .site-topbar { display: none; }
  .header-search-bar { display: none !important; }
}

/* --- Navigation Bar (Navy Blue Sleek Bar) --- */
.navigation-bar {
  background-color: var(--bg-navbar);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
  position: relative;
}

.navigation-bar__inner {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  min-height: 48px;
  flex-direction: row !important;
}

.navigation--main {
  display: flex !important;
  align-items: center !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  gap: 2px !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.navigation--main > li {
  position: relative !important;
  display: inline-block !important;
}

.navigation--main > li > a {
  display: block !important;
  padding: 13px 14px !important;
  font-family: var(--font-heading) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  color: #f1f5f9 !important;
  text-transform: uppercase !important;
  transition: var(--transition) !important;
  border-bottom: 3px solid transparent !important;
}

.navigation--main > li:hover > a,
.navigation--main > li.current-menu-item > a {
  color: #ffffff !important;
  background-color: var(--bg-navbar-hover) !important;
  border-bottom-color: var(--primary) !important;
}

/* Dropdowns */
.navigation--main .sub-menu {
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  min-width: 220px !important;
  background-color: #0f172a !important;
  border: 1px solid #334155 !important;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm) !important;
  box-shadow: var(--shadow-lg) !important;
  padding: 6px 0 !important;
  z-index: 1001 !important;
  display: none !important;
}

.navigation--main > li:hover > .sub-menu {
  display: block !important;
}

.navigation--main .sub-menu li {
  position: relative !important;
  display: block !important;
}

.navigation--main .sub-menu li a {
  display: block !important;
  padding: 9px 18px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #cbd5e1 !important;
  text-transform: uppercase !important;
}

.navigation--main .sub-menu li:hover > a {
  background-color: var(--primary) !important;
  color: #ffffff !important;
  padding-left: 22px !important;
}

.navigation--main .sub-menu .sub-menu {
  top: 0 !important;
  left: 100% !important;
}

.navigation--main .sub-menu li:hover > .sub-menu {
  display: block !important;
}

.atbs-ceris-mega-menu {
  display: none !important;
}

/* Badges & Meta */
.post__cat {
  display: inline-block !important;
  padding: 3px 9px !important;
  border-radius: 4px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  background-color: var(--primary) !important;
  color: #ffffff !important;
  margin-bottom: 8px !important;
  transition: var(--transition) !important;
}

.post__cat:hover {
  background-color: var(--primary-hover) !important;
}

.post__cat--game { background-color: var(--cat-game) !important; }
.post__cat--anime { background-color: var(--cat-anime) !important; }
.post__cat--tekno { background-color: var(--cat-tekno) !important; }
.post__cat--review { background-color: var(--cat-review) !important; }
.post__cat--esports { background-color: var(--cat-esports) !important; }

.post__meta {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  font-size: 12px !important;
  color: var(--text-muted) !important;
  margin-top: 6px !important;
}

/* Modern Clean Post Cards */
.post-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.post-card__thumb {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  overflow: hidden;
  background: #f1f5f9;
}

.post-card__thumb img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.post-card:hover .post-card__thumb img {
  transform: scale(1.06);
}

.post-card__body {
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
}

.post-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 6px 0 10px;
  color: var(--text-heading);
}

.post-card__title a:hover {
  color: var(--primary);
}

.post-card__excerpt {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 14px;
  flex: 1 0 auto;
}

/* Horizontal Post Row (List View) */
.post--horizontal {
  display: flex !important;
  flex-direction: row !important;
  gap: 20px !important;
  background: var(--bg-white) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  padding: 18px !important;
  margin-bottom: 20px !important;
  transition: var(--transition) !important;
  align-items: center !important;
  box-shadow: var(--shadow-sm) !important;
}

.post--horizontal:hover {
  border-color: var(--border-hover) !important;
  transform: translateY(-2px) !important;
  box-shadow: var(--shadow-md) !important;
}

.post--horizontal .post__thumb {
  flex: 0 0 240px !important;
  max-width: 240px !important;
  border-radius: var(--radius-md) !important;
  overflow: hidden !important;
}

.post--horizontal .post__thumb img {
  width: 100% !important;
  height: 150px !important;
  object-fit: cover !important;
  border-radius: var(--radius-md) !important;
}

.post--horizontal .post__text {
  flex: 1 1 auto !important;
}

@media (max-width: 767px) {
  .post--horizontal {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
  .post--horizontal .post__thumb {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
  }
  .post--horizontal .post__thumb img {
    height: 180px !important;
  }
}

/* Hero Section */
.hero-featured-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  margin-bottom: 36px;
}

.hero-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #0f172a;
  min-height: 240px;
  box-shadow: var(--shadow-md);
}

.hero-card--lg {
  grid-column: span 6;
  min-height: 380px;
}

.hero-card--sm {
  grid-column: span 3;
  min-height: 180px;
}

.hero-card img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.hero-card:hover img {
  transform: scale(1.06);
}

.hero-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.45) 55%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  z-index: 2;
}

.hero-card__title {
  color: #ffffff !important;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 6px 0 8px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.hero-card--lg .hero-card__title {
  font-size: 1.55rem;
}

@media (max-width: 991px) {
  .hero-card--lg { grid-column: span 12; min-height: 300px; }
  .hero-card--sm { grid-column: span 6; min-height: 200px; }
}

@media (max-width: 576px) {
  .hero-card--sm { grid-column: span 12; }
}

/* Section Header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--border);
  padding-bottom: 10px;
  margin-bottom: 24px;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  position: relative;
  margin: 0;
  color: var(--text-heading);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 0;
  width: 50px;
  height: 3px;
  background-color: var(--primary);
  border-radius: var(--radius-full);
}

.section-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
}

/* Single Post */
.single-post-wrapper {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 767px) {
  .single-post-wrapper { padding: 20px 16px; }
}

.single-header {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.single-header .entry-title {
  font-size: 2.1rem;
  line-height: 1.35;
  margin: 12px 0 16px;
  color: var(--text-heading);
}

.entry-featured-media {
  margin: 24px 0 32px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.entry-featured-media img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
}

.entry-content {
  font-size: 16px;
  line-height: 1.85;
  color: var(--text-main);
}

.entry-content h2 {
  font-size: 1.55rem;
  margin-top: 36px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-light);
  color: var(--primary);
}

.entry-content h3 {
  font-size: 1.25rem;
  margin-top: 28px;
  margin-bottom: 12px;
  color: var(--text-heading);
}

.entry-content ul, .entry-content ol {
  padding-left: 24px;
  margin-bottom: 20px;
}

.entry-content ul { list-style: disc !important; }
.entry-content ol { list-style: decimal !important; }

.entry-content li {
  margin-bottom: 8px;
}

.entry-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 14px 20px;
  background: var(--primary-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 24px 0;
  font-style: italic;
  color: var(--text-heading);
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  background: var(--bg-white);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.entry-content th, .entry-content td {
  padding: 12px 16px;
  border: 1px solid var(--border);
  text-align: left;
}

.entry-content th {
  background: #f8fafc;
  color: var(--primary);
  font-weight: 700;
}

.author-box {
  display: flex !important;
  gap: 20px !important;
  background: #f8fafc !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  padding: 24px !important;
  margin: 36px 0 !important;
  align-items: center !important;
}

.author-box__avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  flex-shrink: 0;
}

/* Sidebar & Widgets */
.widget {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}

.widget__title {
  font-size: 1.15rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 18px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
  position: relative;
}

.widget__title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--primary);
}

.widget-post-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
}

.widget-post-item {
  display: flex !important;
  flex-direction: row !important;
  gap: 14px !important;
  align-items: center !important;
}

.widget-post-item__thumb {
  width: 80px;
  height: 60px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.widget-post-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.widget-post-item__title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
}

.tagcloud {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}

.tagcloud a {
  display: inline-block !important;
  padding: 5px 12px !important;
  background: #f1f5f9 !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-full) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: var(--text-muted) !important;
}

.tagcloud a:hover {
  background: var(--primary) !important;
  color: #ffffff !important;
  border-color: var(--primary) !important;
}

/* Breadcrumbs */
.breadcrumb {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  list-style: none !important;
  padding: 0 0 18px !important;
  margin: 0 !important;
  font-size: 13px !important;
  color: var(--text-muted) !important;
  gap: 8px !important;
  align-items: center !important;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--primary);
}

.breadcrumb span.sep {
  color: var(--text-subtle);
}

/* Footer */
.site-footer {
  background-color: var(--bg-footer);
  border-top: 1px solid var(--border);
  padding: 50px 0 20px;
  margin-top: 50px;
  color: #94a3b8;
}

.footer-widgets {
  margin-bottom: 40px;
}

.footer-widget h4 {
  font-size: 1.15rem;
  color: #ffffff;
  margin-bottom: 18px;
  font-weight: 700;
}

.footer-widget ul li {
  margin-bottom: 10px;
}

.footer-widget ul li a {
  color: #94a3b8;
  font-size: 14px;
}

.footer-widget ul li a:hover {
  color: var(--primary);
  padding-left: 4px;
}

.site-footer__bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center;
  font-size: 13px;
}

/* Search Modal */
.header-search-popup {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.header-search-popup.active {
  display: flex;
}

.header-search-popup__inner {
  width: 100%;
  max-width: 600px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.header-search-popup__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
}

.search-input-group {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.search-input-group input {
  flex: 1;
  padding: 12px 18px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-heading);
  font-size: 16px;
}

.search-input-group input:focus {
  outline: none;
  border-color: var(--primary);
}

.search-input-group button {
  padding: 12px 24px;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  cursor: pointer;
}

.atbs-ceris-go-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: #ffffff;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 998;
}

.atbs-ceris-go-top.active {
  opacity: 1;
  visibility: visible;
}

.atbs-ceris-go-top:hover {
  background: var(--primary-hover);
  transform: translateY(-3px);
}
