/*
Theme Name: Danny Younes AI
Theme URI: https://dannyyounes.com
Author: Danny Younes
Author URI: https://dannyyounes.com
Description: A clean, modern WordPress blog theme for Danny Younes — AI & Automation. Features a striking hero, responsive blog grid, and elegant typography.
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: danny-younes-ai
Tags: blog, one-column, custom-menu, featured-images, theme-options, translation-ready
*/

/* =====================================================
   CSS VARIABLES
   ===================================================== */
:root {
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-light: #3B82F6;
  --accent: #0EA5E9;
  --dark: #0F172A;
  --dark-secondary: #1E293B;
  --text: #334155;
  --text-light: #64748B;
  --text-lighter: #94A3B8;
  --bg: #FFFFFF;
  --bg-alt: #F8FAFC;
  --border: #E2E8F0;
  --border-light: #F1F5F9;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.12);
  --shadow-primary: 0 8px 30px rgba(37, 99, 235, 0.25);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --container: 1200px;
}

/* =====================================================
   RESET & BASE
   ===================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: var(--primary);
  transition: var(--transition);
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-main);
  font-weight: 700;
  line-height: 1.2;
  color: var(--dark);
}

/* =====================================================
   UTILITIES
   ===================================================== */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
}

.section--alt {
  background: var(--bg-alt);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 64px;
}

.section-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(37, 99, 235, 0.08);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 16px;
}

.section-title {
  font-size: 40px;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 18px;
  color: var(--text-light);
  line-height: 1.6;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-main);
}

.btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-primary);
}

.btn--primary:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(37, 99, 235, 0.35);
}

.btn--outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn--outline:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

.btn--lg {
  padding: 18px 40px;
  font-size: 16px;
  border-radius: 12px;
}

/* =====================================================
   HEADER / NAVIGATION
   ===================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: var(--transition);
  background: transparent;
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 20px rgba(15, 23, 42, 0.06);
  padding: 12px 0;
}

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

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.02em;
}

.site-header:not(.scrolled) .site-logo {
  color: #fff;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.main-nav a {
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light);
  border-radius: 8px;
  transition: var(--transition);
}

.site-header:not(.scrolled) .main-nav a {
  color: rgba(255, 255, 255, 0.85);
}

.main-nav a:hover,
.main-nav .current-menu-item a,
.main-nav .current_page_item a {
  color: var(--primary);
  background: rgba(37, 99, 235, 0.06);
}

.site-header:not(.scrolled) .main-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: var(--transition);
}

.site-header:not(.scrolled) .menu-toggle span {
  background: #fff;
}

/* =====================================================
   HERO SECTION
   ===================================================== */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-secondary) 50%, #1a365d 100%);
  overflow: hidden;
  padding: 140px 0 100px;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 400px at 20% 50%, rgba(37, 99, 235, 0.15), transparent),
    radial-gradient(ellipse 500px 500px at 80% 30%, rgba(14, 165, 233, 0.1), transparent);
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(37, 99, 235, 0.4);
  border-radius: 50%;
  animation: particleFloat 8s ease-in-out infinite;
}

.particle:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { top: 60%; left: 85%; animation-delay: 1.5s; }
.particle:nth-child(3) { top: 80%; left: 30%; animation-delay: 3s; }
.particle:nth-child(4) { top: 30%; left: 70%; animation-delay: 4.5s; }
.particle:nth-child(5) { top: 50%; left: 50%; animation-delay: 2s; }
.particle:nth-child(6) { top: 10%; left: 60%; animation-delay: 5s; }

@keyframes particleFloat {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.4; }
  50% { transform: translate(30px, -40px) scale(1.5); opacity: 0.8; }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.hero h1 {
  font-size: 64px;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero-description {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 520px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
}

/* =====================================================
   BLOG GRID
   ===================================================== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.blog-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.blog-card-image {
  aspect-ratio: 16/10;
  background: var(--bg-alt);
  overflow: hidden;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.blog-card:hover .blog-card-image img {
  transform: scale(1.05);
}

.blog-card-body {
  padding: 24px;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-lighter);
  margin-bottom: 12px;
}

.blog-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
}

.blog-card h3 a {
  color: var(--dark);
}

.blog-card h3 a:hover {
  color: var(--primary);
}

.blog-card p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
}

.blog-read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  margin-top: 16px;
}

.blog-read-more:hover {
  gap: 10px;
}

/* Pagination */
.pagination-wrap {
  text-align: center;
  margin-top: 48px;
}

.pagination-wrap .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0 4px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.pagination-wrap .page-numbers.current {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.pagination-wrap .page-numbers:hover:not(.current) {
  border-color: var(--primary);
  color: var(--primary);
}

.pagination-wrap .prev,
.pagination-wrap .next {
  width: auto;
  padding: 0 16px;
}

.no-posts-message {
  text-align: center;
  color: var(--text-light);
  font-size: 18px;
  padding: 60px 0;
}

/* =====================================================
   SINGLE POST / PAGE
   ===================================================== */
.page-header {
  padding: 160px 0 60px;
  background: var(--bg-alt);
  text-align: center;
}

.page-header h1 {
  font-size: 44px;
  font-weight: 800;
  max-width: 760px;
  margin: 0 auto;
  letter-spacing: -0.02em;
}

.post-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 24px;
}

.post-content p {
  margin-bottom: 1.5em;
  line-height: 1.8;
}

.post-content h2 {
  font-size: 28px;
  margin: 2em 0 0.8em;
}

.post-content h3 {
  font-size: 22px;
  margin: 1.5em 0 0.6em;
}

.post-content img {
  border-radius: var(--radius);
  margin: 2em 0;
}

.post-content ul,
.post-content ol {
  margin: 1em 0 1.5em 1.5em;
}

.post-content li {
  margin-bottom: 0.5em;
  line-height: 1.7;
}

.post-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 20px 24px;
  margin: 2em 0;
  background: var(--bg-alt);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text-light);
}

.post-content pre {
  background: var(--dark);
  color: #e2e8f0;
  padding: 24px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 2em 0;
  font-size: 14px;
  line-height: 1.6;
}

.post-content code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.9em;
}

.post-content p code {
  background: var(--bg-alt);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

/* =====================================================
   FOOTER
   ===================================================== */
.site-footer {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.6);
  padding: 48px 0 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand .site-logo {
  margin-bottom: 8px;
}

.footer-tagline {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  transition: var(--transition);
  font-size: 16px;
}

.footer-social a:hover {
  background: var(--primary);
  color: #fff;
}

.footer-bottom {
  padding: 20px 0;
  text-align: center;
  font-size: 13px;
}

/* =====================================================
   404 PAGE
   ===================================================== */
.error-404 {
  text-align: center;
  padding: 200px 24px 120px;
}

.error-404 h1 {
  font-size: 120px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.error-404 p {
  font-size: 20px;
  color: var(--text-light);
  margin: 16px 0 32px;
}

/* =====================================================
   SCROLL ANIMATIONS
   ===================================================== */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero h1 {
    font-size: 48px;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 72px 0;
  }

  .section-title {
    font-size: 32px;
  }

  .menu-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: #fff;
    flex-direction: column;
    padding: 80px 24px 24px;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    gap: 4px;
  }

  .main-nav.active {
    right: 0;
  }

  .main-nav a {
    color: var(--text) !important;
    padding: 12px 16px;
    width: 100%;
  }

  .hero {
    min-height: auto;
    padding: 140px 0 80px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero-description {
    font-size: 17px;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .page-header h1 {
    font-size: 32px;
  }
}

/* =====================================================
   WORDPRESS SPECIFIC
   ===================================================== */
.wp-block-image {
  margin: 2em 0;
}

.alignleft {
  float: left;
  margin-right: 24px;
  margin-bottom: 12px;
}

.alignright {
  float: right;
  margin-left: 24px;
  margin-bottom: 12px;
}

.aligncenter {
  display: block;
  margin: 0 auto;
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
}
