/*
Theme Name: NewAIAppsList
Theme URI: https://newaiappslist.com
Author: NewAIAppsList
Description: Clean, minimal AI apps directory theme with custom post types, category filters, search, newsletter, and submit form.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: newaiappslist
*/

/* =============================================
   CSS VARIABLES
   ============================================= */
:root {
  --black: #0f0f0f;
  --gray-900: #1a1a1a;
  --gray-700: #444;
  --gray-500: #6b6b6b;
  --gray-300: #c4c4c4;
  --gray-200: #e5e5e5;
  --gray-100: #f2f2f0;
  --gray-50:  #f9f9f7;
  --white:    #ffffff;
  --accent:        #1a6bff;
  --accent-light:  #e8f0ff;
  --accent-dark:   #0047cc;
  --green:         #0a7c5c;
  --green-light:   #e0f5ee;
  --amber:         #b85e00;
  --amber-light:   #fff3e0;
  --red:           #b52929;
  --red-light:     #fdeaea;
  --purple:        #5b3fcf;
  --purple-light:  #eeebff;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-xs: 0 1px 3px rgba(0,0,0,0.07);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.1);
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  color: var(--black);
  background: var(--white);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button, input, select, textarea {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
}

/* =============================================
   LAYOUT
   ============================================= */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}
.section { padding: 80px 0; }
.divider { border: none; border-top: 1px solid var(--gray-100); margin: 0; }

/* =============================================
   NAVIGATION
   ============================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.07);
  height: 60px;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.site-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 20px;
  color: var(--black);
  letter-spacing: -0.3px;
}
.site-logo span { color: var(--accent); }
.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-menu a {
  color: var(--gray-700);
  font-size: 14px;
  font-weight: 400;
  transition: color 0.15s;
}
.nav-menu a:hover { color: var(--black); }
.nav-cta {
  background: var(--black) !important;
  color: var(--white) !important;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-weight: 500 !important;
  transition: background 0.15s !important;
}
.nav-cta:hover { background: var(--gray-900) !important; }
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--black);
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
  border: none;
  transition: background 0.15s, transform 0.1s, border-color 0.15s;
}
.btn-primary {
  background: var(--black);
  color: var(--white);
}
.btn-primary:hover { background: var(--gray-900); transform: translateY(-1px); }
.btn-secondary {
  background: transparent;
  color: var(--black);
  border: 1px solid var(--gray-300);
}
.btn-secondary:hover { border-color: var(--black); background: var(--gray-50); }
.btn-sm { padding: 10px 18px; font-size: 13px; }
.btn-full { width: 100%; justify-content: center; }

/* =============================================
   HERO
   ============================================= */
.hero {
  padding: 100px 0 80px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 100px;
  margin-bottom: 1.5rem;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.hero-eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.hero h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.1;
  letter-spacing: -1.5px;
  color: var(--black);
  margin-bottom: 1.25rem;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero-desc {
  color: var(--gray-500);
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 2rem;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-100);
}
.stat-num {
  font-family: 'DM Serif Display', serif;
  font-size: 28px;
  letter-spacing: -1px;
  display: block;
}
.stat-label {
  font-size: 12px;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
/* Hero visual cards */
.hero-visual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.hero-mini-card {
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.09);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: box-shadow 0.2s, transform 0.2s;
}
.hero-mini-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.hero-mini-card:nth-child(odd)  { animation: floatA 4s ease-in-out infinite; }
.hero-mini-card:nth-child(even) { animation: floatB 4.5s ease-in-out infinite; }
@keyframes floatA { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-5px)} }
@keyframes floatB { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
.mini-card-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin-bottom: 10px;
}
.mini-card-name  { font-size: 13px; font-weight: 500; }
.mini-card-cat   { font-size: 11px; color: var(--gray-500); margin-top: 2px; }
.mini-card-badge {
  display: inline-block;
  margin-top: 8px;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 100px;
  font-weight: 500;
}

/* =============================================
   BADGES
   ============================================= */
.badge { font-size: 10px; font-weight: 600; padding: 3px 8px; border-radius: 100px; letter-spacing: 0.3px; text-transform: uppercase; display: inline-block; }
.badge-new    { background: var(--green-light);  color: var(--green); }
.badge-hot    { background: var(--red-light);    color: var(--red); }
.badge-free   { background: var(--accent-light); color: var(--accent); }
.badge-beta   { background: var(--amber-light);  color: var(--amber); }
.badge-featured { background: var(--purple-light); color: var(--purple); }

/* =============================================
   SEARCH BAR
   ============================================= */
.search-wrap {
  max-width: 560px;
  margin: 0 auto 2.5rem;
  position: relative;
}
.search-wrap svg {
  position: absolute;
  left: 17px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-300);
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 16px 20px 16px 50px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: var(--radius-md);
  font-size: 16px;
  background: var(--white);
  color: var(--black);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-shadow: var(--shadow-xs);
}
.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26,107,255,0.12);
}

/* =============================================
   FEATURED APP BANNER
   ============================================= */
.featured-banner {
  background: var(--gray-50);
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: var(--radius-xl);
  padding: 3rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
  margin-bottom: 2.5rem;
}
.featured-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.featured-title {
  font-family: 'DM Serif Display', serif;
  font-size: 28px;
  letter-spacing: -0.5px;
  margin-bottom: 0.5rem;
}
.featured-desc { color: var(--gray-500); font-size: 14px; line-height: 1.6; max-width: 480px; }
.featured-meta { display: flex; gap: 10px; margin-top: 1.25rem; flex-wrap: wrap; align-items: center; }
.featured-icon-lg {
  width: 100px; height: 100px;
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 52px;
  background: var(--accent-light);
  flex-shrink: 0;
}

/* =============================================
   CATEGORY FILTER PILLS
   ============================================= */
.cat-filter {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.cat-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid var(--gray-200);
  background: var(--white);
  font-size: 13px;
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.15s;
}
.cat-pill:hover { border-color: var(--black); color: var(--black); }
.cat-pill.active { background: var(--black); color: var(--white); border-color: var(--black); }
.cat-dot { width: 7px; height: 7px; border-radius: 50%; }

/* =============================================
   SECTION HEADERS
   ============================================= */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.section-title {
  font-family: 'DM Serif Display', serif;
  font-size: 32px;
  letter-spacing: -0.8px;
}
.section-subtitle { color: var(--gray-500); font-size: 14px; margin-top: 4px; }
.view-all { color: var(--accent); font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 4px; }
.view-all:hover { color: var(--accent-dark); }

/* =============================================
   APP CARDS GRID
   ============================================= */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.app-card {
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.09);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow 0.2s, transform 0.15s;
  cursor: pointer;
  color: inherit;
}
.app-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.app-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.app-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  overflow: hidden;
}
.app-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-md); }
.app-name { font-size: 16px; font-weight: 600; letter-spacing: -0.2px; }
.app-tagline { font-size: 13px; color: var(--gray-500); line-height: 1.5; }
.app-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--gray-100);
}
.app-category { font-size: 11px; color: var(--gray-500); display: flex; align-items: center; gap: 4px; }
.app-rating    { font-size: 12px; font-weight: 500; color: var(--amber); }
.load-more-wrap { text-align: center; margin-top: 2.5rem; }

/* =============================================
   SINGLE APP PAGE
   ============================================= */
.single-app-header {
  padding: 60px 0 40px;
  border-bottom: 1px solid var(--gray-100);
}
.single-app-header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 2rem;
  align-items: start;
}
.single-app-icon {
  width: 80px; height: 80px;
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 40px;
  flex-shrink: 0;
  overflow: hidden;
}
.single-app-icon img { width: 100%; height: 100%; object-fit: cover; }
.single-app-name { font-family: 'DM Serif Display', serif; font-size: 36px; letter-spacing: -1px; margin-bottom: 0.5rem; }
.single-app-tagline { color: var(--gray-500); font-size: 16px; }
.single-app-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 1rem; align-items: center; }
.single-app-actions { display: flex; flex-direction: column; gap: 10px; min-width: 160px; }
.single-app-body { padding: 60px 0; }
.single-app-grid { display: grid; grid-template-columns: 1fr 320px; gap: 3rem; align-items: start; }
.app-description { font-size: 16px; color: var(--gray-700); line-height: 1.8; }
.app-sidebar-card {
  background: var(--gray-50);
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.sidebar-field { margin-bottom: 1rem; }
.sidebar-field-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--gray-500); margin-bottom: 4px; }
.sidebar-field-value { font-size: 14px; font-weight: 500; }

/* =============================================
   NEWSLETTER
   ============================================= */
.newsletter-section { background: var(--black); padding: 80px 0; }
.newsletter-inner { max-width: 560px; margin: 0 auto; text-align: center; }
.newsletter-inner h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 36px;
  color: var(--white);
  letter-spacing: -1px;
  margin-bottom: 0.75rem;
}
.newsletter-inner h2 em { font-style: italic; color: rgba(255,255,255,0.45); }
.newsletter-desc { color: rgba(255,255,255,0.55); font-size: 16px; margin-bottom: 2rem; line-height: 1.6; }
.newsletter-form { display: flex; gap: 8px; max-width: 440px; margin: 0 auto; }
.newsletter-input {
  flex: 1;
  padding: 13px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08);
  color: var(--white);
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s;
}
.newsletter-input::placeholder { color: rgba(255,255,255,0.35); }
.newsletter-input:focus { border-color: rgba(255,255,255,0.4); }
.newsletter-btn {
  background: var(--white);
  color: var(--black);
  border: none;
  padding: 13px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.newsletter-btn:hover { background: var(--gray-100); }
.newsletter-note { color: rgba(255,255,255,0.3); font-size: 12px; margin-top: 1rem; }

/* =============================================
   SUBMIT FORM
   ============================================= */
.submit-section {
  background: var(--gray-50);
  border-radius: var(--radius-xl);
  padding: 3rem;
  border: 1px solid rgba(0,0,0,0.07);
}
.submit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.submit-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); margin-bottom: 0.75rem; }
.submit-content h2 { font-family: 'DM Serif Display', serif; font-size: 32px; letter-spacing: -0.8px; margin-bottom: 0.75rem; }
.submit-content p { color: var(--gray-500); font-size: 15px; line-height: 1.6; margin-bottom: 1.5rem; }
.submit-checklist { display: flex; flex-direction: column; gap: 10px; }
.submit-check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--gray-700); }
.check-icon { width: 24px; height: 24px; background: var(--green-light); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--green); flex-shrink: 0; }
/* form fields */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-label { font-size: 13px; font-weight: 500; color: var(--gray-700); }
.form-input, .form-select, .form-textarea {
  padding: 11px 14px;
  border: 1px solid rgba(0,0,0,0.13);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--black);
  background: var(--white);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26,107,255,0.1);
}
.form-textarea { resize: vertical; min-height: 90px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  border-top: 1px solid var(--gray-100);
  padding: 2.5rem 0;
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-logo { font-family: 'DM Serif Display', serif; font-size: 18px; }
.footer-logo span { color: var(--accent); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: var(--gray-500); font-size: 13px; transition: color 0.15s; }
.footer-links a:hover { color: var(--black); }
.footer-copy { color: var(--gray-300); font-size: 12px; }

/* =============================================
   NOTICES / ALERTS
   ============================================= */
.notice {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 1rem;
  display: none;
}
.notice.show { display: block; }
.notice-success { background: var(--green-light); color: var(--green); }
.notice-error   { background: var(--red-light);   color: var(--red); }

/* =============================================
   PAGINATION
   ============================================= */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 3rem; flex-wrap: wrap; }
.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
  font-size: 14px;
  transition: all 0.15s;
}
.page-numbers:hover     { border-color: var(--black); }
.page-numbers.current   { background: var(--black); color: var(--white); border-color: var(--black); }

/* =============================================
   ADMIN BAR OFFSET
   ============================================= */
.admin-bar .site-header { top: 32px; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .single-app-header-inner { grid-template-columns: auto 1fr; }
  .single-app-actions { grid-column: 1 / -1; flex-direction: row; }
  .single-app-grid { grid-template-columns: 1fr; }
  .submit-grid { grid-template-columns: 1fr; }
  .featured-banner { grid-template-columns: 1fr; }
  .featured-icon-lg { display: none; }
}
@media (max-width: 640px) {
  .container { padding: 0 1.25rem; }
  .section { padding: 60px 0; }
  .hero { padding: 60px 0 40px; }
  .apps-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; }
  .nav-menu { display: none; }
  .menu-toggle { display: flex; }
  .submit-section { padding: 2rem 1.5rem; }
  .nav-menu.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px; left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-100);
    padding: 1.5rem 1.25rem;
    gap: 1.25rem;
    z-index: 99;
  }
}
