/*
Theme Name: YUV Child
Template: twentytwentythree
Description: Child theme of Twenty Twenty-Three styled to match YUV.AI blog design with light theme and RTL support
Version: 1.9
*/

/* Import Inter font to match YUV.AI */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Custom Properties for light theme */
:root {
  --yuv-primary: #2563eb;
  --yuv-secondary: #7c3aed;
  --yuv-tertiary: #059669;
  --yuv-blue: #0ea5e9;
  --yuv-blue-alt: #06b6d4;
  --yuv-green: #10b981;
  --yuv-text: #1f2937;
  --yuv-text-muted: #6b7280;
  --yuv-bg-light: #ffffff;
  --yuv-bg-lighter: #f9fafb;
  --yuv-bg-overlay: rgba(255, 255, 255, 0.8);
  --yuv-bg-card: #ffffff;
  --yuv-shadow-light: rgba(0, 0, 0, 0.05);
  --yuv-shadow-medium: rgba(0, 0, 0, 0.1);
  --yuv-nav-bg: rgba(255, 255, 255, 0.9);
  --yuv-nav-border: rgba(0, 0, 0, 0.1);
  --yuv-border-light: #e5e7eb;
  --radius: 0.625rem;
}

/* RTL Support */
html {
  direction: rtl;
}

body {
  direction: rtl;
  text-align: right;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.6;
  background: var(--yuv-bg-lighter);
  color: var(--yuv-text);
  margin: 0;
  padding: 0;
}

/* Container matching YUV.AI layout with RTL */
.wp-site-blocks {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 27px;
  direction: rtl;
}

/* Site Header - light with blur effect */
.wp-site-blocks > header,
.wp-block-template-part[data-area="header"] {
  background: var(--yuv-nav-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--yuv-nav-border);
  border-radius: 33554400px;
  padding: 11.25px 27px;
  margin: 20px 0;
  position: sticky;
  top: 20px;
  z-index: 100;
  max-width: 1008px;
  margin-inline-start: auto;
  margin-inline-end: auto;
  box-shadow: 0 4px 20px var(--yuv-shadow-light);
}

/* Navigation Links - pill style with RTL */
.wp-block-navigation__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  direction: rtl;
}

.wp-block-navigation__container a,
.wp-block-navigation-link a {
  background: transparent;
  color: var(--yuv-text);
  font-weight: 500;
  font-size: 18px;
  padding: 9px 13.5px;
  border-radius: 11.25px;
  margin: 0;
  transition: all 0.2s ease;
  text-decoration: none;
  display: block;
}

.wp-block-navigation__container a:hover,
.wp-block-navigation-link a:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--yuv-primary);
}

/* Main Content Area */
main {
  padding: 90px 0;
  width: 100%;
  direction: rtl;
}

/* Archive and Blog Headers */
.wp-block-query-title,
.wp-block-archive-title,
.page-title {
  font-size: 81px;
  font-weight: 700;
  line-height: 81px;
  color: var(--yuv-text);
  margin: 0 0 18px;
  text-align: center;
}

.taxonomy-description,
.archive-description {
  font-size: 27px;
  color: var(--yuv-text-muted);
  line-height: 36px;
  margin: 0 0 90px;
  text-align: center;
}

.page-header {
  text-align: center;
  margin-bottom: 60px;
  direction: rtl;
}

/* Blog Grid Layout - matching YUV.AI with RTL */
.wp-block-query {
  width: 100%;
  direction: rtl;
}

.wp-block-post-template {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 27px;
  margin-bottom: 27px;
  direction: rtl;
}

@media (max-width: 768px) {
  .wp-block-post-template {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1024px) {
  .wp-block-post-template {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Blog Card Styling - light theme */
.wp-block-post {
  background: var(--yuv-bg-card);
  border: 1px solid var(--yuv-border-light);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s ease;
  height: fit-content;
  box-shadow: 0 1px 3px var(--yuv-shadow-light);
  direction: rtl;
}

.wp-block-post:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--yuv-shadow-medium);
  border-color: var(--yuv-primary);
}

/* Featured Image */
.wp-block-post-featured-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
}

.wp-block-post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.wp-block-post:hover .wp-block-post-featured-image img {
  transform: scale(1.05);
}

.wp-block-post-featured-image a {
  display: block;
  width: 100%;
  height: 100%;
}

/* Post Content with RTL */
.wp-block-post-content {
  padding: 24px;
  direction: rtl;
  text-align: right;
}

/* Category Badges */
.wp-block-post-terms,
.post-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  justify-content: flex-start;
}

.wp-block-post-terms a,
.category-badge {
  background: var(--yuv-primary);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
}

.wp-block-post-terms a:hover,
.category-badge:hover {
  background: var(--yuv-secondary);
  transform: translateY(-1px);
}

/* Post Titles with RTL */
.wp-block-post-title,
.wp-block-post-title a {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--yuv-text);
  margin: 0 0 16px;
  text-decoration: none;
  text-align: right;
  direction: rtl;
}

.wp-block-post-title a:hover {
  color: var(--yuv-primary);
}

/* Post Meta with RTL */
.wp-block-post-date,
.post-meta {
  color: var(--yuv-text-muted);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
  direction: rtl;
  text-align: right;
}

/* Post Excerpt with RTL */
.wp-block-post-excerpt,
.post-excerpt {
  color: var(--yuv-text-muted);
  font-size: 16px;
  line-height: 1.5;
  margin: 0 0 16px;
  text-align: right;
  direction: rtl;
}

.wp-block-post-excerpt p,
.post-excerpt p {
  margin: 0;
  text-align: right;
}

/* Read More Links */
.wp-block-post-excerpt .wp-block-post-excerpt__more-link,
.wp-block-post-excerpt__more-link {
  color: var(--yuv-primary);
  font-weight: 600;
  text-decoration: none;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
  margin-top: 8px;
}

.wp-block-post-excerpt .wp-block-post-excerpt__more-link:hover,
.wp-block-post-excerpt__more-link:hover {
  color: var(--yuv-secondary);
}

/* Pagination with RTL */
.wp-block-query-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--yuv-border-light);
  direction: rtl;
}

.wp-block-query-pagination-numbers {
  display: flex;
  gap: 8px;
  align-items: center;
}

.wp-block-query-pagination a,
.wp-block-query-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.wp-block-query-pagination a {
  background: transparent;
  color: var(--yuv-text-muted);
  border: 1px solid var(--yuv-border-light);
}

.wp-block-query-pagination a:hover {
  background: var(--yuv-primary);
  color: white;
  border-color: var(--yuv-primary);
}

.wp-block-query-pagination .current {
  background: var(--yuv-primary);
  color: white;
  border: 1px solid var(--yuv-primary);
}

/* Single Post Styles with RTL */
.single .wp-block-post-title {
  font-size: 48px;
  line-height: 1.2;
  margin-bottom: 24px;
  text-align: right;
}

.single .wp-block-post-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0;
  direction: rtl;
  text-align: right;
}

.single .wp-block-post-content p {
  font-size: 18px;
  line-height: 1.7;
  margin-bottom: 24px;
  text-align: right;
}

.single .wp-block-post-content h2,
.single .wp-block-post-content h3,
.single .wp-block-post-content h4 {
  color: var(--yuv-text);
  font-weight: 700;
  margin: 32px 0 16px;
  text-align: right;
}

/* Comments with RTL */
.wp-block-comments {
  direction: rtl;
  text-align: right;
}

.wp-block-comment-template {
  direction: rtl;
}

/* Search and 404 Pages */
.no-results,
.error-404,
.no-posts-found {
  text-align: center;
  padding: 90px 0;
  direction: rtl;
}

.no-results h1,
.error-404 h1,
.no-posts-found h1 {
  font-size: 48px;
  color: var(--yuv-text);
  margin-bottom: 24px;
}

.no-results p,
.error-404 p,
.no-posts-found p {
  font-size: 18px;
  color: var(--yuv-text-muted);
  margin-bottom: 32px;
}

/* Search Form RTL */
.wp-block-search,
.search-form {
  direction: rtl;
  text-align: right;
}

.wp-block-search__input,
.search-form input[type="search"] {
  direction: rtl;
  text-align: right;
  padding-inline-start: 16px;
  padding-inline-end: 16px;
}

/* Responsive adjustments for RTL */
@media (max-width: 768px) {
  .wp-block-query-title,
  .wp-block-archive-title,
  .page-title {
    font-size: 48px;
    line-height: 1.2;
  }
  
  .taxonomy-description,
  .archive-description {
    font-size: 18px;
    line-height: 1.5;
  }
  
  .wp-site-blocks {
    padding: 0 16px;
  }
  
  .wp-site-blocks > header,
  .wp-block-template-part[data-area="header"] {
    padding: 8px 16px;
    margin: 16px 0;
  }
  
  main {
    padding: 60px 0;
  }
}

/* Additional RTL specific fixes */
* {
  box-sizing: border-box;
}

/* Ensure all text inputs are RTL */
input[type="text"],
input[type="email"],
input[type="search"],
textarea {
  direction: rtl;
  text-align: right;
}

/* RTL for WordPress blocks */
.wp-block-group,
.wp-block-columns,
.wp-block-column {
  direction: rtl;
}

/* Site logo and branding RTL */
.wp-block-site-logo,
.wp-block-site-title {
  direction: rtl;
  text-align: right;
}

/* Ensure proper RTL for all content */
.entry-content,
.post-content,
.page-content {
  direction: rtl;
  text-align: right;
}

/* RTL for lists */
ul, ol {
  direction: rtl;
  text-align: right;
  padding-inline-start: 0;
  padding-inline-end: 20px;
}

li {
  text-align: right;
}

/* RTL for tables */
table {
  direction: rtl;
}

th, td {
  text-align: right;
}

/* RTL for forms */
form {
  direction: rtl;
}

label {
  text-align: right;
}

/* Footer RTL */
footer {
  direction: rtl;
  text-align: right;
}

/* Widget areas RTL */
.widget-area,
.sidebar {
  direction: rtl;
  text-align: right;
}