.post-type-archive-lawyer .page-wrapper {
  padding-bottom: 0px;
  padding-top: 0px;
}
/* Lawyer Archive Page */

#lawyers-container {
  padding: 60px 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

/* Lawyer Card */
.lawyer-card {
  background: var(--background-color);
  border-radius: var(--border-radius);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
  overflow: hidden;
  transition: var(--transition);
}

.lawyer-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

/* Image Section */
.lawyer-image {
  position: relative;
  overflow: hidden;
}

.lawyer-card .image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 100%; /* 1:1 Aspect Ratio */
}

.lawyer-card .image-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

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

.lawyer-card .image-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 2.5rem;
}

/* Content Section */

.lawyer-content {
  padding: 15px;
}
.lawyer-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-color);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.lawyer-position {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
}

/* Contact Info */
.lawyer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: #6b7280;
}

.contact-item i {
  color: var(--primary-color);
  width: 16px;
  flex-shrink: 0;
}

.contact-item a {
  color: #6b7280;
  text-decoration: none;
  transition: var(--transition);
  word-break: break-all;
}

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

/* Infinite Scroll Loading */
.lawyers-grid .infinite-scroll-loading {
  display: none;
  text-align: center;
  padding: 2rem;
  margin: 2rem 0;
}

.lawyers-grid .infinite-scroll-loading.loading {
  display: block;
}

/* Beautiful Tailwind-style Loading Spinner */
.lawyers-grid .loading-spinner {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.lawyers-grid .spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #f3f4f6;
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.lawyers-grid .loading-text {
  color: #6b7280;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.025em;
}

/* Pulse animation for loading text */
.lawyers-grid .loading-text {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Loading state styles */
.lawyers-loading .lawyer-card {
  opacity: 0.7;
  pointer-events: none;
}

/* Smooth fade in for new cards */
.lawyer-card {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease-out forwards;
}

/* Default delays for initial load */
.lawyer-card:nth-child(1) {
  animation-delay: 0s;
}
.lawyer-card:nth-child(2) {
  animation-delay: 0.1s;
}
.lawyer-card:nth-child(3) {
  animation-delay: 0.2s;
}
.lawyer-card:nth-child(4) {
  animation-delay: 0.3s;
}
.lawyer-card:nth-child(5) {
  animation-delay: 0.4s;
}
.lawyer-card:nth-child(6) {
  animation-delay: 0.5s;
}
.lawyer-card:nth-child(7) {
  animation-delay: 0.6s;
}
.lawyer-card:nth-child(8) {
  animation-delay: 0.7s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* No Lawyers Found */
.lawyers-grid .text-center {
  text-align: center;
}

.lawyers-grid .text-center h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.5rem;
}

.lawyers-grid .text-center p {
  color: #6b7280;
}

.lawyers-grid .text-center .fas {
  color: #d1d5db;
  font-size: 3.75rem;
  margin-bottom: 1rem;
}

/* Responsive Design */
@media (min-width: 768px) {
  #lawyers-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  #lawyers-container {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 767px) {
  #lawyers-container {
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .lawyer-name {
    font-size: 1rem;
  }

  #load-more-lawyers {
    padding: 0.5rem 1rem;
  }
}

/* Lawyer Header Section - CSS Grid Layout */
.lawyer-header {
  background: var(--background-color);
  border-radius: var(--border-radius);
  padding: 24px;
  margin-bottom: 40px;
  box-shadow: var(--box-shadow);
  border: 1px solid #e5e7eb;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 24px;
  align-items: start;
}

.lawyer-photo-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  position: relative;
}

.lawyer-photo-large {
  width: 100%;
  height: 100%;
  border-radius: var(--border-radius);
  object-fit: cover;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  border: 4px solid var(--background-color);
  transition: var(--transition);
  position: relative;
  z-index: 1;
}

.lawyer-photo-large:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.lawyer-placeholder-large {
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 3rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  border: 4px solid var(--background-color);
  position: relative;
  z-index: 1;
}

.lawyer-header-info {
  display: grid;
  gap: 16px;
  align-content: start;
}

.lawyer-name-large {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-color);
  margin: 0;
  line-height: 1.25;
}

.lawyer-position-large {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-color);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  background: rgba(var(--primary-color-rgb, 123, 17, 19), 0.1);
  border-radius: var(--border-radius);
  display: inline-block;
  width: fit-content;
}

/* Credentials Section */
.lawyer-credentials {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.credential-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 500;
}

.credential-item i {
  color: var(--primary-color);
  width: 16px;
  font-size: 0.875rem;
  flex-shrink: 0;
}

/* Specialties Section */
.lawyer-specialties-large h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-color);
  margin: 0 0 8px 0;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.specialties-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.specialty-tag-large {
  background: var(--primary-color);
  color: white;
  padding: 4px 8px;
  border-radius: var(--border-radius);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  transition: var(--transition);
}

.specialty-tag-large:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

/* Contact Section */
.lawyer-contact-large h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-color);
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.contact-item.email,
.contact-item.phone {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  font-size: 0.875rem;
  padding: 8px 12px;
  background: #f9fafb;
  border-radius: var(--border-radius);
  border: 1px solid #e5e7eb;
  transition: var(--transition);
}

.contact-item.email:hover,
.contact-item.phone:hover {
  color: var(--primary-color);
  border-color: var(--primary-color);
  background: var(--background-color);
}

.contact-item i {
  color: var(--primary-color);
  width: 16px;
  font-size: 0.875rem;
  flex-shrink: 0;
}

/* CTA Button */
.lawyer-cta {
  margin-top: 12px;
}

.cta-button {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  padding: 8px 16px;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.cta-button:hover {
  transform: translateY(-1px);
  opacity: 0.9;
  color: white;
}

/* Single Lawyer Content Section - CSS Grid Layout */
.single-lawyer-content {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 40px;
  margin-bottom: 40px;
}

.single-lawyer-biography h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 20px;
  position: relative;
  padding: 12px 20px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: var(--border-radius);
  border-left: 4px solid var(--primary-color);
}

.single-lawyer-biography h3::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(
    180deg,
    var(--primary-color),
    rgba(var(--primary-color-rgb, 123, 17, 19), 0.3)
  );
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.single-lawyer-biography .entry-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-color);
}

.single-lawyer-biography .entry-content p {
  margin-bottom: 20px;
}

/* Single Lawyer Sidebar Styles */
.single-lawyer-sidebar {
  display: grid;
  gap: 24px;
  align-content: start;
}

.sidebar-widget {
  background: var(--background-color);
  border-radius: var(--border-radius);
  padding: 30px;
  box-shadow: var(--box-shadow);
  border: 1px solid #e2e8f0;
}

.sidebar-widget h4 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 20px;
  text-align: center;
  position: relative;
  padding-bottom: 15px;
}

.sidebar-widget h4::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 2px;
}

/* Contact Form */
.contact-widget .contact-form {
  padding-left: 0px;
  border-left: none;
}

/* Related Lawyers */
.related-lawyer-item {
  display: flex;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid #e2e8f0;
}

.related-lawyer-item:last-child {
  border-bottom: none;
}

.related-lawyer-photo {
  flex-shrink: 0;
}

.related-lawyer-photo img {
  width: 50px;
  height: 50px;
  border-radius: var(--border-radius);
  object-fit: cover;
  transition: var(--transition);
}

.related-lawyer-photo img:hover {
  transform: scale(1.05);
}

.lawyer-placeholder-thumb {
  width: 50px;
  height: 50px;
  background: #f3f4f6;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 1.2rem;
  transition: var(--transition);
}

.lawyer-placeholder-thumb:hover {
  background: #e5e7eb;
}

.related-lawyer-info h5 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.3;
}

.related-lawyer-info h5 a {
  color: var(--text-color);
  text-decoration: none;
  transition: var(--transition);
}

.related-lawyer-info h5 a:hover {
  color: var(--primary-color);
}

.related-lawyer-info .lawyer-position {
  font-size: 0.75rem;
  color: var(--primary-color);
  font-weight: 500;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

/* Navigation */
.lw-navigation {
  background: var(--background-color);
  border-radius: var(--border-radius);
  padding: 25px;
  box-shadow: var(--box-shadow);
  margin-bottom: 40px;
  border: 1px solid #e2e8f0;
}

.lw-nav-container {
  display: flex;
  align-items: stretch;
  gap: 15px;
  min-height: 80px;
}

.lw-nav-item {
  flex: 1;
  display: flex;
}

.lw-nav-link {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 15px 20px;
  background: #f8f9fa;
  border-radius: var(--border-radius);
  text-decoration: none;
  color: var(--text-color);
  transition: var(--transition);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
  gap: 12px;
}

.lw-nav-link::before {
  content: "";
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.lw-nav-link:hover::before {
  left: 100%;
}

.lw-nav-link:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--box-shadow);
}

/* Tailwind-inspired: All nav items center-aligned for consistency */
.lw-nav-link {
  justify-content: center;
  text-align: center;
}

.lw-nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(var(--primary-color-rgb, 123, 17, 19), 0.1);
  border-radius: 50%;
  flex-shrink: 0;
  transition: var(--transition);
}

.lw-nav-icon i {
  font-size: 1.1rem;
  color: var(--primary-color);
  transition: var(--transition);
}

.lw-nav-link:hover .lw-nav-icon {
  background: rgba(255, 255, 255, 0.2);
}

.lw-nav-link:hover .lw-nav-icon i {
  color: white;
}

.lw-nav-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lw-nav-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
  opacity: 0.8;
}

.lw-nav-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}

/* Responsive Design for Single Lawyer */
@media (max-width: 1024px) {
  .lawyer-header {
    padding: 30px;
  }

  .single-lawyer-sidebar {
    padding-left: 0;
  }
}

@media (max-width: 768px) {
  .lawyer-header {
    padding: 16px;
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
  }

  .lawyer-header-info {
    text-align: center;
    justify-items: center;
  }

  .lawyer-name-large {
    font-size: 1.5rem;
  }

  .lawyer-photo-large,
  .lawyer-placeholder-large {
    width: 160px;
    height: 160px;
  }

  .specialties-list {
    justify-content: center;
  }

  .single-lawyer-content {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .lw-nav-container {
    flex-direction: column;
    gap: 12px;
    min-height: auto;
  }

  .lw-nav-item {
    width: 100%;
  }

  .lawyer-contact-large {
    width: 100%;
  }

  .contact-items {
    width: 100%;
  }

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

@media (max-width: 480px) {
  .lawyer-header {
    margin-bottom: 20px;
    gap: 16px;
  }

  .lawyer-name-large {
    font-size: 1.25rem;
  }

  .lawyer-position-large {
    font-size: 0.75rem;
    padding: 3px 8px;
  }

  .lawyer-photo-large,
  .lawyer-placeholder-large {
    width: 140px;
    height: 140px;
  }

  .single-lawyer-content {
    gap: 20px;
  }

  .contact-items {
    width: 100%;
  }

  .contact-item.email,
  .contact-item.phone {
    width: 100%;
    box-sizing: border-box;
  }

  .single-lawyer-biography h3 {
    font-size: 1.25rem;
    padding: 10px 16px;
  }

  .sidebar-widget {
    padding: 16px;
  }

  .lw-navigation {
    padding: 12px;
  }

  .lw-nav-link {
    padding: 10px 12px;
    gap: 8px;
  }

  .lw-nav-icon {
    width: 32px;
    height: 32px;
  }

  .lw-nav-label {
    font-size: 0.7rem;
  }

  .lw-nav-title {
    font-size: 0.8rem;
  }
}
