/* custom variables and styles for Mearaf Bedru Nur site */
:root {
  --color-primary: #1c362d;
  --color-accent: #efe6d7;
  --color-border: #efe6d7;
  --color-bg: #f1f5f9;
  --color-bg-dark: #1c362d;
  --color-text-dark: #e5d5bc;
}

html {
  scroll-behavior: smooth;
}

/* automatically switch when user prefers dark scheme - commented out for light mode only */
/*
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: var(--color-bg-dark);
    --color-border: #334155;
    --color-text: var(--color-text-dark);
  }
  
  body {
    background-color: var(--color-bg-dark);
    color: var(--color-text-dark);
  }
}
*/

/* support manual toggle via class - commented out for light mode only */
/*
.dark {
  --color-bg: var(--color-bg-dark);
  --color-border: #334155;
  --color-text: var(--color-text-dark);
}

.dark body {
  background-color: var(--color-bg-dark);
  color: var(--color-text-dark);
}
*/

/* background utility driven by variable */
.bg-custom {
  background-color: var(--color-bg) !important;
}
/* .dark .bg-custom {
  background-color: var(--color-bg-dark) !important;
} */

/* popover link underline animation */
.popover-link {
  position: relative;
  display: inline-block;
}
.popover-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background-color: var(--color-primary);
  transition: width 0.3s ease;
}
.popover-link:hover::after {
  width: 100%;
}

/* newspaper style text wrap around the image in about section */
.about-text {
  text-align: justify;
}
.about-text p:first-of-type::first-letter {
  float: left;
  font-size: 4em;
  line-height: 0.8;
  margin-right: 0.1em;
  color: var(--color-primary);
  font-family: 'Merriweather', serif;
}

/* keep headings in a serif display font */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Merriweather', serif;
}

/* testimonial slider */
.slider-btn {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--color-border);
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.slider-btn.active {
  background-color: var(--color-accent);
}

/* navbar scrolled state */
.navbar-scrolled {
  background-color: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(100, 116, 139, 0.2);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.dark .navbar-scrolled {
  background-color: rgba(15, 23, 42, 0.9) !important;
  border-bottom-color: rgba(51, 65, 85, 0.5);
}

/* smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Apply CSS variables to Tailwind classes */
.bg-secondary {
  background-color: var(--color-bg) !important;
}

.text-primary {
  color: var(--color-primary) !important;
}

.border-custom {
  border-color: var(--color-border) !important;
}

/* ========== ADDITIONS FOR REVISED SITE ========== */
/* expertise cards (grey accent) */
.expertise-card {
  /* border-color: var(--color-accent) !important; */
  border-radius: 0.75rem;
  transition: all 0.2s;
}
.dark .expertise-card {
  background-color: #253241 !important; /* slightly lighter than dark bg */
}

/* hero CTA buttons */
.cta-primary {
  background-color: var(--color-primary);
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  font-weight: 600;
  transition: background-color 0.2s;
}
.cta-primary:hover {
  background-color: #143028; /* darker shade */
}
.cta-outline {
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  font-weight: 600;
  transition: all 0.2s;
}
.cta-outline:hover {
  background-color: var(--color-primary);
  color: white;
}
.dark .cta-outline {
  color: white;
  border-color: white;
}
.dark .cta-outline:hover {
  background-color: white;
  color: var(--color-primary);
}

/* about section (no image) fine tuning */
.about-office p {
  font-size: 1.125rem;
  line-height: 1.7;
}

/* icon sizing for expertise */
.expertise-icon {
  font-size: 2.25rem;
  line-height: 1;
  margin-bottom: 0.5rem;
}

/* remove first-letter style from about section (since no image) */
.about-office p:first-of-type::first-letter {
  all: unset; /* revert newspaper style */
}

/* ensure proper dark mode for expertise cards */
.dark .expertise-card h3 {
  color: #f1f5f9;
}
.dark .expertise-card p {
  color: #cbd5e1;
}