/*
Theme Name: RyanCV - Resume & Portfolio Theme
Theme URI: https://example.com/ryancv
Author: Creative Tech
Author URI: https://example.com
Description: قالب ووردبريس احترافي متكامل للسيرة الذاتية وبورتفوليو الأعمال (CV/Resume & Portfolio)، متوافق تماماً مع Elementor و ACF Pro و WooCommerce، يدعم الوضعين الداكن والفاتح، والاتجاهين RTL و LTR.
Version: 1.0.0
Tested up to: 6.7
Requires at least: 5.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ryancv
Tags: portfolio, resume, cv, one-page, grid-layout, rtl-language-support, custom-colors, e-commerce, dark-mode, translation-ready
*/

/* Reset & Root Variables */
:root {
  --primary-color: #27ae60;
  --primary-hover: #219653;
  --accent-color: #f39c12;
  --bg-color: #f4f5f7;
  --card-bg: #ffffff;
  --text-main: #323232;
  --text-muted: #787878;
  --border-color: #e5e7eb;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-width: 320px;
  --font-arabic: 'Cairo', 'Tajawal', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-latin: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

[data-theme="dark"] {
  --bg-color: #121316;
  --card-bg: #1c1d22;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --border-color: #2a2c34;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}

/* Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-latin);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.65;
  font-size: 15px;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh;
}

body.rtl {
  direction: rtl;
  text-align: right;
  font-family: var(--font-arabic);
}

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

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

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

ul, ol {
  list-style: none;
}

/* Container & Layout */
.ryancv-layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 20px;
  gap: 30px;
  z-index: 2;
}

/* Background Particles Container */
#particles-js {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* Sidebar / vCard */
.ryancv-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
}

.vcard-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  position: sticky;
  top: 40px;
  text-align: center;
  transition: var(--transition);
}

.vcard-header {
  position: relative;
  background: linear-gradient(135deg, rgba(39, 174, 96, 0.15) 0%, rgba(243, 156, 18, 0.15) 100%);
  padding: 40px 20px 20px;
}

.vcard-avatar {
  width: 140px;
  height: 140px;
  margin: 0 auto 15px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--card-bg);
  box-shadow: var(--shadow-md);
  position: relative;
}

.vcard-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vcard-name {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-main);
}

.vcard-typed-title {
  color: var(--primary-color);
  font-size: 14px;
  font-weight: 600;
  min-height: 22px;
  display: block;
}

.vcard-social {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
}

.vcard-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
  transition: var(--transition);
}

.vcard-social a:hover {
  background: var(--primary-color);
  color: #ffffff;
  transform: translateY(-2px);
}

.vcard-details {
  padding: 20px;
  text-align: left;
}

body.rtl .vcard-details {
  text-align: right;
}

.vcard-detail-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border-color);
  font-size: 13px;
}

.vcard-detail-item:last-child {
  border-bottom: none;
}

.vcard-detail-label {
  color: var(--text-muted);
  font-weight: 500;
}

.vcard-detail-val {
  color: var(--text-main);
  font-weight: 600;
}

.vcard-actions {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-align: center;
}

.btn-primary {
  background-color: var(--primary-color);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(39, 174, 96, 0.35);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* Main Content Area */
.ryancv-main {
  flex: 1;
  min-width: 0;
}

/* Header Navbar */
.ryancv-navbar {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 10px 20px;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 40px;
  z-index: 10;
}

.nav-links {
  display: flex;
  gap: 18px;
  align-items: center;
}

.nav-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
  background: rgba(39, 174, 96, 0.08);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle-btn, .lang-toggle-btn {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-main);
  transition: var(--transition);
  font-size: 15px;
}

.theme-toggle-btn:hover, .lang-toggle-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: rotate(15deg);
}

/* Section Cards */
.ryancv-section {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 35px 35px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-md);
  scroll-margin-top: 110px;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 25px;
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
  color: var(--text-main);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 2px;
}

body.rtl .section-title::after {
  left: auto;
  right: 0;
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.service-card {
  padding: 24px;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

.service-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: rgba(39, 174, 96, 0.12);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}

.service-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.service-desc {
  font-size: 13.5px;
  color: var(--text-muted);
}

.service-price {
  margin-top: 12px;
  font-weight: 700;
  color: var(--primary-color);
  font-size: 14px;
}

/* Pricing Grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 25px;
}

.pricing-card {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 30px 20px;
  text-align: center;
  position: relative;
  transition: var(--transition);
}

.pricing-card.featured {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-color);
  color: #fff;
  font-size: 11px;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
}

.pricing-amount {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-main);
  margin: 15px 0;
}

.pricing-amount span {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

.pricing-features {
  margin: 20px 0;
  text-align: left;
}

body.rtl .pricing-features {
  text-align: right;
}

.pricing-features li {
  padding: 6px 0;
  font-size: 13.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pricing-features li i {
  color: var(--primary-color);
}

/* Timeline / Resume */
.timeline-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

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

.timeline-column-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-color);
}

.timeline-item {
  position: relative;
  padding-left: 24px;
  padding-bottom: 24px;
  border-left: 2px solid var(--border-color);
}

body.rtl .timeline-item {
  padding-left: 0;
  padding-right: 24px;
  border-left: none;
  border-right: 2px solid var(--border-color);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 2px solid var(--primary-color);
}

body.rtl .timeline-item::before {
  left: auto;
  right: -6px;
}

.timeline-date {
  display: inline-block;
  padding: 2px 10px;
  background: rgba(39, 174, 96, 0.1);
  color: var(--primary-color);
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
  margin-bottom: 6px;
}

.timeline-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.timeline-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.timeline-desc {
  font-size: 13px;
  color: var(--text-muted);
}

/* Skills */
.skills-group {
  margin-bottom: 25px;
}

.skills-group-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 15px;
}

.progress-skill {
  margin-bottom: 15px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: var(--bg-color);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), #2ecc71);
  border-radius: 4px;
  transition: width 1s ease-in-out;
}

/* Dotted / Circles Skills */
.dotted-skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 15px;
}

.dotted-skill-card {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}

.dotted-skill-name {
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 8px;
}

.dots-wrapper {
  display: flex;
  justify-content: center;
  gap: 4px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-color);
}

.dot.active {
  background: var(--primary-color);
}

/* Portfolio Grid & Filters */
.portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.filter-btn {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.portfolio-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  position: relative;
  group: hover;
  cursor: pointer;
}

.portfolio-thumb {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.portfolio-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.portfolio-item:hover .portfolio-thumb img {
  transform: scale(1.08);
}

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: rgba(18, 19, 22, 0.75);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 15px;
  opacity: 0;
  transition: var(--transition);
  color: #ffffff;
  text-align: center;
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-item-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.portfolio-item-category {
  font-size: 12px;
  color: var(--primary-color);
  text-transform: uppercase;
  font-weight: 600;
}

/* Testimonials */
.testimonials-slider {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.testimonial-card {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  position: relative;
}

.testimonial-stars {
  color: var(--accent-color);
  font-size: 13px;
  margin-bottom: 12px;
}

.testimonial-text {
  font-style: italic;
  font-size: 13.5px;
  color: var(--text-main);
  margin-bottom: 16px;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
}

.testimonial-name {
  font-size: 14px;
  font-weight: 700;
}

.testimonial-role {
  font-size: 12px;
  color: var(--text-muted);
}

/* Blog Posts */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

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

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

.blog-thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
}

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

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

.blog-content {
  padding: 18px;
}

.blog-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  gap: 12px;
}

.blog-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.4;
}

.blog-excerpt {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* Contact & Info */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

@media (max-width: 768px) {
  .contact-container {
    grid-template-columns: 1fr;
  }
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 25px;
}

.contact-info-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.contact-info-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(39, 174, 96, 0.1);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.form-group {
  margin-bottom: 15px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-color);
  color: var(--text-main);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.15);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.map-container {
  margin-top: 25px;
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 220px;
  border: 1px solid var(--border-color);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Modal Popup for Portfolio */
.ryancv-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.ryancv-modal.active {
  display: flex;
}

.modal-content {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  max-width: 750px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 30px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-main);
  font-size: 16px;
  transition: var(--transition);
}

body.rtl .modal-close {
  right: auto;
  left: 15px;
}

.modal-close:hover {
  background: #e74c3c;
  color: #fff;
  border-color: #e74c3c;
}

.modal-media {
  margin-bottom: 20px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.modal-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  padding: 15px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin: 15px 0;
  font-size: 13.5px;
}

/* Responsive Media Queries */
@media (max-width: 992px) {
  .ryancv-layout {
    flex-direction: column;
    padding: 20px 15px;
  }
  
  .ryancv-sidebar {
    width: 100%;
  }

  .vcard-card {
    position: static;
  }

  .ryancv-navbar {
    top: 10px;
  }

  .nav-links {
    overflow-x: auto;
    padding-bottom: 5px;
    white-space: nowrap;
  }
}
