:root {
  --legal-dark: #2C3E50;
  --legal-body: #475569;
  --legal-light: #F8FAFC;
  --brand-primary: #1F8D2C;
  --brand-button: #8BC528;
  --brand-hover: #7AB520;
  --btn-dark: #064E3B;
  
  --font-primary: 'Roboto', system-ui, -apple-system, sans-serif;
  --font-heading: 'Merriweather', serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-primary);
  color: var(--legal-body);
  line-height: 1.6;
  background-color: #ffffff;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--legal-dark);
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
}

.bg-light {
  background-color: var(--legal-light);
}

.mt-4 { margin-top: 1.5rem; }

/* Header */
.site-header {
  border-bottom: 1px solid #E2E8F0;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  flex-shrink: 0;
  margin-right: 2rem;
}

.logo img {
  height: 38px;
  width: auto;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-menu {
  display: flex;
  gap: 1.25rem;
  list-style: none;
}

.nav-menu a {
  color: var(--legal-dark);
  font-size: 0.85rem;
  font-weight: 500;
  font-family: var(--font-primary);
  white-space: nowrap;
}

.nav-menu a:hover {
  color: var(--brand-primary);
}

.btn-asesor {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--legal-dark);
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
}

.btn-asesor:hover {
  color: var(--brand-primary);
}

/* Hero Section */
.hero {
  position: relative;
  padding: 6rem 0;
  min-height: 80vh;
  display: flex;
  align-items: center;
  background-color: #fff;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  right: 8%;
  top: 50%;
  transform: translateY(-50%);
  width: 45%;
  max-width: 500px;
  z-index: 0;
  pointer-events: none;
}

.hero-bg svg {
  width: 100%;
  height: auto;
}

/* Staggered Entrance Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cursor {
  display: inline-block;
  width: 2px;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-content {
  max-width: 650px;
}

.animate-stagger-1, .animate-stagger-2, .animate-stagger-3, .animate-stagger-4, .animate-stagger-5 {
  opacity: 0;
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-stagger-1 { animation-delay: 0.1s; }
.animate-stagger-2 { animation-delay: 0.3s; }
.animate-stagger-3 { animation-delay: 0.5s; }
.animate-stagger-4 { animation-delay: 0.7s; }
.animate-stagger-5 { animation-delay: 0.9s; }

/* Gradient Text Animation */
.animate-gradient {
  background: linear-gradient(to right, var(--brand-primary), var(--btn-dark), var(--brand-button), var(--brand-primary));
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shine 4s linear infinite;
}

@keyframes shine {
  to {
    background-position: 200% center;
  }
}

.country-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--legal-body);
  margin-bottom: 1rem;
  background-color: var(--legal-light);
  padding: 0.25rem 1rem;
  border-radius: 50px;
  border: 1px solid #E2E8F0;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
}

.text-brand {
  color: var(--brand-primary);
}

.hero-subtitle {
  font-size: 1.15rem;
  margin-bottom: 2.5rem;
  color: var(--legal-body);
}

/* Buttons */
.hero-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-size: 1rem;
  font-family: var(--font-primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
}

.btn-primary {
  background-color: var(--brand-button);
  color: #fff;
  box-shadow: 0 4px 6px -1px rgba(139, 197, 40, 0.2);
}

.btn-primary:hover {
  background-color: var(--brand-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(139, 197, 40, 0.3);
}

.btn-secondary {
  background-color: var(--btn-dark);
  color: #fff;
}

.btn-secondary:hover {
  background-color: #042f24;
  transform: translateY(-2px);
}

/* Features List */
.features-list {
  list-style: none;
}

.features-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.875rem;
  font-size: 1.05rem;
  color: var(--legal-dark);
}

.features-list li i {
  color: var(--brand-button);
  font-size: 1.25rem;
  margin-top: 0.2rem;
}

/* Section Header */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--legal-body);
}

/* Services */
.services-section {
  padding: 5rem 0;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.service-card {
  background: #fff;
  padding: 2.5rem 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  border: 1px solid #F1F5F9;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.service-icon {
  width: 50px;
  height: 50px;
  background-color: var(--legal-light);
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.service-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.service-card p {
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  color: var(--legal-body);
}

.service-link {
  color: var(--brand-primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.service-link:hover {
  gap: 0.75rem;
}

/* Trust Section */
.trust-section {
  padding: 6rem 0;
}

.trust-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.trust-content h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.trust-graphic {
  position: relative;
  height: 400px;
  background: linear-gradient(135deg, var(--legal-light) 0%, #E2E8F0 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.glass-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.glass-card i {
  font-size: 2.5rem;
  color: var(--btn-dark);
  margin-bottom: 1rem;
}

/* FAQ Accordion */
.faq-section {
  padding: 5rem 0;
}

.faq-accordion {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 1.5rem;
  background: none;
  border: none;
  font-family: var(--font-primary);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--legal-dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.3s ease;
}

.faq-question:hover {
  background-color: var(--legal-light);
}

.faq-question i {
  color: var(--brand-primary);
  transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  padding: 0 1.5rem;
}

.faq-item.active .faq-answer {
  max-height: 500px; /* arbitrary high number */
  padding: 0 1.5rem 1.5rem 1.5rem;
}

/* CTA */
.cta-section {
  padding: 5rem 0;
  text-align: center;
  background-color: var(--legal-dark);
  color: #fff;
}

.cta-section h2 {
  color: #fff;
  margin-bottom: 1rem;
}

/* Footer */
.site-footer {
  padding: 4rem 0 2rem;
  border-top: 1px solid #E2E8F0;
  font-size: 0.9rem;
  color: var(--legal-body);
  background-color: var(--legal-light);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-brand .footer-logo {
  height: 40px;
  width: auto;
  margin-bottom: 1.25rem;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
  max-width: 340px;
}

.footer-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--brand-primary);
}

.footer-cta:hover {
  color: var(--brand-hover);
}

.footer-col h3 {
  font-family: var(--font-primary);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--legal-dark);
  margin-bottom: 1.25rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.7rem;
}

.footer-col a {
  color: var(--legal-body);
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: var(--brand-primary);
}

.footer-bottom {
  border-top: 1px solid #E2E8F0;
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--legal-body);
}

.footer-bottom p {
  margin-bottom: 0.35rem;
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
  .footer-brand p {
    max-width: none;
  }
}

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

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  font-size: 1.5rem;
  color: var(--legal-dark);
  cursor: pointer;
  background: none;
  border: none;
}

/* Responsive */
@media (max-width: 1100px) {
  .hero-bg {
    width: 70%;
    opacity: 0.3;
    right: -10%;
  }
  .trust-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .hero h1 {
    font-size: 3rem;
  }
}

@media (max-width: 1024px) {
  .nav-wrapper {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background-color: #fff;
    flex-direction: column;
    padding: 2rem 5%;
    gap: 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    clip-path: circle(0% at top right);
    transition: clip-path 0.4s ease-in-out;
    z-index: 9;
  }

  .nav-wrapper.active {
    clip-path: circle(150% at top right);
  }

  .nav-menu {
    flex-direction: column;
    width: 100%;
    gap: 1.5rem;
    text-align: center;
  }
  
  .nav-menu a {
    font-size: 1.1rem;
    display: block;
    padding: 0.5rem;
  }

  .btn-asesor {
    width: 100%;
    justify-content: center;
    padding: 1rem;
    background-color: var(--legal-light);
    border-radius: 8px;
  }
  
  .mobile-toggle {
    display: block;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 3rem 0;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 1rem;
  }

  .btn {
    width: 100%;
  }
}

/* Decorative specialty rotator inside the country tag (keeps H1 brand static) */
#specialty-rotator {
  display: inline-block;
  min-width: 190px;
  text-align: left;
  color: var(--brand-primary);
  font-weight: 700;
  will-change: opacity, transform;
}

@media (max-width: 480px) {
  #specialty-rotator {
    min-width: 0;
  }
}

/* Show all hero features at once in two columns on desktop */
#dynamic-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem 1.75rem;
  margin-top: 0.5rem;
}

#dynamic-features li {
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--legal-body);
}

#dynamic-features li i {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  margin-top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: var(--brand-primary);
  background-color: rgba(139, 197, 40, 0.13);
  border-radius: 9px;
}

@media (max-width: 640px) {
  #dynamic-features {
    grid-template-columns: 1fr;
    gap: 0.9rem 0;
  }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  #specialty-rotator {
    opacity: 1 !important;
    transform: none !important;
  }
}
