/* ============================================
   ESTUDIO JURÍDICO ARCAL — UI Components
   ============================================ */

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 32px;
  border: none;
  cursor: pointer;
  transition:
    background var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease);
  line-height: 1;
}

.btn-primary {
  background: var(--garnet);
  color: #fff;
}

.btn-primary:hover {
  background: var(--garnet-deep);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--garnet);
  border: 1px solid var(--garnet);
}

.btn-outline:hover {
  background: var(--garnet);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--ink-secondary);
  border: 1px solid var(--border);
  padding: 10px 20px;
  font-size: 11px;
}

.btn-ghost:hover {
  border-color: var(--garnet);
  color: var(--garnet);
}

/* ---- Cards ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: var(--space-xl);
}

.card-sm {
  padding: var(--space-lg);
}

.card-dark {
  background: var(--ink);
  border-color: var(--ink);
  color: rgba(255,255,255,0.85);
}

.card-garnet {
  background: var(--garnet);
  border-color: var(--garnet);
  color: rgba(255,255,255,0.9);
}

/* ---- News / Article card ---- */
.article-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: var(--space-xl);
  transition: border-color var(--dur-mid) var(--ease);
}

.article-card:hover {
  border-color: var(--garnet-tint-2);
}

.article-meta {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--garnet);
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.article-meta::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--garnet);
}

.article-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
  margin-bottom: var(--space-md);
}

.article-lead {
  font-size: 14px;
  color: var(--ink-secondary);
  line-height: 1.8;
}

.article-lead p { margin-bottom: 10px; font-size: 14px; }

.article-body {
  font-size: 14px;
  color: var(--ink-secondary);
  line-height: 1.85;
}

.article-body p {
  font-size: 14px;
  margin-bottom: 12px;
}

.article-body ul {
  margin: 12px 0 12px 20px;
}

.article-body li {
  margin-bottom: 8px;
  font-size: 14px;
}

.article-body blockquote {
  border-left: 3px solid var(--garnet);
  padding: var(--space-md) var(--space-lg);
  margin: var(--space-md) 0;
  background: var(--garnet-tint);
  font-size: 13.5px;
  color: var(--ink-secondary);
  font-style: italic;
  line-height: 1.8;
}

.article-author {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 12px;
  color: var(--ink-tertiary);
  font-style: italic;
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
}

/* Expandable article toggle */
.article-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--garnet);
  cursor: pointer;
  padding: var(--space-sm) 0;
  margin-top: var(--space-sm);
  transition: color var(--dur-fast);
}

.article-toggle:hover { color: var(--garnet-deep); }

.toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1px solid currentColor;
  font-size: 12px;
  font-style: normal;
  transition: transform var(--dur-mid) var(--ease);
  flex-shrink: 0;
}

.article-toggle[aria-expanded="true"] .toggle-icon {
  transform: rotate(45deg);
}

.expandable-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s var(--ease), opacity 0.3s var(--ease);
  opacity: 0;
}

.expandable-body.open {
  max-height: 2000px;
  opacity: 1;
}

/* ---- News grid ---- */
.news-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.news-grid .article-card.featured {
  grid-column: 1 / -1;
}

/* ---- Service cards grid ---- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.service-item {
  background: var(--surface);
  padding: var(--space-xl) var(--space-xl);
  transition: background var(--dur-fast);
}

.service-item:hover {
  background: var(--bg);
}

.service-number {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 700;
  color: var(--garnet-tint-2);
  line-height: 1;
  margin-bottom: 6px;
}

.service-title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: var(--space-md);
}

.service-body {
  font-size: 14px;
  color: var(--ink-secondary);
  line-height: 1.8;
}

.service-body p { font-size: 14px; margin-bottom: 10px; }

.service-list {
  list-style: none;
  padding: 0;
  margin-top: var(--space-sm);
}

.service-list li {
  font-size: 13px;
  padding: 7px 0 7px 16px;
  border-bottom: 1px solid var(--border-light);
  position: relative;
  color: var(--ink-secondary);
}

.service-list li:last-child { border-bottom: none; }

.service-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--garnet);
  font-size: 10px;
}

/* ---- Pricing cards ---- */
.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: var(--space-lg);
}

.pricing-header {
  background: var(--garnet);
  padding: var(--space-lg) var(--space-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.pricing-header.dark { background: #252220; }

.pricing-title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  color: #fff;
}

.pricing-amount {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  text-align: right;
}

.pricing-amount small {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 300;
  opacity: 0.7;
  display: block;
  margin-top: 2px;
}

.pricing-body {
  padding: var(--space-xl);
}

.pricing-list {
  list-style: none;
  padding: 0;
}

.pricing-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-md);
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 14px;
  color: var(--ink-secondary);
  line-height: 1.65;
}

.pricing-list li:last-child { border-bottom: none; }

.pricing-check {
  color: var(--garnet);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
  font-size: 13px;
}

/* ---- Contact form ---- */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-tertiary);
}

.form-control {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 300;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 12px 14px;
  outline: none;
  transition: border-color var(--dur-fast) var(--ease);
  width: 100%;
  -webkit-appearance: none;
}

.form-control:focus {
  border-color: var(--garnet);
}

.form-control::placeholder {
  color: var(--ink-tertiary);
  font-weight: 300;
}

textarea.form-control {
  resize: vertical;
  min-height: 150px;
  line-height: 1.6;
}

select.form-control {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%235C5854'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.privacy-notice {
  font-size: 12.5px;
  color: var(--ink-tertiary);
  line-height: 1.75;
  padding: var(--space-md);
  border-left: 2px solid var(--garnet-tint-2);
  background: var(--bg-warm);
}

.form-success {
  display: none;
  text-align: center;
  padding: var(--space-2xl);
}

.form-success.visible {
  display: block;
  animation: pageIn 0.4s var(--ease) both;
}

.form-success-icon {
  width: 52px;
  height: 52px;
  border: 1.5px solid var(--garnet);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-lg);
  font-size: 20px;
  color: var(--garnet);
}

.form-success h3 {
  font-family: var(--font-display);
  font-size: 24px;
  margin-bottom: var(--space-sm);
  color: var(--garnet);
}

/* ---- Info card (sidebar) ---- */
.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: var(--space-xl);
}

.info-card-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
}

.contact-item {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  align-items: flex-start;
}

.contact-icon {
  width: 34px;
  height: 34px;
  background: var(--garnet-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}

.contact-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-tertiary);
  margin-bottom: 3px;
}

.contact-value {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.5;
}

.contact-value a {
  color: var(--garnet);
  font-family: var(--font-body);
}

/* ---- Director card ---- */
.director-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: var(--space-xl);
}

.director-avatar {
  width: 54px;
  height: 54px;
  background: var(--garnet);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--space-lg);
}

.director-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.director-role {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--garnet);
  margin-bottom: var(--space-lg);
}

.director-quote {
  font-size: 14px;
  color: var(--ink-secondary);
  line-height: 1.8;
  font-style: italic;
  border-left: 2px solid var(--garnet);
  padding-left: var(--space-md);
}

/* ---- Tags ---- */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.tag {
  background: var(--garnet-tint);
  color: var(--garnet);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 5px 12px;
}

/* ---- Links sections ---- */
.links-group {
  margin-bottom: var(--space-xl);
}

.links-group-title {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-tertiary);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border);
}

.links-list {
  list-style: none;
  padding: 0;
}

.links-list li {
  border-bottom: 1px solid var(--border-light);
}

.links-list li:last-child { border-bottom: none; }

.links-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  font-size: 14px;
  color: var(--ink-secondary);
  font-family: var(--font-body);
  transition: color var(--dur-fast) var(--ease), gap var(--dur-mid) var(--ease);
}

.links-list a::before {
  content: '→';
  font-size: 11px;
  color: var(--garnet);
  flex-shrink: 0;
  transition: transform var(--dur-mid) var(--ease);
}

.links-list a:hover {
  color: var(--garnet);
  gap: 14px;
}

.links-list a:hover::before {
  transform: translateX(3px);
}

/* Boletín category grid */
.boletin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-top: var(--space-sm);
}

.boletin-cell {
  background: var(--surface);
  padding: var(--space-md);
  font-size: 12.5px;
  color: var(--ink-secondary);
  cursor: default;
  transition: background var(--dur-fast), color var(--dur-fast);
  font-family: var(--font-body);
  text-align: center;
}

.boletin-cell:hover {
  background: var(--garnet-tint);
  color: var(--garnet);
}

/* ---- Bilingual badge ---- */
.bilingual-strip {
  background: var(--bg-warm);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: var(--space-md) var(--space-xl);
  text-align: center;
}

.bilingual-strip p {
  font-size: 13px;
  color: var(--ink-secondary);
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.7;
}

.bilingual-strip strong {
  color: var(--garnet);
  font-weight: 500;
}

/* ---- Responsive component adjustments ---- */
@media (max-width: 768px) {
  .news-grid {
    grid-template-columns: 1fr;
  }

  .news-grid .article-card.featured {
    grid-column: 1;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .pricing-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .boletin-grid {
    grid-template-columns: 1fr;
  }
}
