/*
Theme Name: AIAccessPortal Child
Template: generatepress
Version: 1.0
Description: AIAccessPortal Child Theme for GeneratePress
*/

/* ── GOOGLE FONTS ── */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Syne:wght@700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --primary: #0066FF;
  --primary-dark: #0044CC;
  --accent: #00F0A0;
  --accent2: #FF3D6E;
  --dark: #080D1A;
  --dark2: #0E1628;
  --dark3: #152035;
  --gray: #8892A4;
  --light: #E8EDF5;
  --white: #FFFFFF;
  --card-bg: #101827;
  --border: rgba(255,255,255,0.08);
  --font-heading: 'Syne', sans-serif;
  --font-body: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* ── GLOBAL ── */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-body) !important; background: var(--dark) !important; color: var(--light) !important; overflow-x: hidden !important; }
html, body { width: 100% !important; }
a { color: var(--primary); text-decoration: none; }

/* ── HIDE GP DEFAULTS ON HOMEPAGE ── */
.home .site-header,
.home .site-footer,
.home .entry-header,
.home .post-image,
.front-page .site-header,
.front-page .site-footer,
.front-page .entry-header,
.front-page .post-image { display: none !important; }

.home .site-content,
.home #primary,
.home .content-area,
.home .inside-article,
.front-page .site-content,
.front-page #primary,
.front-page .content-area,
.front-page .inside-article {
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
}

/* ── ARCHIVE/CATEGORY LAYOUT ── */
body.archive .site-content,
body.category .site-content,
body.archive #primary,
body.category #primary,
body.archive .content-area,
body.category .content-area {
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
}

/* ── SINGLE POST ── */
body.single { background: var(--dark) !important; }
body.single .site-main,
body.single #primary,
body.single .content-area {
  width: 100% !important;
  max-width: 860px !important;
  margin: 0 auto !important;
  padding: 20px 20px !important;
  float: none !important;
}
body.single .inside-article { padding: 0 !important; }
body.single #sidebar, body.single .widget-area { display: none !important; }
body.single .entry-header { display: block !important; padding: 40px 0 20px !important; }
body.single .entry-title {
  font-family: var(--font-heading) !important;
  font-size: 38px !important;
  font-weight: 800 !important;
  color: var(--white) !important;
  line-height: 1.2 !important;
  margin-bottom: 16px !important;
}
body.single .entry-content {
  font-size: 16px !important;
  line-height: 1.8 !important;
  color: var(--light) !important;
}
body.single .entry-content h2 {
  font-family: var(--font-heading) !important;
  font-size: 26px !important;
  font-weight: 700 !important;
  color: var(--white) !important;
  margin: 36px 0 14px !important;
}
body.single .entry-content p { margin-bottom: 18px !important; color: var(--gray) !important; }
body.single .entry-meta { font-size: 13px !important; color: var(--gray) !important; margin-bottom: 20px !important; }

/* ── NAVBAR ── */
.aap-nav {
  background: rgba(8,13,26,0.95);
  backdrop-filter: blur(20px);
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  position: sticky;
  top: 0;
  z-index: 9999;
  border-bottom: 1px solid var(--border);
}
body.admin-bar .aap-nav { top: 32px !important; }

.aap-logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  color: var(--white);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.5px;
}
.aap-logo .logo-icon {
  width: 32px; height: 32px;
  background: var(--primary);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.aap-logo span { color: var(--accent); }

.aap-nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
}
.aap-nav-links a {
  color: var(--gray);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 6px;
  transition: all 0.2s;
  text-decoration: none;
}
.aap-nav-links a:hover { color: var(--white); background: rgba(255,255,255,0.06); }

.aap-nav-cta {
  background: var(--primary);
  color: var(--white) !important;
  padding: 8px 20px !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  font-size: 13px !important;
}
.aap-nav-cta:hover { background: var(--primary-dark) !important; }

/* ── HERO ── */
.aap-hero {
  background: var(--dark);
  padding: 100px 48px 80px;
  position: relative;
  overflow: hidden;
}
.aap-hero::before {
  content: '';
  position: absolute;
  top: -200px; left: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(0,102,255,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.aap-hero::after {
  content: '';
  position: absolute;
  bottom: -100px; right: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(0,240,160,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.aap-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,102,255,0.12);
  border: 1px solid rgba(0,102,255,0.3);
  color: var(--accent);
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
  margin-bottom: 24px;
  text-transform: uppercase;
}
.aap-hero h1 {
  font-family: var(--font-heading) !important;
  font-size: 64px !important;
  font-weight: 800 !important;
  color: var(--white) !important;
  line-height: 1.05 !important;
  margin-bottom: 20px !important;
  max-width: 700px;
}
.aap-hero h1 em { font-style: normal; color: var(--primary); }
.aap-hero p {
  color: var(--gray);
  font-size: 18px;
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 36px;
}
.aap-search-wrap {
  display: flex;
  max-width: 540px;
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.aap-search-wrap:focus-within { border-color: var(--primary); }
.aap-search-wrap input {
  flex: 1;
  padding: 16px 20px;
  font-size: 15px;
  font-family: var(--font-body);
  background: transparent;
  border: none;
  outline: none;
  color: var(--white);
}
.aap-search-wrap input::placeholder { color: var(--gray); }
.aap-search-btn {
  padding: 16px 28px;
  background: var(--primary);
  color: white;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body);
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}
.aap-search-btn:hover { background: var(--primary-dark); }

.aap-hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 48px;
}
.aap-stat-num {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
}
.aap-stat-lbl {
  font-size: 12px;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

/* ── CATEGORIES BAR ── */
.aap-cats-bar {
  background: var(--dark2);
  border-bottom: 1px solid var(--border);
  padding: 0 48px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.aap-cats-bar::-webkit-scrollbar { display: none; }
.aap-cat-btn {
  padding: 14px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray);
  white-space: nowrap;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  text-decoration: none;
  font-family: var(--font-body);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}
.aap-cat-btn:hover, .aap-cat-btn.active { color: var(--white); border-bottom-color: var(--primary); }

/* ── POSTS GRID ── */
.aap-posts-section {
  padding: 60px 48px;
  background: var(--dark);
}
.aap-posts-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 36px;
}
.aap-sec-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.aap-sec-title {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 800;
  color: var(--white);
}
.aap-sec-title span { color: var(--primary); }
.aap-see-all {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  border: 1px solid rgba(0,102,255,0.3);
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.2s;
}
.aap-see-all:hover { background: rgba(0,102,255,0.1); }

.aap-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100%;
}

.aap-post-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  display: block;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.aap-post-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0,102,255,0.4);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.aap-post-img {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--dark3);
}
.aap-post-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.aap-post-cat-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0,102,255,0.9);
  color: white;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.aap-post-body { padding: 20px; }
.aap-post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 11px;
  color: var(--gray);
  font-family: var(--font-mono);
}
.aap-post-title {
  font-family: var(--font-heading) !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  color: var(--white) !important;
  line-height: 1.4 !important;
  margin-bottom: 10px !important;
}
.aap-post-excerpt {
  font-size: 13px;
  color: var(--gray);
  line-height: 1.6;
  margin-bottom: 16px;
}
.aap-post-arrow {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
  font-family: var(--font-mono);
}

/* ── FEATURED/LATEST SECTION ── */
.aap-featured-section {
  padding: 60px 48px;
  background: var(--dark2);
}
.aap-featured-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
}
.aap-featured-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  display: block;
  transition: transform 0.2s, border-color 0.2s;
}
.aap-featured-card:hover { transform: translateY(-4px); border-color: rgba(0,102,255,0.4); }
.aap-featured-img { width: 100%; height: 280px; background: var(--dark3); overflow: hidden; }
.aap-featured-img img { width: 100%; height: 100%; object-fit: cover; }
.aap-featured-body { padding: 28px; }
.aap-featured-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  color: var(--white);
  line-height: 1.3;
  margin-bottom: 12px;
}
.aap-small-posts { display: flex; flex-direction: column; gap: 16px; }
.aap-small-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  text-decoration: none;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: border-color 0.2s;
}
.aap-small-card:hover { border-color: rgba(0,102,255,0.4); }
.aap-small-img { width: 72px; height: 72px; border-radius: 8px; background: var(--dark3); overflow: hidden; flex-shrink: 0; }
.aap-small-img img { width: 100%; height: 100%; object-fit: cover; }
.aap-small-title { font-family: var(--font-heading); font-size: 14px; font-weight: 700; color: var(--white); line-height: 1.4; margin-bottom: 6px; }
.aap-small-meta { font-size: 11px; color: var(--gray); font-family: var(--font-mono); }

/* ── CATEGORIES GRID ── */
.aap-cats-section { padding: 60px 48px; background: var(--dark); }
.aap-cats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.aap-cat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  text-decoration: none;
  display: block;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.aap-cat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--cat-color, var(--primary));
}
.aap-cat-card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,0.15); box-shadow: 0 16px 32px rgba(0,0,0,0.3); }
.aap-cat-icon { font-size: 32px; margin-bottom: 14px; display: block; }
.aap-cat-name { font-family: var(--font-heading); font-size: 15px; font-weight: 700; color: var(--white); margin-bottom: 6px; }
.aap-cat-count { font-size: 12px; color: var(--gray); font-family: var(--font-mono); }
.aap-cat-arrow { position: absolute; top: 20px; right: 20px; color: var(--gray); font-size: 16px; transition: color 0.2s; }
.aap-cat-card:hover .aap-cat-arrow { color: var(--white); }

/* ── NEWSLETTER ── */
.aap-nl {
  background: linear-gradient(135deg, var(--primary) 0%, #0033AA 100%);
  padding: 60px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.aap-nl::before {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 300px; height: 300px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}
.aap-nl h2 { font-family: var(--font-heading); font-size: 36px; font-weight: 800; color: white; margin-bottom: 12px; }
.aap-nl p { font-size: 16px; color: rgba(255,255,255,0.8); margin-bottom: 28px; max-width: 480px; margin-left: auto; margin-right: auto; }
.aap-nl-form { display: flex; max-width: 440px; margin: 0 auto; gap: 10px; }
.aap-nl-form input {
  flex: 1;
  padding: 14px 18px;
  font-size: 14px;
  font-family: var(--font-body);
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 10px;
  outline: none;
  color: white;
}
.aap-nl-form input::placeholder { color: rgba(255,255,255,0.6); }
.aap-nl-form button {
  padding: 14px 24px;
  background: white;
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-body);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
}

/* ── FOOTER ── */
.aap-footer {
  background: var(--dark2);
  padding: 56px 48px 28px;
  border-top: 1px solid var(--border);
}
.aap-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.aap-footer-desc {
  font-size: 14px;
  color: var(--gray);
  line-height: 1.7;
  max-width: 260px;
  margin-top: 14px;
}
.aap-footer-heading {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
  display: block;
}
.aap-footer-col a {
  display: block;
  font-size: 13px;
  color: var(--gray);
  text-decoration: none;
  margin-bottom: 10px;
  transition: color 0.2s;
}
.aap-footer-col a:hover { color: var(--white); }
.aap-footer-bot {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.aap-footer-copy { font-size: 13px; color: var(--gray); font-family: var(--font-mono); }
.aap-footer-links { display: flex; gap: 20px; }
.aap-footer-links a { font-size: 13px; color: var(--gray); text-decoration: none; transition: color 0.2s; }
.aap-footer-links a:hover { color: var(--white); }

/* ── SIDEBAR ── */
.aap-sidebar { padding: 20px; }
.aap-widget {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}
.aap-widget-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.aap-widget input[type="search"],
.aap-widget input[type="text"] {
  width: 100%;
  padding: 12px 16px;
  background: var(--dark3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
}
.aap-widget input:focus { border-color: var(--primary); }
.aap-sidebar-post {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}
.aap-sidebar-post:last-child { border: none; margin-bottom: 0; padding-bottom: 0; }
.aap-sidebar-post-img { width: 56px; height: 56px; border-radius: 8px; background: var(--dark3); overflow: hidden; flex-shrink: 0; }
.aap-sidebar-post-img img { width: 100%; height: 100%; object-fit: cover; }
.aap-sidebar-post-title { font-size: 13px; font-weight: 600; color: var(--white); line-height: 1.4; }
.aap-sidebar-post-meta { font-size: 11px; color: var(--gray); margin-top: 4px; font-family: var(--font-mono); }

/* ── PAGINATION ── */
.aap-pagination { margin-top: 48px; text-align: center; }
.aap-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  margin: 0 4px;
  border-radius: 8px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--gray);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
}
.aap-pagination .page-numbers.current,
.aap-pagination .page-numbers:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ── ARCHIVE PAGE ── */
.aap-archive-hero {
  background: var(--dark2);
  padding: 48px 48px 40px;
  border-bottom: 1px solid var(--border);
}
.aap-archive-hero h1 {
  font-family: var(--font-heading) !important;
  font-size: 42px !important;
  font-weight: 800 !important;
  color: var(--white) !important;
  margin-bottom: 8px !important;
}
.aap-archive-hero p { color: var(--gray); font-size: 16px; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .aap-posts-grid { grid-template-columns: repeat(2, 1fr); }
  .aap-cats-grid { grid-template-columns: repeat(2, 1fr); }
  .aap-featured-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .aap-nav { padding: 0 20px; }
  .aap-nav-links { display: none; }
  .aap-hero { padding: 60px 20px 50px; }
  .aap-hero h1 { font-size: 38px !important; }
  .aap-posts-grid { grid-template-columns: 1fr; }
  .aap-cats-grid { grid-template-columns: repeat(2, 1fr); }
  .aap-posts-section { padding: 40px 20px; }
  .aap-featured-section { padding: 40px 20px; }
  .aap-cats-section { padding: 40px 20px; }
  .aap-footer-grid { grid-template-columns: 1fr 1fr; }
  .aap-footer { padding: 40px 20px 24px; }
  .aap-cats-bar { padding: 0 20px; }
}
@media (max-width: 480px) {
  .aap-footer-grid { grid-template-columns: 1fr; }
  .aap-hero-stats { gap: 20px; flex-wrap: wrap; }
}
