/*
Theme Name: TaraTech Agency
Theme URI: https://taratech.agency
Author: TaraTech
Author URI: https://taratech.agency
Description: A custom WordPress theme matching TaraTech's modern, dark, glassmorphism visual identity. Ideal for publishing articles.
Version: 1.0
Text Domain: taratech
*/

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&display=swap');

:root {
  --primary: #2330CE;
  --secondary: #030B6C;
  --dark: #050505;
  --dark-card: rgba(20, 20, 20, 0.6);
  --text-main: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.6);
  --border-glass: rgba(255, 255, 255, 0.1);
  --font-arabic: 'IBM Plex Sans Arabic', sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--dark);
  color: var(--text-main);
  font-family: var(--font-arabic);
  direction: rtl;
  line-height: 1.8;
  font-size: 16px;
}

/* Background Glow Effect */
body::before {
  content: '';
  position: fixed;
  top: -20%;
  right: -10%;
  width: 50vw;
  height: 50vw;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(35, 48, 206, 0.4) 0%, transparent 70%);
  opacity: 0.2;
  filter: blur(100px);
  z-index: -1;
  pointer-events: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.4;
  color: var(--text-main);
}

h1 {
  font-size: 2.5rem;
  text-shadow: 0 0 15px rgba(35, 48, 206, 0.6); /* text-glow */
}

h2 {
  font-size: 1.8rem;
  color: #3b82f6; /* Blue 500 for subheadings */
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 0.5rem;
}

h3 { font-size: 1.5rem; }
p { margin-bottom: 1.5rem; color: var(--text-muted); font-size: 1.125rem; }
a { color: #60a5fa; text-decoration: none; transition: color 0.3s ease; }
a:hover { color: #93c5fd; }
strong, b { color: var(--text-main); font-weight: 700; }

/* Lists */
ul, ol {
  margin-bottom: 1.5rem;
  padding-right: 1.5rem;
  color: var(--text-muted);
}

ul li, ol li {
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
}

/* WordPress Core Image Alignment Classes */
.aligncenter { display: block; margin: 1.5rem auto; }
.alignleft { float: left; margin: 0.5rem 1.5rem 1.5rem 0; }
.alignright { float: right; margin: 0.5rem 0 1.5rem 1.5rem; }
img { max-width: 100%; height: auto; border-radius: 0.5rem; }

/* Table of Contents (Glassmorphism) */
.table-of-contents {
  background: var(--dark-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: 1rem;
  padding: 1.5rem 2rem;
  margin: 3rem 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.table-of-contents h2 {
  margin-top: 0;
  font-size: 1.5rem;
  color: var(--text-main);
  border-bottom: none;
  padding-bottom: 0;
}

.table-of-contents ul {
  list-style-type: none;
  padding-right: 0;
  margin-bottom: 0;
}

.table-of-contents ul li {
  position: relative;
  padding-right: 1.5rem;
}

.table-of-contents ul li::before {
  content: '←';
  position: absolute;
  right: 0;
  color: var(--primary);
  font-weight: bold;
}

.table-of-contents a {
  color: var(--text-muted);
}
.table-of-contents a:hover {
  color: var(--text-main);
}

/* Header */
.site-header {
  padding: 1.5rem 2rem;
  background: rgba(5, 5, 5, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-title {
  margin: 0;
  font-size: 1.5rem;
  padding-bottom: 0;
  border: none;
}
.site-title a {
  color: var(--text-main);
  text-shadow: 0 0 15px rgba(35, 48, 206, 0.6);
  font-weight: 800;
  letter-spacing: 1px;
}

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

body.single .blog-container {
  max-width: 800px; /* Optimal for reading articles */
}

/* Posts Grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 768px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

/* Single Post Specifics */
.post-thumbnail img {
  width: 100%;
  height: auto;
  border-radius: 1.5rem;
  margin-bottom: 3rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.post-title {
  text-align: center;
  margin-bottom: 3rem;
  line-height: 1.3;
}

.post-content {
  margin-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  body { font-size: 15px; }
  .blog-container { padding: 1.5rem; }
  .table-of-contents { padding: 1rem 1.5rem; }
}
