/* =============================================
   JL IMÓVEIS BAHIA — Custom CSS
   Design System Variables, Animations & Utilities
   ============================================= */

/* ---- CSS Custom Properties ---- */
:root {
  --color-primary: #C9973D;
  --color-primary-light: #E4BE6A;
  --color-dark: #0D0D0D;
  --color-dark-secondary: #1A1A1A;
  --color-gray: #B8B8B8;
  --color-white: #F5F5F5;
  --color-success: #2E8B57;
  --color-warning: #E6A23C;
  --color-error: #D64545;
  --color-info: #4A90E2;
}

/* ---- Smooth Scroll ---- */
html {
  scroll-behavior: smooth;
}

/* ---- Selection Color ---- */
::selection {
  background-color: rgba(201, 151, 61, 0.3);
  color: #F5F5F5;
}

/* ---- Skip to Content (A11y) ---- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  padding: 12px 24px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 0 0 8px 8px;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 0;
}

/* ---- Focus Visible ---- */
*:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

/* ---- Scroll-Driven Fade-Up Animation ---- */
@supports (animation-timeline: view()) {
  .fade-up {
    animation: fadeUpScroll linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 30%;
  }

  @keyframes fadeUpScroll {
    from {
      opacity: 0;
      transform: translateY(40px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* Fallback: JS-powered .is-visible class */
@supports not (animation-timeline: view()) {
  .fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }

  .fade-up.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .fade-up {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ---- Button Hover Effects ---- */
.btn-primary {
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(201, 151, 61, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background-color: var(--color-primary) !important;
  color: #fff !important;
  transform: translateY(-2px);
}

.btn-secondary:active {
  transform: translateY(0);
}

/* ---- Card Hover ---- */
.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

/* ---- Gold Line Divider ---- */
.gold-line {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
  border-radius: 999px;
}

/* ---- Hero Overlay ---- */
.hero-overlay {
  background: linear-gradient(
    rgba(13, 13, 13, 0.75),
    rgba(13, 13, 13, 0.75)
  );
}

/* ---- Mobile Menu ---- */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.mobile-menu.active {
  transform: translateX(0);
}

/* ---- Hamburger Icon Animation ---- */
.hamburger span {
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* ---- Header Scroll State ---- */
.header-scrolled {
  background-color: rgba(13, 13, 13, 0.97) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

/* ---- Service/Differential Card Icon ---- */
.service-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(201, 151, 61, 0.1);
  color: var(--color-primary);
  flex-shrink: 0;
}

/* ---- Image rounded style ---- */
.img-rounded {
  border-radius: 24px;
  overflow: hidden;
}

/* ---- Form Inputs ---- */
.form-input {
  background: var(--color-dark-secondary);
  border: 1px solid rgba(184, 184, 184, 0.2);
  border-radius: 14px;
  padding: 16px 20px;
  color: var(--color-white);
  font-size: 16px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(201, 151, 61, 0.15);
}

.form-input::placeholder {
  color: var(--color-gray);
}

/* ---- Micro Badge ---- */
.micro-badge {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ---- Gold Gradient Text ---- */
.text-gold-gradient {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- WhatsApp Floating Button ---- */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 900;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.5);
}

/* ---- Footer Links ---- */
.footer-link {
  color: var(--color-gray);
  transition: color 0.2s ease;
  text-decoration: none;
}

.footer-link:hover {
  color: var(--color-primary);
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--color-dark-secondary);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* ---- LGPD Consent Bar ---- */
.lgpd-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #1A1A1A;
  border-top: 1px solid rgba(201, 151, 61, 0.2);
  padding: 16px 24px;
  transform: translateY(100%);
  transition: transform 0.4s ease;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}
.lgpd-bar.active {
  transform: translateY(0);
}
.lgpd-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.lgpd-text {
  color: #B8B8B8;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}
.lgpd-link {
  color: #C9973D;
  text-decoration: underline;
}
.lgpd-link:hover {
  color: #E4BE6A;
}

/* ---- Active nav link ---- */
.nav-link-active {
  color: var(--color-primary) !important;
}

/* ---- Pagination ---- */
.pagination-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
}
.pagination-btn:hover:not(.pagination-active) {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.pagination-btn.pagination-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  cursor: default;
}
.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
