/*
Theme Name: Learn Me AI
Theme URI: https://learnme.ai
Author: Komraz LLC
Author URI: https://komraz.com
Description: A modern, dark-themed WordPress theme matching the Learn Me AI landing page design.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: learn-me-ai
Tags: dark, modern, one-column, custom-logo, custom-menu, featured-images, footer-widgets
*/

/* ==========================================================================
   CSS Variables
   ========================================================================== */
:root {
  --primary: #991b1b;
  --primary-light: #dc2626;
  --primary-dark: #7f1d1d;
  --primary-glow: rgba(153, 27, 27, 0.4);
  --bg-dark: #030712;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-color: rgba(255, 255, 255, 0.05);
  --border-hover: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   Base Styles
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-primary);
  background: var(--bg-dark);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
  color: var(--primary-light);
}

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

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 1rem;
  color: white;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 1rem;
}

/* ==========================================================================
   Animated Background Effects
   ========================================================================== */
.bg-effects {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.5;
  animation: float 20s ease-in-out infinite;
}

.orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #991b1b 0%, transparent 70%);
  top: -200px;
  right: -100px;
  animation-delay: 0s;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #7f1d1d 0%, transparent 70%);
  bottom: -150px;
  left: -100px;
  animation-delay: -7s;
}

.orb-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #450a0a 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -14s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

.grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(3, 7, 18, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-img {
  height: 40px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a,
.nav-links .menu-item a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links .menu-item a:hover {
  color: white;
}

.nav-btn-secondary {
  padding: 0.5rem 1.25rem !important;
  border: 1px solid var(--border-hover);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.3s ease;
}

.nav-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.nav-btn-primary {
  padding: 0.5rem 1.25rem !important;
  background: linear-gradient(135deg, #991b1b 0%, #7f1d1d 100%);
  border-radius: 10px;
  font-weight: 600;
  color: white !important;
  border: 1px solid var(--border-hover);
  transition: all 0.3s ease;
}

.nav-btn-primary:hover {
  box-shadow: 0 0 30px var(--primary-glow);
  transform: translateY(-1px);
  color: white !important;
}

/* Mobile Menu Button - Hidden on desktop */
.mobile-menu-btn {
  display: none !important;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 101;
}

.hamburger-line {
  width: 24px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-menu-btn.open .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.open .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.open .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: calc(100vh - 72px);
  background-color: #030712;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 3rem 2rem;
  gap: 1.5rem;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-20px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
  overflow-y: auto;
}

.mobile-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* Ensure mobile menu buttons are visible */
.mobile-menu a {
  position: relative;
  z-index: 1;
}

.mobile-menu a,
.mobile-menu .menu-item a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  transition: color 0.3s ease;
  width: 100%;
  text-align: center;
}

.mobile-menu a:hover,
.mobile-menu .menu-item a:hover {
  color: var(--primary-light);
}

.mobile-btn-secondary {
  display: block;
  width: 100%;
  padding: 1rem 2rem !important;
  border: 1px solid var(--border-hover);
  border-radius: 12px;
  background: #0f172a;
  margin-top: 1rem;
  text-align: center;
}

.mobile-btn-primary {
  display: block;
  width: 100%;
  padding: 1rem 2rem !important;
  background: linear-gradient(135deg, #991b1b 0%, #7f1d1d 100%);
  border-radius: 12px;
  font-weight: 600;
  color: white !important;
  text-align: center;
}

/* ==========================================================================
   Site Content
   ========================================================================== */
.site-content {
  position: relative;
  z-index: 1;
  padding-top: 72px;
  min-height: calc(100vh - 72px);
}

/* Extra top padding for content */
.site-main {
  padding-top: 3rem;
}

.site-main > .container {
  padding-top: 1rem;
}

/* More top padding on desktop */
@media (min-width: 769px) {
  .site-content {
    padding-top: 160px;
  }
  
  .site-main {
    padding-top: 2rem;
  }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ==========================================================================
   Page Header
   ========================================================================== */
.page-header {
  padding: 4rem 0 2rem;
  text-align: center;
}

.page-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: white;
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
}

/* ==========================================================================
   Blog Hero Section
   ========================================================================== */
.blog-hero {
  text-align: center;
  padding: 2rem 0 3rem;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  line-height: 1.1;
}

.hero-gradient {
  background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 50%, #dc2626 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ==========================================================================
   Post Cards / Blog Grid
   ========================================================================== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
  padding: 2rem 0 4rem;
}

.post-card {
  position: relative;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s ease;
}

.post-card:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(153, 27, 27, 0.3);
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.3),
    0 0 40px rgba(153, 27, 27, 0.1);
}

.post-card .card-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(153, 27, 27, 0), transparent);
  transition: all 0.4s ease;
}

.post-card:hover .card-glow {
  background: linear-gradient(90deg, transparent, rgba(153, 27, 27, 0.5), transparent);
}

.post-thumbnail {
  aspect-ratio: 16/9;
  overflow: hidden;
}

.post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.post-card:hover .post-thumbnail img {
  transform: scale(1.05);
}

.post-content {
  padding: 1.5rem 2rem 2rem;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.post-meta svg {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

.post-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.post-category a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-light);
  transition: color 0.3s ease;
}

.post-category a:hover {
  color: white;
}

.post-card .entry-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: white;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.post-card .entry-title a {
  color: inherit;
  transition: color 0.3s ease;
}

.post-card .entry-title a:hover {
  color: var(--primary-light);
}

.post-excerpt {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-light);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.read-more:hover {
  color: white;
}

.read-more svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.read-more:hover svg {
  transform: translateX(4px);
}

/* ==========================================================================
   Single Post / Page
   ========================================================================== */
.single-post-content,
.page-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.single-post-content .entry-title,
.page-content .entry-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

.single-post-content .entry-content,
.page-content .entry-content {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.single-post-content .entry-content h2,
.page-content .entry-content h2 {
  font-size: 1.75rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.single-post-content .entry-content h3,
.page-content .entry-content h3 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.single-post-content .entry-content p,
.page-content .entry-content p {
  margin-bottom: 1.5rem;
}

.single-post-content .entry-content a,
.page-content .entry-content a {
  color: var(--primary-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.single-post-content .entry-content a:hover,
.page-content .entry-content a:hover {
  color: white;
}

.single-post-content .entry-content ul,
.single-post-content .entry-content ol,
.page-content .entry-content ul,
.page-content .entry-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.single-post-content .entry-content li,
.page-content .entry-content li {
  margin-bottom: 0.5rem;
}

.single-post-content .entry-content blockquote,
.page-content .entry-content blockquote {
  border-left: 3px solid var(--primary);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--text-muted);
}

.single-post-content .entry-content code,
.page-content .entry-content code {
  background: rgba(255, 255, 255, 0.05);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 0.9em;
}

.single-post-content .entry-content pre,
.page-content .entry-content pre {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  overflow-x: auto;
  margin: 2rem 0;
}

.single-post-content .entry-content pre code,
.page-content .entry-content pre code {
  background: none;
  padding: 0;
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 2rem 0 4rem;
}

.pagination a,
.pagination span {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.pagination a:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-hover);
  color: white;
}

.pagination .current {
  background: linear-gradient(135deg, #991b1b 0%, #7f1d1d 100%);
  border-color: transparent;
  color: white;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  position: relative;
  z-index: 1;
  background: var(--bg-dark);
  border-top: 1px solid var(--border-color);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 4rem;
}

.footer-logo {
  height: 40px;
  margin-bottom: 1.25rem;
}

.footer-brand p {
  color: var(--text-muted);
  max-width: 300px;
  line-height: 1.7;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.footer-column h4 {
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-column a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.4rem 0;
  transition: color 0.3s ease;
  font-size: 0.95rem;
}

.footer-column a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding: 2rem;
  text-align: center;
}

.footer-bottom p {
  color: #475569;
  font-size: 0.875rem;
  margin: 0;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: #f1f1f1;
  border-radius: 3px;
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
  clip: auto !important;
  clip-path: none;
  color: #21759b;
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

/* ==========================================================================
   No Results
   ========================================================================== */
.no-results {
  text-align: center;
  padding: 4rem 2rem;
}

.no-results .card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 3rem;
  max-width: 500px;
  margin: 0 auto;
}

.no-results .card-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.no-results .text-secondary {
  color: var(--text-secondary);
}

/* ==========================================================================
   Comments
   ========================================================================== */
.comments-area {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  margin-bottom: 4rem;
}

.comments-title {
  font-size: 1.5rem;
  margin-bottom: 2rem;
}

.comment-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.comment {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.comment:last-child {
  border-bottom: none;
}

.comment-author {
  font-weight: 600;
  color: white;
}

.comment-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.comment-content {
  color: var(--text-secondary);
}

.comment-reply-link {
  color: var(--primary-light);
  font-size: 0.875rem;
}

/* Comment Form */
.comment-form label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(153, 27, 27, 0.1);
}

.comment-form .submit {
  padding: 0.75rem 2rem;
  background: linear-gradient(135deg, #991b1b 0%, #7f1d1d 100%);
  border: none;
  border-radius: 10px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.comment-form .submit:hover {
  box-shadow: 0 0 30px var(--primary-glow);
  transform: translateY(-2px);
}

/* ==========================================================================
   WordPress Core Alignment
   ========================================================================== */
.alignleft {
  float: left;
  margin-right: 1.5rem;
  margin-bottom: 1rem;
}

.alignright {
  float: right;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1rem;
}

.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
  padding: 0.5rem 0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
  .nav-links {
    display: none !important;
  }
  
  .mobile-menu-btn {
    display: flex !important;
  }
  
  .mobile-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  
  .posts-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .footer-links {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .page-header {
    padding: 2rem 0 1rem;
  }
  
  .single-post-content,
  .page-content {
    padding: 2rem 1rem;
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 1rem;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  .footer-links {
    grid-template-columns: 1fr;
  }
  
  .post-content {
    padding: 1rem 1.25rem 1.5rem;
  }
}
