/* ========================================
   COMPONENTS — Sicut Lex Estudio
   Reusable: buttons, badges, cards, preloader,
   whatsapp, backtop, reveal, FAQ
   ======================================== */

/* ===== BADGE ===== */
.badge {
  display: inline-block;
  border: 1px solid rgba(193,162,122,0.3);
  color: var(--gold-light);
  padding: 0.4rem 1.2rem;
  font-size: 0.65rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 2rem;
}
.badge i { margin-right: 6px; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all 0.3s;
  cursor: pointer;
  border: none;
}
.btn i { font-size: 0.9rem; }

.btn-primary {
  padding: 0.9rem 2.5rem;
  background: var(--gold);
  color: var(--navy);
}
.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(193,162,122,0.3);
}

.btn-outline {
  padding: 0.9rem 2.5rem;
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.8);
}
.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-dark {
  padding: 0.9rem 2.5rem;
  background: var(--gold);
  color: var(--navy);
}
.btn-dark:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(193,162,122,0.3);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ===== PRACTICE CARDS ===== */
.practice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.practice-card {
  padding: 2.5rem 2rem;
  background: var(--white);
  transition: all 0.4s;
  position: relative;
  overflow: hidden;
}
.practice-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 0;
  background: var(--gold);
  transition: height 0.4s;
}
.practice-card:hover::before { height: 100%; }
.practice-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(10,22,40,0.1);
}
.practice-card .icon {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  display: block;
  color: var(--gold);
}
.practice-card h4 {
  font-size: 1.2rem;
  color: var(--navy);
  margin-bottom: 0.5rem;
}
.practice-card p {
  font-size: 0.85rem;
  color: var(--text-body);
  line-height: 1.7;
}
.practice-card .card-line {
  width: 30px;
  height: 2px;
  background: var(--gold);
  margin: 1rem 0;
}
.practice-card .tag {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ===== WHY CARDS ===== */
.why-section {
  padding: 5rem 3rem;
  background: var(--navy);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.why-section::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(193,162,122,0.04) 0%, transparent 70%);
}
.why-section .section-header h2 { color: var(--white); }
.why-section .section-header .overline { color: var(--gold-light); }

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  position: relative;
  z-index: 2;
}
.why-item {
  text-align: center;
  padding: 2rem 1rem;
}
.why-item .icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}
.why-item h4 {
  font-size: 1rem;
  color: var(--white);
  margin-bottom: 0.5rem;
}
.why-item p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
}

/* ===== PRELOADER (CURTAIN EFFECT) ===== */
.preloader-curtain {
  position: fixed;
  inset: 0;
  z-index: 999999;
  pointer-events: none;
}

.preloader-curtain::before,
.preloader-curtain::after {
  content: '';
  position: absolute;
  top: 0;
  height: 100%;
  width: 51%;
  background: var(--navy);
  transition: width 0.8s cubic-bezier(0.77, 0, 0.18, 1);
  z-index: 2;
}
.preloader-curtain::before { left: 0; }
.preloader-curtain::after  { right: 0; }

.preloader-curtain.loaded::before,
.preloader-curtain.loaded::after {
  width: 0%;
}

.preloader-curtain .curtain-center {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  text-align: center;
  opacity: 1;
  transition: opacity 0.4s ease 0.3s;
}

.preloader-curtain.loaded .curtain-center {
  opacity: 0;
}

.preloader-curtain .curtain-center img {
  height: 100px;
  width: auto;
  margin-bottom: 1rem;
}

.preloader-curtain .curtain-center .loader-ring {
  display: block;
  width: 32px;
  height: 32px;
  margin: 0 auto;
  border: 2px solid rgba(193,162,122,0.15);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin-ring 0.8s linear infinite;
}

@keyframes spin-ring {
  to { transform: rotate(360deg); }
}

/* ===== WHATSAPP FLOATING ===== */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 10px;
}
.whatsapp-float .tooltip {
  background: var(--white);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.8rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  opacity: 0;
  transform: translateX(10px);
  transition: 0.3s;
  pointer-events: none;
  white-space: nowrap;
}
.whatsapp-float:hover .tooltip {
  opacity: 1;
  transform: translateX(0);
}
.whatsapp-float .wa-icon {
  width: 56px; height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(37,211,102,0.3);
  transition: transform 0.3s;
}
.whatsapp-float:hover .wa-icon {
  transform: scale(1.1);
}
.whatsapp-float .wa-icon svg {
  width: 28px; height: 28px;
  fill: white;
}

/* ===== BACK TO TOP ===== */
.back-top {
  position: fixed;
  bottom: 90px;
  right: 24px;
  z-index: 998;
  width: 40px; height: 40px;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: 0.4s;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.back-top.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ===== CTA SECTION ===== */
.cta-section {
  padding: 5rem 3rem;
  min-height: 320px;
  text-align: center;
  color: var(--navy);
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.04) 0%,
      rgba(255, 255, 255, 0.02) 45%,
      rgba(10, 22, 40, 0.10) 100%
    ),
    url('../img/cta-bg-crop.png') center 44% / cover no-repeat;
}
.cta-section .container {
  position: relative;
  z-index: 1;
}
.cta-section h2 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  color: var(--navy);
}
.cta-section p {
  color: rgba(10, 22, 40, 0.75);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}
.cta-section .btn-dark {
  background: var(--navy);
  color: var(--white);
  border: 2px solid var(--navy);
}
.cta-section .btn-dark:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
}
