/* ===================== Fonts ===================== */
@font-face {
  font-family: 'Akhbar MT';
  src: url('../fonts/AkhbarMT-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ===================== Base ===================== */
html {
  scroll-behavior: smooth;
  scrollbar-color: #A98446 #F8F5EE;
  scrollbar-width: thin;
}

body {
  overflow-x: hidden;
}

::selection {
  background-color: #A98446;
  color: #F8F5EE;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #F8F5EE;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #CDB480, #8C6B38);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #A98446;
}

/* ===================== Scroll Progress ===================== */
.scroll-progress {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #8C6B38, #CDB480, #A98446);
  transform: scaleX(0);
  transform-origin: right;
  z-index: 60;
  pointer-events: none;
}

/* ===================== Grain Overlay ===================== */
.grain-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* ===================== Header ===================== */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: -8px;
  width: 0;
  height: 2px;
  background: #A98446;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  color: #A98446;
}

.nav-link.active::after {
  width: 100%;
}

/* ===================== Hero Floating Badge ===================== */
@keyframes float-soft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

#home .fa-scale-balanced {
  display: inline-block;
  animation: float-soft 3.4s ease-in-out infinite;
}

#home .absolute.inset-0 img {
  will-change: transform;
}

/* ===================== Magnetic Buttons ===================== */
.magnetic {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===================== Button Ripple ===================== */
.btn-ripple {
  position: relative;
  overflow: hidden;
}

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  transform: scale(0);
  animation: ripple-anim 0.6s ease-out;
  pointer-events: none;
}

@keyframes ripple-anim {
  to {
    transform: scale(3);
    opacity: 0;
  }
}

/* ===================== Hero Ken Burns ===================== */
.hero-kenburns {
  animation: hero-kenburns 22s ease-in-out infinite alternate;
}

@keyframes hero-kenburns {
  0% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.13) translate(-1.5%, -1%); }
}

/* ===================== Hero Text Reveal ===================== */
.reveal-mask {
  position: relative;
  overflow: hidden;
}

.reveal-mask .reveal-bar {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #CDB480, #A98446);
  transform-origin: left;
  animation: reveal-bar 0.9s cubic-bezier(0.65, 0, 0.35, 1) forwards;
  animation-delay: var(--reveal-delay, 0s);
  z-index: 2;
}

.reveal-mask .reveal-content {
  display: inline-block;
  opacity: 0;
  animation: reveal-content 0.6s ease forwards;
  animation-delay: calc(var(--reveal-delay, 0s) + 0.3s);
}

@keyframes reveal-bar {
  to { transform: scaleX(0); }
}

@keyframes reveal-content {
  to { opacity: 1; }
}

.hero-fade-up {
  opacity: 0;
  transform: translateY(16px);
  animation: hero-fade-up 0.7s ease forwards;
  animation-delay: var(--reveal-delay, 0s);
}

@keyframes hero-fade-up {
  to { opacity: 1; transform: translateY(0); }
}

/* ===================== Hero Pattern ===================== */
.hero-pattern::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, rgba(14, 42, 74, 0.12) 1px, transparent 0);
  background-size: 28px 28px;
  opacity: 0.5;
}

/* ===================== Gold Pattern (decorative section accent) ===================== */
.gold-pattern::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(169, 132, 70, 0.08) 0%, transparent 35%),
    radial-gradient(circle at 85% 80%, rgba(169, 132, 70, 0.08) 0%, transparent 35%);
}

/* ===================== Decorative Section Heading ===================== */
.section-eyebrow {
  display: block;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin: 0.6rem 0 1.25rem;
}

.h-line {
  width: 3.5rem;
  height: 1px;
  background-color: rgba(183, 149, 93, 0.55);
  flex-shrink: 0;
  transform: scaleX(0);
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-heading .h-line:first-child {
  transform-origin: right;
}

.section-heading .h-line:last-child {
  transform-origin: left;
}

.h-line.in-view {
  transform: scaleX(1);
}

.h-line.on-dark {
  background-color: rgba(244, 234, 216, 0.4);
}

/* ===================== Box + Shadow Card Components ===================== */
/* shared warm, gold-brown tinted elevation (matches mosib's ambient page shadow) */
.value-card,
.flip-card,
.testimonial-card {
  background: #FFFFFF;
  border: 1px solid rgba(183, 149, 93, 0.22);
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(96, 70, 35, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.value-card,
.testimonial-card {
  --rx: 0deg;
  --ry: 0deg;
  --ty: 0px;
  position: relative;
  overflow: hidden;
  transform: perspective(1000px) rotateX(var(--ry)) rotateY(var(--rx)) translateY(var(--ty));
}

.value-card::before,
.testimonial-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 55%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg);
  transition: left 0.7s ease;
  pointer-events: none;
}

.value-card:hover,
.testimonial-card:hover {
  --ty: -6px;
  box-shadow: 0 18px 38px rgba(96, 70, 35, 0.18);
}

.value-card:hover::before,
.testimonial-card:hover::before {
  left: 150%;
}

/* ---- Testimonial cards (Google review snippets) ---- */
.testimonial-card {
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
}

.testimonial-stars {
  color: #A98446;
  font-size: 0.8rem;
  letter-spacing: 0.15rem;
  margin-bottom: 1rem;
}

.testimonial-text {
  color: #2D2925;
  font-size: 0.95rem;
  line-height: 1.85;
  flex-grow: 1;
  margin-bottom: 1.5rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid rgba(183, 149, 93, 0.22);
}

.testimonial-name {
  font-weight: 800;
  color: #0E2A4A;
  font-size: 0.95rem;
}

.testimonial-author .fa-google {
  color: #8C6B38;
  font-size: 1.05rem;
}

/* ---- Value cards (Core Values section) ---- */
.value-card {
  text-align: center;
  padding: 2.25rem 1.5rem;
}

.value-card .value-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #FBF8F0;
}

.value-card i {
  font-size: 1.6rem;
  color: #0E2A4A;
}

.value-card h3 {
  font-family: 'Akhbar MT', sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  color: #A98446;
}

/* ---- Flip cards (Services) ---- */
.flip-card {
  background: transparent;
  border: none;
  box-shadow: none;
  perspective: 1600px;
  height: 280px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner,
.flip-card:focus-within .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.5rem;
}

.flip-card-front {
  background: #FFFFFF;
  border: 1.5px solid #0E2A4A;
  box-shadow: 0 10px 30px rgba(96, 70, 35, 0.1);
}

.flip-card-front i {
  font-size: 2.25rem;
  color: #0E2A4A;
  margin-bottom: 1.1rem;
}

.flip-card-front h3 {
  font-family: 'Akhbar MT', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: #A98446;
}

.flip-card-back {
  background: #F1EBDC;
  border: 1.5px solid #0E2A4A;
  color: #A98446;
  transform: rotateY(180deg);
  box-shadow: 0 16px 34px rgba(96, 70, 35, 0.18);
}

.flip-card-back h3 {
  font-family: 'Akhbar MT', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: #A98446;
  margin-bottom: 0.65rem;
}

.flip-card-back p {
  font-size: 0.9rem;
  line-height: 1.8;
  color: rgba(169, 132, 70, 0.85);
}

/* ===================== Footer ===================== */
.footer-link {
  transition: color 0.25s ease;
}

.footer-link:hover {
  color: #0E2A4A;
}

/* ===================== Floating WhatsApp Button ===================== */
.consult-float {
  position: fixed;
  bottom: 28px;
  left: 24px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #25D366;
  color: #FFFFFF;
  padding: 0.9rem 1.2rem;
  border-radius: 999px;
  box-shadow: 0 10px 26px rgba(37, 211, 102, 0.4);
  font-weight: 800;
  font-size: 1.5rem;
  text-decoration: none;
  animation: consult-pulse 2.8s infinite;
}

.consult-label {
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  .consult-label {
    display: none;
  }
  .consult-float {
    padding: 0.85rem;
  }
}

@keyframes consult-pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ===================== Back to Top ===================== */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 24px;
  z-index: 50;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #A98446;
  color: #F8F5EE;
  font-size: 1.1rem;
  box-shadow: 0 10px 22px rgba(169, 132, 70, 0.35);
  border: none;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: all 0.3s ease;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-4px);
}
