/* ======================== Writers Profiles Section ======================== */
.writers-profiles-section {
  padding: 60px 0;
  background: white;
}

.writers-profiles-container {
  max-width: var(--container-width, 1280px);
  width: 90%;
  margin: 0 auto;
}

/* ======================== Writers Grid ======================== */
.writers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}


/* ========================================
   ULTRA MODERN WRITER PROFILE CARD
   ======================================== */

.writer-profile-card {
  background: white;
  padding: 0;
  border-radius: var(--radius-lg);

  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  
  /* Sophisticated shadow */
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.04),
    0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Gradient accent bar */
.writer-profile-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), #ffc700);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
  z-index: 10;
}

.writer-profile-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-8px);
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.08),
    0 16px 48px rgba(5, 108, 202, 0.12);
}

.writer-profile-card:hover::before {
  transform: scaleX(1);
}

/* === HEADER SECTION === */
.writer-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.75rem 1.5rem 1.25rem;
  background: linear-gradient(180deg, var(--border-color) 0%, white 100%);
  position: relative;
}


.writer-profile-card:hover .writer-card-header::after {
  opacity: 1;
}

.writer-avatar-profile {
  width: 75px;
  height: 75px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid white;
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.1),
    0 8px 24px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  z-index: 1;
  background: var(--primary-color);
}

.writer-profile-card:hover .writer-avatar-profile {
  transform: scale(1.08) rotate(-3deg);
  box-shadow: 
    0 6px 20px rgba(0, 0, 0, 0.15),
    0 12px 32px rgba(5, 108, 202, 0.2);
}

.writer-header-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 0;
}

.writer-name-profile {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-color);
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.3;
  
  /* Truncate long names */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.writer-degree-profile {
  font-size: var(--font-p-body);
  color: var(--text-color-light2);
  font-weight: 500;
  margin: 0;
  line-height: 1.4;
  
  /* Limit to 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* === CARD BODY === */
.writer-profile-card > div:not(.writer-card-header):not(.writer-card-action) {
  padding: 0 1.5rem;
}

/* === SKILLS SECTION === */
.writer-skills-section {
  margin: 0 0 1rem;
  padding-bottom: 1rem;
 
}

.writer-skills-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.625rem;
  display: block;
}

.writer-skills-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.875rem;
  background: var(--text-color);
  color: white;
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.skill-pill:hover {
  background: var(--primary-color);
  color: var(--text-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(5, 108, 202, 0.25);
}

/* === HELPS WITH SECTION === */
.writer-helpswith-section {
  margin: 1rem 0 1rem;
  padding-bottom: 1rem;
}

.writer-helpswith-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.625rem;
  display: block;
}

.writer-helpswith-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.helpswith-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.875rem;
  background: var(--accent-color);
  color: var(--text-color);
  border: 1.5px solid var(--border-color);
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.3s ease;
  cursor: pointer;
}

.helpswith-pill:hover {
  background: var(--accent-color-hover);
  border-color: var(--border-color-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 199, 0, 0.25);
}

/* === ABOUT SECTION === */
.writer-card-about {
  margin: 1rem 0 0;
  padding: 0;
  border-top: none;
  flex: 1;
}

.writer-about-text {
  font-size: 0.875rem;
  color: var(--text-color-light2);
  line-height: 1.7;
  margin: 0;
  
  /* Limit to 4 lines with fade effect */
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  position: relative;
}


/* === CTA BUTTON === */
.writer-card-action {
  padding: 1.5rem;
  margin-top: auto;
}

.writer-card-action .cta-button {
  width: 100%;
  background: var(--text-color);
  color: white;
  border: none;
  border-radius: 0.75rem;
  padding: 0.875rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}

/* Button shine effect */
.writer-card-action .cta-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.writer-card-action .cta-button:hover::before {
  left: 100%;
}

.writer-card-action .cta-button:hover {
  background: var(--accent-color2);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.writer-card-action .cta-button:active {
  transform: translateY(-1px);
}

.cta-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.writer-card-action .cta-button:hover .cta-btn-icon {
  transform: scale(1.1) rotate(5deg);
}

.cta-btn-icon svg {
  width: 18px;
  height: 18px;
}

/* === VERIFIED BADGE (BONUS) === */
.writer-verified-badge {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: var(--accent-color2);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  z-index: 2;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
  .writer-card-header {
    padding: 1.5rem 1.25rem 1rem;
  }

  .writer-avatar-profile {
    width: 65px;
    height: 65px;
    border-width: 2.5px;
  }

  .writer-name-profile {
    font-size: 1.0625rem;
  }

  .writer-degree-profile {
    font-size: 0.8rem;
  }

  .writer-skills-section,
  .writer-helpswith-section,
  .writer-card-about {
    margin-left: 1.25rem;
    margin-right: 1.25rem;
  }

  .writer-card-action {
    padding: 1.25rem;
  }

  .writer-card-action .cta-button {
    padding: 0.8125rem 1.125rem;
    font-size: 0.875rem;
  }
}

@media (max-width: 480px) {
  .writer-profile-card {
    border-radius: 1rem;
  }

  .writer-card-header {
    padding: 1.25rem 1rem 0.875rem;
  }

  .writer-avatar-profile {
    width: 60px;
    height: 60px;
    border-width: 2px;
  }

  .writer-name-profile {
    font-size: 1rem;
  }

  .writer-degree-profile {
    font-size: 0.75rem;
  }

  .writer-skills-section,
  .writer-helpswith-section {
    margin: 1rem 1rem 0;
    padding-bottom: 0.875rem;
  }

  .writer-card-about {
    margin: 0.875rem 1rem 0;
  }

  .writer-skills-label,
  .writer-helpswith-label {
    font-size: 0.6875rem;
    margin-bottom: 0.5rem;
  }

  .writer-skills-pills,
  .writer-helpswith-pills {
    gap: 0.4rem;
  }

  .skill-pill,
  .helpswith-pill {
    font-size: 0.6875rem;
    padding: 0.35rem 0.75rem;
  }

  .writer-about-text {
    font-size: 0.8125rem;
    -webkit-line-clamp: 3;
  }

  .writer-card-action {
    padding: 1rem;
  }

  .writer-card-action .cta-button {
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    border-radius: 0.625rem;
  }

  .cta-btn-icon svg {
    width: 16px;
    height: 16px;
  }

  /* Simplify hover effects on mobile */
  .writer-profile-card:hover {
    transform: translateY(-4px);
  }

  .writer-profile-card:hover .writer-avatar-profile {
    transform: scale(1.05);
  }
}

/* ========================================
   ACCESSIBILITY & PERFORMANCE
   ======================================== */

/* Focus states */
.writer-profile-card:focus-within {
  outline: 3px solid var(--accent-color2);
  outline-offset: 3px;
}

.writer-card-action .cta-button:focus {
  outline: 3px solid var(--accent-color2);
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .writer-profile-card,
  .writer-profile-card::before,
  .writer-avatar-profile,
  .skill-pill,
  .helpswith-pill,
  .writer-card-action .cta-button,
  .cta-btn-icon {
    transition: none;
  }

  .writer-profile-card:hover,
  .writer-profile-card:hover .writer-avatar-profile,
  .writer-card-action .cta-button:hover {
    transform: none;
  }

  .writer-card-action .cta-button::before {
    display: none;
  }
}

/* Print optimization */
@media print {
  .writer-profile-card {
    break-inside: avoid;
    page-break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }

  .writer-profile-card::before,
  .writer-card-header::after,
  .writer-card-action .cta-button::before {
    display: none;
  }

  .writer-card-action .cta-button {
    background: #333;
    box-shadow: none;
  }
}

/* ======================== Responsive Design ======================== */
@media (max-width: 768px) {
  .writers-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .writers-profiles-section {
    padding: 40px 0;
  }

}