/* Practice Areas Section */
.practice-areas {
  position: relative;
  background: var(--bg-secondary);
}

.practice-areas::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-medium), transparent);
}

.practice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
}

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

/* Practice Card - Large */
.practice-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  transition: all var(--transition-slower);
}

.practice-card:hover {
  border-color: var(--border-gold);
  box-shadow: var(--shadow-2xl);
  transform: translateY(-8px);
}

.practice-card.accounting:hover {
  border-color: var(--navy-400);
  box-shadow: 0 25px 50px -12px rgb(2 29 76 / 0.25);
}

.practice-card.legal:hover {
  border-color: var(--gold-400);
  box-shadow: 0 25px 50px -12px rgb(234 192 107 / 0.4);
}

.practice-card-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 480px;
}

@media (max-width: 768px) {
  .practice-card-inner {
    grid-template-columns: 1fr;
    min-height: auto;
  }
}

/* Practice Visual Side */
.practice-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
  overflow: hidden;
}

.practice-card.accounting .practice-visual {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
}

.practice-card.legal .practice-visual {
  background: linear-gradient(135deg, var(--gold-600), var(--gold-500));
}

.practice-visual-bg {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M40 0h40v40H40V0zm0 40h40v40H40V40zm40-40h40v40H80V0z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.3;
}

.practice-visual-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 300px;
  text-align: center;
}

.practice-icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin-bottom: var(--space-6);
  transition: all var(--transition-slower);
}

.practice-card:hover .practice-icon-wrapper {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.practice-icon-wrapper .icon {
  width: 56px;
  height: 56px;
  color: var(--white);
}

.practice-visual-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--white);
  margin-bottom: var(--space-3);
}

.practice-visual-desc {
  font-size: var(--text-base);
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.7;
}

/* Floating elements in visual */
.practice-float-elements {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.float-element {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  font-size: var(--text-xl);
  color: var(--white);
  animation: floatElement 8s ease-in-out infinite;
}

.practice-card.accounting .float-element {
  border-color: rgba(234, 192, 107, 0.3);
}

.practice-card.legal .float-element {
  border-color: rgba(255, 255, 255, 0.3);
}

@keyframes floatElement {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-15px) rotate(3deg); }
  50% { transform: translateY(0) rotate(0deg); }
  75% { transform: translateY(10px) rotate(-2deg); }
}

@media (prefers-reduced-motion: reduce) {
  .float-element {
    animation: none;
  }
}

.float-element:nth-child(1) { top: 10%; right: 8%; animation-delay: 0s; }
.float-element:nth-child(2) { top: 30%; left: 5%; animation-delay: 1s; width: 50px; height: 50px; font-size: var(--text-lg); }
.float-element:nth-child(3) { bottom: 20%; right: 10%; animation-delay: 2s; }
.float-element:nth-child(4) { bottom: 10%; left: 15%; animation-delay: 3s; width: 45px; height: 45px; font-size: var(--text-base); }
.float-element:nth-child(5) { top: 50%; left: 50%; transform: translate(-50%, -50%); animation-delay: 4s; width: 40px; height: 40px; font-size: var(--text-base); }

/* Practice Content Side */
.practice-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-10) var(--space-8);
}

@media (max-width: 768px) {
  .practice-content {
    padding: var(--space-8) var(--space-6);
  }
}

.practice-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  width: fit-content;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
}

.practice-card.accounting .practice-tag {
  background: var(--navy-100);
  color: var(--navy-800);
}

.practice-card.legal .practice-tag {
  background: var(--gold-100);
  color: var(--gold-700);
}

.practice-content-title {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: var(--space-4);
  line-height: 1.25;
}

.practice-content-desc {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: var(--space-6);
}

.practice-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.practice-feature {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
}

.practice-feature:hover {
  background: var(--gray-100);
  transform: translateX(-4px);
}

.practice-feature-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--white);
  border: 1px solid var(--border-light);
  color: var(--text-tertiary);
  transition: all var(--transition-base);
}

.practice-card.accounting .practice-feature:hover .practice-feature-icon {
  background: var(--navy-900);
  border-color: var(--navy-900);
  color: var(--white);
}

.practice-card.legal .practice-feature:hover .practice-feature-icon {
  background: var(--gold-500);
  border-color: var(--gold-500);
  color: var(--navy-900);
}

.practice-feature-text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}

.practice-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  width: fit-content;
  padding: 4px 0 6px;
  font-weight: 800;
  font-size: var(--text-base);
  font-family: var(--font-display);
  position: relative;
  transition: color var(--transition-base);
}

.practice-card.accounting .practice-cta,
.practice-card.legal .practice-cta {
  background: transparent;
  color: var(--navy-900);
}

.practice-cta::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 2px;
  background: var(--gold-500);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.practice-card.accounting .practice-cta:hover,
.practice-card.legal .practice-cta:hover {
  background: transparent;
  color: var(--gold-600);
  transform: none;
  box-shadow: none;
}

.practice-cta:hover::after {
  transform: scaleX(1);
}

.practice-cta .icon {
  display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .practice-visual {
    min-height: 280px;
  }
  .practice-icon-wrapper {
    width: 100px;
    height: 100px;
  }
  .practice-icon-wrapper .icon {
    width: 48px;
    height: 48px;
  }
  .practice-content-title {
    font-size: var(--text-2xl);
  }
}

/* Practice visual with real photography */
.practice-visual.has-photo {
  padding: 0;
  min-height: 100%;
}
.practice-visual.has-photo .practice-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.practice-visual.has-photo .practice-visual-bg {
  background: linear-gradient(to top, rgba(2, 29, 76, 0.92) 0%, rgba(2, 29, 76, 0.28) 100%);
  opacity: 1;
  z-index: 1;
}
/* The legal card used a tan/gold scrim (rgba(184,148,74)) that left its photo
   reading brown and washed out next to the accounting card. Both scrims are
   navy now, so the pair looks deliberate; the gold stays in the card chrome. */
.practice-card.legal .practice-visual.has-photo .practice-visual-bg {
  background: linear-gradient(to top, rgba(2, 29, 76, 0.92) 0%, rgba(2, 29, 76, 0.28) 100%);
}
.practice-visual.has-photo .practice-visual-content {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  text-align: right;
  height: 100%;
  min-height: 420px;
  padding: var(--space-8);
}
.practice-visual.has-photo .practice-icon-wrapper {
  width: 56px;
  height: 56px;
  margin-bottom: var(--space-4);
}
.practice-visual.has-photo .practice-icon-wrapper .icon {
  width: 28px;
  height: 28px;
}
.practice-visual.has-photo .practice-icon-wrapper svg {
  width: 28px;
  height: 28px;
}
@media (max-width: 768px) {
  .practice-visual.has-photo .practice-visual-content { min-height: 280px; }
}