/*
Theme Name: AI-SiteOS Default Theme
Theme URI: https://siteos.ai
Author: AI-SiteOS
Author URI: https://siteos.ai
Description: Ultra-fast, Elementor-native theme with glassmorphism design, AOS animations, and CSS variable theming.
Version: 2.0.0
License: GPL-2.0-or-later
*/

/* ═══════════════════════════════════════════════════════════════════════════
   1. CSS VARIABLES & FOUNDATION
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
  --font-base: 'Inter', 'Roboto', system-ui, -apple-system, sans-serif;
  --bg-dark: #0f172a;
  --bg-panel: rgba(30, 41, 59, 0.6);
  --bg-border: rgba(255, 255, 255, 0.1);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --primary-accent: #6366f1;
  --primary-hover: #a855f7;
  --gradient-accent: linear-gradient(135deg, #818cf8, #c084fc);

  --glass-blur: blur(12px);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 30px -5px rgba(99, 102, 241, 0.3);

  --container-width: 1280px;
  --section-pad-y: 6rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2rem;
}

/* Base Reset */
*, *::before, *::after { box-sizing: border-box; }
html {
  font-family: var(--font-base);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body { margin: 0; padding: 0; min-height: 100vh; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-accent); text-decoration: none; transition: all 0.2s ease; }
a:hover { color: var(--primary-hover); }


/* ═══════════════════════════════════════════════════════════════════════════
   2. TYPOGRAPHY & UTILITY CLASSES (replaces Tailwind dependencies)
   ═══════════════════════════════════════════════════════════════════════════ */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.2; margin-top: 0; color: var(--text-primary); }

.heading-xl { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 800; letter-spacing: -0.03em; }
.heading-lg { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 700; }
.heading-md { font-size: 1.5rem; font-weight: 600; }

.gradient-text {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-white { color: #fff; }
.text-muted { color: var(--text-secondary); }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; line-height: 1.7; }
.text-center { text-align: center; }

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.section-padding { padding: var(--section-pad-y) 0; }
.mb-lg { margin-bottom: 3rem; }
.mt-lg { margin-top: 2rem; }
.border-bottom { border-bottom: 1px solid var(--bg-border); padding-bottom: 2rem; }

.label-accent {
  display: inline-block;
  color: var(--primary-accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  margin-bottom: 1rem;
}


/* ═══════════════════════════════════════════════════════════════════════════
   3. UI COMPONENTS
   ═══════════════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.875rem;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
}
.btn-primary {
  background: var(--primary-accent);
  color: #fff;
  box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.39);
}
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-2px); color: #fff; }
.btn-accent { background: #fff; color: var(--bg-dark); }
.btn-accent:hover { background: #e2e8f0; transform: translateY(-2px); }
.btn-outline {
  background: transparent;
  color: var(--primary-accent);
  border: 1px solid var(--primary-accent);
}
.btn-outline:hover { background: var(--primary-accent); color: #fff; transform: translateY(-2px); }
.btn-large { padding: 1rem 2rem; font-size: 1rem; }
.btn-sm { padding: 0.5rem 1.25rem; font-size: 0.75rem; }
.btn-full { width: 100%; }

/* Glassmorphism Panel */
.glass-panel {
  background: var(--bg-panel);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.glass-panel:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-glow);
}

/* Glass Card (for grids) */
.glass-card {
  background: var(--bg-panel);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.glass-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-glow);
}

/* Image utilities */
.img-rounded { border-radius: var(--radius-lg); }
.img-full { width: 100%; height: auto; object-fit: cover; }
.img-placeholder {
  width: 100%;
  height: 16rem;
  background: rgba(30, 41, 59, 0.8);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-weight: 500;
}


/* ═══════════════════════════════════════════════════════════════════════════
   4. HEADER & NAVIGATION
   ═══════════════════════════════════════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--bg-border);
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}
.site-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #fff;
}
.site-title:hover { color: var(--primary-accent); }

.main-navigation ul {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-navigation a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}
.main-navigation a:hover { color: #fff; }

/* Mobile hamburger */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 110;
}
.hamburger-bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}
.mobile-menu-toggle.is-active .hamburger-bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.mobile-menu-toggle.is-active .hamburger-bar:nth-child(2) {
  opacity: 0;
}
.mobile-menu-toggle.is-active .hamburger-bar:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}


/* ═══════════════════════════════════════════════════════════════════════════
   5. FOOTER
   ═══════════════════════════════════════════════════════════════════════════ */
.site-footer {
  border-top: 1px solid var(--bg-border);
  padding: 3rem 0;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.875rem;
  background: rgba(15, 23, 42, 0.5);
}
.site-info {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
}
.footer-links ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-links a { color: var(--text-secondary); }
.footer-links a:hover { color: #fff; }
.footer-credit a { color: var(--primary-accent); }


/* ═══════════════════════════════════════════════════════════════════════════
   6. ARCHIVE / BLOG GRID
   ═══════════════════════════════════════════════════════════════════════════ */
.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.archive-card .card-thumbnail {
  display: block;
  overflow: hidden;
}
.archive-card .card-img {
  width: 100%;
  height: 12rem;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.archive-card:hover .card-img {
  transform: scale(1.05);
}
.archive-card .card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.archive-card .card-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.5rem;
}
.archive-card .card-title a { color: var(--text-primary); }
.archive-card .card-title a:hover { color: var(--primary-accent); }
.archive-card .entry-summary {
  flex: 1;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}
.archive-card .entry-footer { margin-top: auto; }


/* ═══════════════════════════════════════════════════════════════════════════
   7. SINGLE POST / ARTICLE
   ═══════════════════════════════════════════════════════════════════════════ */
.blog-article {
  max-width: 900px;
  margin: 0 auto;
}
.post-thumbnail img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}


/* ═══════════════════════════════════════════════════════════════════════════
   8. TEXT & MEDIA LAYOUT (Services, etc.)
   ═══════════════════════════════════════════════════════════════════════════ */
.tm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
.tm-media { padding: 0.5rem; }
.tm-media img { border-radius: var(--radius-lg); box-shadow: 0 20px 40px rgba(0,0,0,0.4); }


/* ═══════════════════════════════════════════════════════════════════════════
   9. PROSE FORMATTER (AI Content)
   ═══════════════════════════════════════════════════════════════════════════ */
.wrapper-prose { color: var(--text-secondary); font-size: 1.1rem; line-height: 1.8; max-width: 800px; margin: 0 auto; }
.wrapper-prose h2, .wrapper-prose h3 { color: #fff; margin-top: 2.5rem; margin-bottom: 1rem; }
.wrapper-prose p { margin-bottom: 1.5rem; }
.wrapper-prose ul, .wrapper-prose ol { margin-bottom: 1.5rem; padding-left: 1.5rem; }
.wrapper-prose li { margin-bottom: 0.5rem; }
.wrapper-prose a { color: var(--primary-accent); text-decoration: underline; text-underline-offset: 3px; }
.wrapper-prose blockquote {
  border-left: 4px solid var(--primary-accent);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: rgba(99, 102, 241, 0.05);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  font-style: italic;
  color: var(--text-secondary);
}
.wrapper-prose img {
  border-radius: var(--radius-lg);
  margin: 2rem 0;
}
.wrapper-prose code {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
}


/* ═══════════════════════════════════════════════════════════════════════════
  10. WORDPRESS PAGINATION
   ═══════════════════════════════════════════════════════════════════════════ */
.nav-links {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 3rem 0 1rem;
}
.nav-links a, .nav-links span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  border-radius: 0.75rem;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}
.nav-links a {
  background: var(--bg-panel);
  border: 1px solid var(--bg-border);
  color: var(--text-secondary);
}
.nav-links a:hover { background: var(--primary-accent); color: #fff; border-color: var(--primary-accent); }
.nav-links .current {
  background: var(--primary-accent);
  color: #fff;
  border: 1px solid var(--primary-accent);
}


/* ═══════════════════════════════════════════════════════════════════════════
  11. RESPONSIVE BREAKPOINTS
   ═══════════════════════════════════════════════════════════════════════════ */

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

/* Mobile */
@media (max-width: 768px) {
  :root { --section-pad-y: 3.5rem; }
  
  .container { padding: 0 1.25rem; }

  /* Mobile navigation */
  .mobile-menu-toggle { display: flex; }
  
  .main-navigation {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-left: 1px solid var(--bg-border);
    padding: 6rem 2rem 2rem;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 105;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
  }
  .main-navigation.is-open { right: 0; }
  
  .main-navigation ul {
    flex-direction: column;
    gap: 0;
  }
  .main-navigation li {
    border-bottom: 1px solid var(--bg-border);
  }
  .main-navigation a {
    display: block;
    padding: 1rem 0;
    font-size: 1.1rem;
  }

  /* Grids */
  .archive-grid { grid-template-columns: 1fr; }
  .tm-grid { grid-template-columns: 1fr; gap: 2rem; }

  /* Footer */
  .site-info { flex-direction: column; gap: 1rem; }
  .footer-links ul { flex-wrap: wrap; justify-content: center; }

  /* Typography */
  .heading-xl { font-size: clamp(1.75rem, 6vw, 2.5rem); }
  
  /* Panels */
  .glass-panel { padding: 1.5rem; }
  .blog-article { padding: 1.5rem; }
}

@media (max-width: 480px) {
  .header-inner { height: 64px; }
  .site-title { font-size: 1.25rem; }
  .archive-card .card-img { height: 10rem; }
}
