/**
 * Service Page Template Styles
 * Estilos para el template page-service.php
 */

/* ============================================ */
/* HERO SECTION                                 */
/* ============================================ */

.service-hero {
  position: relative;
  min-height: 360px;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 60%, #00c4b4 100%);
  overflow: hidden;
}

.service-hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at 70% 20%, rgba(var(--color-accent-green-rgb), 0.15), transparent 60%);
}

.service-hero__content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  padding: 120px 20px 60px;
  color: var(--color-white);
  width: 100%;
}

.service-hero .breadcrumbs {
  margin-bottom: var(--space-6);
}

.service-hero .breadcrumbs a,
.service-hero .breadcrumbs span {
  color: rgba(255, 255, 255, 0.8);
}

.service-hero .breadcrumbs a:hover {
  color: var(--color-white);
}

.service-hero .breadcrumbs-separator {
  margin: 0 var(--space-2);
}

.service-hero h1 {
  font-family: var(--font-primary);
  font-size: 44px;
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
  margin-bottom: var(--space-6);
  color: var(--color-white);
}

.service-hero__meta {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  font-family: var(--font-primary);
  font-size: var(--font-size-md);
  opacity: 0.9;
}

.service-hero__meta i {
  margin-right: var(--space-1);
}

/* ============================================ */
/* CONTENT WRAPPER                              */
/* ============================================ */

.service-content-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Intro paragraphs - larger lead text */
.service-content-wrapper .entry-content > p:first-child,
.service-content-wrapper .entry-content > p:nth-child(2),
.service-content-wrapper .entry-content > p:nth-child(3) {
  font-size: 20px;
  line-height: 1.85;
  color: var(--color-text-secondary);
}

.service-content-wrapper .entry-content > p:first-child {
  margin-top: 56px;
}

/* H2 - Section headers with accent border */
.service-content-wrapper .entry-content h2 {
  margin-top: 72px;
  margin-bottom: 24px;
  padding-top: 40px;
  padding-bottom: 16px;
  padding-left: 20px;
  border-left: 4px solid var(--color-primary);
  border-top: 1px solid var(--color-border-light);
  font-size: 30px;
  position: relative;
}

/* H3 - Subsection headers */
.service-content-wrapper .entry-content h3 {
  margin-top: 36px;
  margin-bottom: 16px;
  font-size: 22px;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.service-content-wrapper .entry-content h3::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--color-accent-green);
  border-radius: 50%;
  flex-shrink: 0;
}

/* Lists - custom checkmark bullets in card */
.service-content-wrapper .entry-content ul {
  list-style: none;
  margin: 20px 0 28px;
  padding: 24px 28px;
  background: var(--color-bg-secondary);
  border-radius: var(--border-radius-md);
  border: 1px solid var(--color-border-light);
}

.service-content-wrapper .entry-content ul li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 14px;
  line-height: 1.7;
}

.service-content-wrapper .entry-content ul li:last-child {
  margin-bottom: 0;
}

.service-content-wrapper .entry-content ul li::before {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 2px;
  color: var(--color-accent-green);
  font-size: 14px;
}

/* Strong text - subtle highlight */
.service-content-wrapper .entry-content strong {
  color: var(--color-primary-dark);
  font-weight: 700;
}

/* Table - professional comparison */
.service-content-wrapper .entry-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 32px 0 40px;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border-light);
  font-size: 16px;
}

.service-content-wrapper .entry-content thead tr {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
}

.service-content-wrapper .entry-content thead th {
  color: var(--color-white);
  font-weight: 700;
  padding: 16px 24px;
  text-align: left;
  font-size: 15px;
  letter-spacing: 0.02em;
}

.service-content-wrapper .entry-content tbody td {
  padding: 14px 24px;
  border-bottom: 1px solid var(--color-border-light);
  color: var(--color-text-primary);
}

.service-content-wrapper .entry-content tbody tr:last-child td {
  border-bottom: none;
}

.service-content-wrapper .entry-content tbody tr:nth-child(even) {
  background: var(--color-bg-secondary);
}

.service-content-wrapper .entry-content tbody tr:hover {
  background: rgba(var(--color-primary-rgb), 0.04);
}

/* Last column highlight (Foxentrade advantage) */
.service-content-wrapper .entry-content tbody td:last-child {
  color: var(--color-primary);
  font-weight: 600;
}

/* Paragraphs - tighter spacing */
.service-content-wrapper .entry-content p {
  margin-bottom: 20px;
  line-height: 1.8;
}

/* ============================================ */
/* CONTENT DARK MODE                            */
/* ============================================ */

[data-theme="dark"] .service-content-wrapper .entry-content h3 {
  color: #42a5f5;
}

[data-theme="dark"] .service-content-wrapper .entry-content ul {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--color-border-light);
}

[data-theme="dark"] .service-content-wrapper .entry-content ul li::before {
  color: var(--color-accent-green);
}

[data-theme="dark"] .service-content-wrapper .entry-content strong {
  color: var(--color-text-primary);
}

[data-theme="dark"] .service-content-wrapper .entry-content thead tr {
  background: linear-gradient(135deg, #0d2137 0%, #1a3a5c 100%);
}

[data-theme="dark"] .service-content-wrapper .entry-content tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .service-content-wrapper .entry-content tbody tr:hover {
  background: rgba(66, 165, 245, 0.06);
}

[data-theme="dark"] .service-content-wrapper .entry-content tbody td:last-child {
  color: #42a5f5;
}

/* ============================================ */
/* FAQ SECTION                                  */
/* ============================================ */

.service-faq {
  max-width: 900px;
  margin: var(--space-16) auto;
  padding: 0 20px;
}

.service-faq__title {
  font-family: var(--font-primary);
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  text-align: center;
  margin-bottom: var(--space-10);
}

.service-faq__item {
  border: 1px solid var(--color-border-light);
  border-radius: var(--border-radius-md);
  margin-bottom: var(--space-4);
  overflow: hidden;
  transition: border-color var(--transition-base);
}

.service-faq__item:hover {
  border-color: rgba(var(--color-primary-rgb), 0.3);
}

.service-faq__question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--font-primary);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  text-align: left;
  transition: background var(--transition-base);
  gap: var(--space-4);
}

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

.service-faq__chevron {
  width: 20px;
  height: 20px;
  color: var(--color-primary);
  transition: transform var(--transition-base);
  flex-shrink: 0;
}

.service-faq__item--open .service-faq__chevron {
  transform: rotate(180deg);
}

.service-faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out;
}

.service-faq__item--open .service-faq__answer {
  max-height: 500px;
}

.service-faq__answer-inner {
  padding: var(--space-4) var(--space-6) var(--space-6);
  font-family: var(--font-primary);
  font-size: var(--font-size-md);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

/* ============================================ */
/* CTA SECTION                                  */
/* ============================================ */

.service-cta {
  text-align: center;
  padding: var(--space-16) var(--space-6);
  background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.03), rgba(var(--color-accent-green-rgb), 0.03));
  border-top: 1px solid var(--color-border-light);
  border-bottom: 1px solid var(--color-border-light);
  margin: var(--space-16) 0 0;
}

.service-cta__title {
  font-family: var(--font-primary);
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-4);
}

.service-cta__text {
  font-family: var(--font-primary);
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-8);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: var(--line-height-relaxed);
}

.service-cta__button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  background-color: var(--color-accent-green);
  border: var(--border-width-medium) solid var(--color-overlay-dark);
  border-radius: var(--border-radius-pill);
  box-shadow: var(--shadow-glow-green);
  text-decoration: none;
  color: var(--color-black);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  font-family: var(--font-primary);
  transition: all var(--transition-base);
  cursor: pointer;
}

.service-cta__button:hover {
  background-color: rgb(0, 230, 160);
  box-shadow: 0px 0px 40px 0px var(--color-accent-green-glow-strong),
              0px 0px 0px 6px rgba(var(--color-accent-green-rgb), 0.15);
  transform: translateY(-2px);
}

/* ============================================ */
/* DARK MODE                                    */
/* ============================================ */

[data-theme="dark"] .service-hero {
  background: linear-gradient(135deg, #0a1628 0%, #0d2137 60%, #0a2a2a 100%);
}

[data-theme="dark"] .service-faq__item {
  border-color: var(--color-border-light);
}

[data-theme="dark"] .service-faq__question:hover {
  background: var(--color-bg-hover);
}

[data-theme="dark"] .service-cta {
  border-color: var(--color-border-light);
}

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

@media (max-width: 809px) {
  .service-hero {
    min-height: 280px;
  }

  .service-hero__content {
    padding: 100px 16px 40px;
  }

  .service-hero h1 {
    font-size: 28px;
  }

  .service-hero__meta {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }

  .service-content-wrapper {
    margin: 0 auto;
    padding: 0 16px;
  }

  .service-content-wrapper .entry-content > p:first-child {
    margin-top: 36px;
  }

  .service-content-wrapper .entry-content h2 {
    margin-top: 48px;
    padding-top: 28px;
    font-size: 24px;
    padding-left: 16px;
  }

  .service-content-wrapper .entry-content h3 {
    font-size: 19px;
  }

  .service-content-wrapper .entry-content ul {
    padding: 18px 20px;
  }

  .service-content-wrapper .entry-content ul li {
    padding-left: 28px;
  }

  .service-content-wrapper .entry-content table {
    font-size: 14px;
  }

  .service-content-wrapper .entry-content thead th,
  .service-content-wrapper .entry-content tbody td {
    padding: 10px 14px;
  }

  .service-faq {
    padding: 0 16px;
  }

  .service-faq__question {
    font-size: var(--font-size-base);
    padding: var(--space-4) var(--space-5);
  }

  .service-cta {
    padding: var(--space-12) var(--space-5);
  }

  .service-cta__title {
    font-size: var(--font-size-2xl);
  }
}
