/*
 * Additive styles for OPTIONAL project images & widgets.
 * These classes do not exist in the original markup, so this file changes
 * nothing about the existing design — elements only appear when you add a
 * project image or widget from the admin page. Kept separate from styles.css
 * on purpose.
 */

/* Project banner image (sits at the top of a project card) */
.project-card .project-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.light-mode .project-card .project-image {
  border-bottom: 1px solid rgba(79, 70, 229, 0.1);
}

.project-card .project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s var(--animation-timing, ease);
}

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

/* Small clickable widgets shown before the tech tags */
.project-widgets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 0.5rem;
}

.project-widget {
  width: 56px;
  height: 56px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--accent-color, rgba(79, 70, 229, 0.1));
  border-radius: 10px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s var(--animation-timing, ease);
  text-decoration: none;
}

.light-mode .project-widget {
  border: 1px solid rgba(79, 70, 229, 0.15);
}

.project-widget img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-widget:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(79, 70, 229, 0.25);
  border-color: var(--primary-color, #4f46e5);
}

/* Text/link variant — mirrors the look of the existing tech tags */
.project-widget--text {
  width: auto;
  height: auto;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  color: var(--primary-color, #4f46e5);
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .project-card .project-image {
    height: 170px;
  }
}

/* ---- Resume / CV section ---- */
.cv-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
}

.cv-card {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 2rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s var(--animation-timing, ease);
}

.cv-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(79, 70, 229, 0.15);
}

.light-mode .cv-card {
  border: 1px solid rgba(79, 70, 229, 0.1);
}

.cv-icon {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #64ffda, #4f46e5);
  border-radius: 50%;
  font-size: 1.6rem;
  color: #fff;
}

.cv-info h3 {
  margin-bottom: 0.4rem;
}

.cv-info p {
  margin-bottom: 1rem;
  opacity: 0.9;
}

.cv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.cv-actions .btn {
  margin: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
}

.cv-actions .btn i {
  margin-left: 0.45rem;
}

@media (max-width: 600px) {
  .cv-card {
    flex-direction: column;
    text-align: center;
  }
  .cv-actions {
    justify-content: center;
  }
}

/* ===== EN / AR language support ===== */

/* Arabic webfont (only matters when Arabic is active) */
html.lang-ar body {
  font-family: 'Tajawal', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Language toggle button — mirrors the theme-toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--card-bg);
  color: var(--text-color);
  border: none;
  cursor: pointer;
  margin-left: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.lang-toggle:hover {
  transform: scale(1.1);
}

/* ---- RTL tweaks (only when dir=rtl) ---- */
html[dir='rtl'] .static-text {
  margin-right: 0;
  margin-left: 0.5rem;
}
html[dir='rtl'] .dynamic-text {
  border-right: none;
  border-left: 3px solid #64ffda;
  padding-right: 0;
  padding-left: 5px;
}
html.light-mode[dir='rtl'] .dynamic-text {
  border-left-color: #4f46e5;
}
html[dir='rtl'] .timeline-details li {
  padding-left: 0;
  padding-right: 1.5rem;
}
html[dir='rtl'] .timeline-details li::before {
  left: auto;
  right: 0;
}
html[dir='rtl'] .theme-toggle,
html[dir='rtl'] .lang-toggle {
  margin-left: 0;
  margin-right: 10px;
}

@media (max-width: 768px) {
  html[dir='rtl'] .theme-toggle {
    margin-right: 0;
    margin-left: 50px;
  }
  html[dir='rtl'] .nav-links {
    right: auto;
    left: 20px;
    align-items: flex-start;
  }
  html[dir='rtl'] .nav-links li {
    text-align: right;
  }
}
