/**
 * Styles for Single Project Template
 */

/* Hero Section */
.hero {
  position: relative;
  background-color: #f0f9ff;
  overflow: hidden;
}

.hero-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.shape {
  position: absolute;
  border-radius: 50%;
}

.shape-1 {
  top: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  background: rgba(76, 175, 80, 0.1);
}

.shape-2 {
  bottom: -50px;
  left: -50px;
  width: 200px;
  height: 200px;
  background: rgba(76, 175, 80, 0.1);
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-text {
  margin-bottom: 2rem;
  text-align: center;
}

.badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  background-color: #4caf50;
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: 30px;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 10px rgba(76, 175, 80, 0.25);
  letter-spacing: 0.02em;
}

.hero-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 1rem;
  text-align: center;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.project-status-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: #f0f0f0;
  color: #666;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 30px;
  margin-top: 1rem;
}

.hero-bottom {
  position: absolute;
  bottom: -2px;
  /* compensează gap-ul sub-pixel al SVG pe mobile */
  left: 0;
  width: 100%;
  line-height: 0;
  font-size: 0;
}

.hero-bottom svg {
  display: block;
  width: 100%;
}

/* Project Content Section */
.section {
  padding: 3rem 0 5rem;
  background-color: #f9fafb;
}

/* Imagine full-width cu border-radius */
.project-single-image {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.project-single-image img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 520px;
  object-fit: cover;
}

/* ══════════════════════════════
   BARA META — design card chips
══════════════════════════════ */
.project-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0;
  background: #fff;
  border-radius: 16px;
  margin: 1.5rem 0;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.meta-bar-group {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1rem 1.5rem;
  gap: 0.3rem;
  flex: 1;
  min-width: 0;
}

.meta-bar-group+.meta-bar-group {
  border-left: 1px solid #f0f0f0;
}

/* Categorii — mai lat */
.meta-bar-categories {
  flex: 2;
  padding: 0.85rem 1.4rem;
}

.meta-bar-icon {
  display: none;
  /* ascuns — design e mai curat fără icon */
}

/* Blocul cu label + valoare */
.meta-bar-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.meta-bar-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ca3af;
  margin-bottom: 0.25rem;
}

.meta-bar-value {
  font-size: 0.88rem;
  font-weight: 600;
  color: #111827;
}

/* Categorii: tag-uri pill */
.meta-bar-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* Status badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #dcfce7;
  color: #15803d;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.2rem 0.7rem;
  border-radius: 20px;
  border: 1px solid #86efac;
}

.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #16a34a;
  display: inline-block;
  flex-shrink: 0;
}

/* Share group */
.meta-bar-share-group {
  margin-left: auto;
  background: #f9fafb;
}

.meta-bar-share-group .meta-bar-info {
  gap: 0.25rem;
}

.meta-bar-share-group .share-buttons {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.1rem;
}

/* Conținut full-width */
.project-single-text {
  background: white;
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  font-size: 1.1rem;
  line-height: 1.8;
}

.project-single-text h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #333;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.project-single-text h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.project-single-text h4 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #444;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.project-single-text p,
.sp-description p {
  margin-bottom: 1.5rem;
}

.project-single-text ul,
.project-single-text ol,
.sp-description ul,
.sp-description ol {
  margin-bottom: 1.5rem;
  padding-left: 1.75rem;
}

.project-single-text ul,
.sp-description ul {
  list-style: disc !important;
  /* suprascrie reset-ul global */
}

.project-single-text ol,
.sp-description ol {
  list-style: decimal !important;
}

.project-single-text ul ul,
.sp-description ul ul {
  list-style: circle !important;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.project-single-text li,
.sp-description li {
  margin-bottom: 0.6rem;
  line-height: 1.7;
}

.project-single-link {
  margin-top: 2rem;
}

.project-single-link .btn {
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 30px;
  transition: all 0.3s;
  box-shadow: 0 5px 15px rgba(76, 175, 80, 0.2);
}

.project-single-link .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(76, 175, 80, 0.3);
}

.project-single-sidebar {
  width: 350px;
  margin-top: -6rem;
  /* trage sidebar-ul în sus peste valul hero pe desktop */
  position: sticky;
  top: 120px;
  /* rămâne vizibil la scroll */
  z-index: 10;
}

.project-single-meta,
.project-single-share {
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.project-single-meta h3,
.project-single-share h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #eee;
}

.meta-item {
  display: flex;
  margin-bottom: 1rem;
  align-items: flex-start;
}

.meta-label {
  width: 100px;
  font-weight: 600;
  color: #666;
  flex-shrink: 0;
  padding-top: 0.2rem;
}

.meta-value {
  flex: 1;
  color: #333;
}

/* Badge-uri categorii în sidebar */
.meta-categories-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.meta-category-badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  font-size: 0.82rem;
  line-height: 1.4;
  white-space: nowrap;
}

.share-buttons {
  display: flex;
  gap: 0.75rem;
}

.share-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: white;
  font-size: 1rem;
  transition: all 0.3s;
}

.share-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.share-button.facebook {
  background-color: #3b5998;
}

.share-button.twitter {
  background-color: #1da1f2;
}

.share-button.linkedin {
  background-color: #0077b5;
}

.share-button.email {
  background-color: #ea4335;
}

/* Related Projects Section */
.section-related-projects {
  background-color: white;
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  color: #333;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
}

.section-title:after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: #4caf50;
}

.related-projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.related-project-card {
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.related-project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.related-project-image {
  position: relative;
  overflow: hidden;
}

.related-project-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.5s;
}

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

.related-project-content {
  padding: 1.5rem;
}

.related-project-category {
  font-size: 0.875rem;
  color: #666;
  margin-bottom: 0.75rem;
}

.related-project-category i {
  color: #4caf50;
  margin-right: 0.5rem;
}

.related-project-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.related-project-title a {
  color: #333;
  text-decoration: none;
  transition: color 0.3s;
}

.related-project-title a:hover {
  color: #4caf50;
}

.related-project-link {
  display: inline-flex;
  align-items: center;
  color: #4caf50;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s;
}

.related-project-link:after {
  content: "\f061";
  font-family: "Font Awesome 5 Free";
  margin-left: 0.5rem;
  font-size: 0.875rem;
  transition: transform 0.3s;
}

.related-project-link:hover {
  color: #388e3c;
}

.related-project-link:hover:after {
  transform: translateX(3px);
}

.no-related-projects {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2rem;
  background-color: #f9fafb;
  border-radius: 12px;
  color: #666;
}

/* CTA Section */
.cta-section {
  background-color: #4caf50;
  color: white;
  padding: 5rem 0;
}

.cta-section h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
}

.cta-section p {
  font-size: 1.25rem;
  max-width: 800px;
  margin: 0 auto 2rem;
  opacity: 0.9;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.cta-button-primary,
.cta-button-secondary {
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: 30px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s;
}

.cta-button-primary {
  background-color: white;
  color: #4caf50;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.cta-button-primary:hover {
  background-color: #f9f9f9;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.cta-button-secondary {
  background-color: transparent;
  color: white;
  border: 2px solid white;
}

.cta-button-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-3px);
}

/* Responsive */
@media (max-width: 991px) {
  .project-single-container {
    flex-direction: column;
  }

  .project-single-sidebar {
    width: 100%;
  }

  .related-projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-single-text h2 {
    font-size: 1.5rem;
  }

  .project-single-text h3 {
    font-size: 1.3rem;
  }
}

@media (max-width: 767px) {

  /* ── Hero ── */
  .hero {
    padding: 2rem 0 3rem !important;
    /* Adjusted for body padding-top */
  }

  .hero-title {
    font-size: 1.75rem;
    line-height: 1.3;
  }

  /* ── Secțiunea principală ── */
  .section {
    padding: 1.5rem 0;
  }

  /* ── Conținut text ── */
  .project-single-text {
    padding: 1.25rem;
    font-size: 0.975rem;
    line-height: 1.75;
  }

  .project-single-text p {
    margin-bottom: 1.25rem;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  /* ── Headere ── */
  .project-single-text h2 {
    font-size: 1.35rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
  }

  .project-single-text h3 {
    font-size: 1.15rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
  }

  .project-single-text h4 {
    font-size: 1rem;
    margin-top: 1.25rem;
  }

  /* ── Liste ── */
  .project-single-text ul,
  .project-single-text ol,
  .sp-description ul,
  .sp-description ol {
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
  }

  .project-single-text li,
  .sp-description li {
    margin-bottom: 0.75rem;
    line-height: 1.65;
  }

  .project-single-text li strong,
  .sp-description li strong {
    display: inline;
    color: #222;
  }

  /* ── Gallery WordPress: 2 col în loc de 4 ── */
  .gallery-columns-4 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
  }

  .gallery.gallery-columns-4 .gallery-item {
    width: 50% !important;
    float: left;
  }

  /* ── Sidebar ── */
  .project-single-sidebar {
    width: 100%;
    margin-top: 1rem;
  }

  .project-single-meta,
  .project-single-share {
    padding: 1.25rem;
  }

  .meta-item {
    flex-direction: column;
    gap: 0.25rem;
  }

  .meta-label {
    width: auto;
    font-size: 0.85rem;
  }

  /* ── Related projects ── */
  .related-projects-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  /* ── Meta bar pe mobile: wrap 2-per-row ── */
  .project-meta-bar {
    flex-wrap: wrap;
    border-radius: 12px;
  }

  .meta-bar-group {
    flex: 1 1 45%;
    min-width: 120px;
    border-left: none !important;
    border-top: 1px solid #f0f0f0;
  }

  .meta-bar-categories {
    flex: 1 1 100%;
    border-top: none;
  }

  .meta-bar-share-group {
    flex: 1 1 100%;
    margin-left: 0;
  }

  /* ── CTA ── */
  .cta-section {
    padding: 3rem 0;
  }

  .cta-section h2 {
    font-size: 1.75rem;
  }

  .cta-section p {
    font-size: 1rem;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .cta-button-primary,
  .cta-button-secondary {
    width: 100%;
    text-align: center;
  }
}

/* =============================================
   SHARE BUTTONS — sp-share-* (overrides)
   ============================================= */
.sp-share-buttons {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.sp-share-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 40px !important;
  height: 40px !important;
  border-radius: 10px !important;
  font-size: 1rem !important;
  color: #fff !important;
  text-decoration: none;
  transition: transform 0.2s, opacity 0.2s;
  border: none !important;
}

.sp-share-btn:hover {
  opacity: 0.88;
  transform: translateY(-2px);
  color: #fff !important;
}

.sp-share-fb {
  background: #1877f2 !important;
}

.sp-share-tw {
  background: #1da1f2 !important;
}

.sp-share-li {
  background: #0a66c2 !important;
}

.sp-share-em {
  background: #64748b !important;
}

/* =============================================
   RELATED PROJECTS GRID — sj-related-* (overrides)
   ============================================= */
.sj-related-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.sj-related-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.07);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}

.sj-related-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.12);
}

.sj-related-card__image {
  position: relative;
  height: 185px;
  overflow: hidden;
}

.sj-related-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}

.sj-related-card:hover .sj-related-card__image img {
  transform: scale(1.04);
}

.sj-related-card__placeholder {
  height: 185px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.sj-related-card__badge {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.85rem;
}

.sj-related-card__body {
  padding: 1rem 1.2rem 1.2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.sj-related-card__cat {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.sj-related-card__title {
  font-size: 0.975rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.6rem;
  line-height: 1.4;
  flex: 1;
}

.sj-related-card__title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.sj-related-card__title a:hover {
  color: #2563eb;
}

/* ── Responsive related grid ── */
@media (max-width: 900px) {
  .sj-related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .sj-related-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .sp-share-btn {
    width: 46px !important;
    height: 46px !important;
    font-size: 1.1rem !important;
  }
}

/* Pe mobile: sidebar SUB conținut */
@media (max-width: 768px) {
  .sp-main {
    order: 1;
  }

  .sp-sidebar {
    order: 2;
    position: static;
  }
}