/* ===========================================
   Al Habib Brand System — Master Stylesheet
   Overrides Astra + Elementor to match alhabib design
   =========================================== */

/* --- Custom Properties --- */
.ahb-active {
  --ahb-green: #335040;
  --ahb-green-light: #4A6B58;
  --ahb-green-dark: #243A2D;
  --ahb-gold: #C3A66C;
  --ahb-gold-light: #CEB688;
  --ahb-gold-dark: #A88B4E;
  --ahb-cream: #F5F0E8;
  --ahb-charcoal: #2D2D3F;
  --font-arabic: 'Tajawal', system-ui, sans-serif;
  --font-english: 'Inter', system-ui, sans-serif;
  --ease-out-expo: cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- Fonts --- */
.ahb-rtl,
html[dir="rtl"] .ahb-active,
.ahb-active.ahb-rtl,
.ahb-active[dir="rtl"] { font-family: var(--font-arabic) !important; }

.ahb-active:not(.ahb-rtl),
html[dir="ltr"] .ahb-active,
.ahb-active[dir="ltr"] { font-family: var(--font-english) !important; }

/* ============= ASTRA HEADER OVERRIDES ============= */

/* Green glass header */
.ast-primary-header-bar.ast-primary-header-bar {
  background: rgba(51, 80, 64, 0.88) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border-bottom: none !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12) !important;
}

/* Header inner padding */
.ast-primary-header-bar .ast-primary-header-bar-inner {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* Navigation links — white text */
.ast-primary-header-bar .main-header-menu > .menu-item > .menu-link,
.ast-primary-header-bar .main-header-menu > .menu-item > a {
  color: rgba(255, 255, 255, 0.92) !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  padding: 0 0.75rem !important;
  transition: color 0.2s ease !important;
}

/* Hover gold */
.ast-primary-header-bar .main-header-menu > .menu-item > .menu-link:hover,
.ast-primary-header-bar .main-header-menu > .menu-item:hover > .menu-link {
  color: var(--ahb-gold) !important;
}

/* Current active — gold */
.ast-primary-header-bar .main-header-menu .current-menu-item > .menu-link,
.ast-primary-header-bar .main-header-menu .current_page_item > .menu-link {
  color: var(--ahb-gold) !important;
}

/* Submenu */
.ast-primary-header-bar .sub-menu {
  background: #ffffff !important;
  border: 1px solid rgba(195, 166, 108, 0.25) !important;
  border-radius: 0.75rem !important;
  padding: 0.5rem 0 !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15) !important;
}

.ast-primary-header-bar .sub-menu .menu-link {
  color: var(--ahb-charcoal) !important;
  padding: 0.6rem 1.25rem !important;
  font-size: 0.875rem !important;
}

.ast-primary-header-bar .sub-menu .menu-link:hover {
  background: rgba(195, 166, 108, 0.08) !important;
  color: var(--ahb-gold) !important;
}

/* Astra mobile header override */
.ast-mobile-header-wrap .ast-primary-header-bar {
  background: var(--ahb-green) !important;
}

/* Site title/logo */
.ast-primary-header-bar .site-title a,
.ast-primary-header-bar .site-title,
.ast-primary-header-bar .ast-site-identity a {
  color: #ffffff !important;
}

/* ============= ASTRA FOOTER OVERRIDES ============= */

.site-footer {
  background: var(--ahb-green) !important;
  color: rgba(255, 255, 255, 0.75) !important;
}

.site-footer .widget-title,
.site-footer h1, .site-footer h2, .site-footer h3, .site-footer h4 {
  color: var(--ahb-gold) !important;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.6) !important;
  transition: color 0.3s ease !important;
}

.site-footer a:hover {
  color: var(--ahb-gold) !important;
}

.site-footer .ast-footer-copyright {
  color: rgba(255, 255, 255, 0.4) !important;
}

/* ============= TYPOGRAPHY ============= */

.ahb-active h1,
.ahb-active h2,
.ahb-active h3,
.ahb-active h4,
.ahb-active h5,
.ahb-active h6 {
  color: var(--ahb-green) !important;
  margin-top: 0;
}

.ahb-active a {
  color: var(--ahb-green);
}

/* ============= BUTTONS ============= */

/* Elementor buttons — brand green */
.ahb-active .elementor-button {
  border-radius: 9999px !important;
  font-weight: 600 !important;
}

/* ============= IMAGE ZOOM ============= */

.ahb-img-zoom {
  overflow: hidden !important;
}

.ahb-img-zoom img,
.ahb-img-zoom .elementor-image img,
.ahb-img-zoom .elementor-widget-image img {
  transition: transform 1s ease-out, filter 1s ease-out !important;
}

.ahb-img-zoom:hover img,
.ahb-img-zoom:hover .elementor-image img,
.ahb-img-zoom:hover .elementor-widget-image img {
  transform: scale(1.06) !important;
  filter: brightness(1.05) !important;
}

/* ============= GLASS CARD ============= */

.ahb-glass,
.elementor-widget-wrap > .ahb-glass {
  background: rgba(255, 255, 255, 0.55) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  border-radius: 1rem !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06) !important;
  transition: box-shadow 0.3s ease !important;
}

.ahb-glass:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1) !important;
}

/* ============= ISLAMIC STAR BACKGROUND ============= */

.ahb-star-bg,
.elementor-widget-wrap > .ahb-star-bg {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpolygon points='50,5 61,35 95,35 68,57 79,91 50,70 21,91 32,57 5,35 39,35' fill='%23C3A66C' opacity='0.08'/%3E%3C/svg%3E") !important;
  background-size: 120px 120px !important;
  background-repeat: repeat !important;
}

/* ============= CREAM BACKGROUND ============= */

.ahb-cream-bg,
.elementor-widget-wrap > .ahb-cream-bg {
  background-color: var(--ahb-cream) !important;
}

/* ============= GOLD ACCENT ============= */

.ahb-gold-accent {
  position: relative;
  padding-bottom: 1.25rem;
}

.ahb-gold-accent::after {
  content: '' !important;
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  height: 0.5px !important;
  width: 4rem !important;
  background: var(--ahb-gold) !important;
}

.ahb-rtl .ahb-gold-accent::after,
[dir="rtl"] .ahb-gold-accent::after {
  left: auto !important;
  right: 0 !important;
}

/* ============= GREEN GRADIENT BACKGROUND ============= */

.ahb-green-gradient {
  background: linear-gradient(135deg, var(--ahb-green), var(--ahb-green-dark)) !important;
}

/* ============= STAT NUMBERS ============= */

.ahb-stat-number {
  font-size: clamp(2.25rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--ahb-gold);
}

/* ============= CONTACT CARD ============= */

.ahb-contact-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

.ahb-contact-card-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background: rgba(195, 166, 108, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ahb-contact-card-icon svg {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--ahb-gold);
}

/* ============= SCROLL REVEAL ============= */

[data-ahb-reveal] {
  opacity: 0;
  will-change: transform, opacity;
  transition: opacity 0.8s var(--ease-out-expo),
              transform 0.8s var(--ease-out-expo);
}

[data-ahb-reveal].ahb-revealed {
  opacity: 1;
  transform: translateX(0) translateY(0);
}

[data-ahb-reveal="fade-up"] { transform: translateY(48px); }
[data-ahb-reveal="fade-down"] { transform: translateY(-48px); }
[data-ahb-reveal="fade-left"] { transform: translateX(-48px); }
[data-ahb-reveal="fade-right"] { transform: translateX(48px); }
[data-ahb-reveal="scale"] { transform: scale(0.92); }

/* Stagger delays */
.ahb-stagger > [data-ahb-reveal]:nth-child(1) { transition-delay: 0.05s; }
.ahb-stagger > [data-ahb-reveal]:nth-child(2) { transition-delay: 0.12s; }
.ahb-stagger > [data-ahb-reveal]:nth-child(3) { transition-delay: 0.19s; }
.ahb-stagger > [data-ahb-reveal]:nth-child(4) { transition-delay: 0.26s; }
.ahb-stagger > [data-ahb-reveal]:nth-child(5) { transition-delay: 0.33s; }
.ahb-stagger > [data-ahb-reveal]:nth-child(6) { transition-delay: 0.40s; }
.ahb-stagger > [data-ahb-reveal]:nth-child(7) { transition-delay: 0.47s; }
.ahb-stagger > [data-ahb-reveal]:nth-child(8) { transition-delay: 0.54s; }

/* ============= KEYFRAMES ============= */

@keyframes ahb-fade-up {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes ahb-scale-in {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

/* ============= SECTION PADDING ============= */

.ahb-section-padding {
  padding: 4rem 1rem;
}

@media (min-width: 768px) {
  .ahb-section-padding { padding: 6rem 2rem; }
}

@media (min-width: 1024px) {
  .ahb-section-padding { padding: 6rem 4rem; }
}

/* ============= CONTAINER ============= */

.ahb-container-narrow {
  max-width: 1152px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* ============= UTILITY HELPERS ============= */

.ahb-text-gold { color: var(--ahb-gold) !important; }
.ahb-text-green { color: var(--ahb-green) !important; }
.ahb-bg-green { background: var(--ahb-green) !important; }
.ahb-bg-cream { background: var(--ahb-cream) !important; }

/* ============= HERO OVERLAY GRADIENT ============= */

.ahb-hero-overlay {
  background: linear-gradient(to right, rgba(0,0,0,0.68) 0%, rgba(0,0,0,0.32) 45%, transparent 80%),
              linear-gradient(to top, rgba(0,0,0,0.35) 0%, transparent 40%);
}

.ahb-rtl .ahb-hero-overlay {
  background: linear-gradient(to left, rgba(0,0,0,0.68) 0%, rgba(0,0,0,0.32) 45%, transparent 80%),
              linear-gradient(to top, rgba(0,0,0,0.35) 0%, transparent 40%);
}

/* ============= SCROLLBAR ============= */

.ahb-active ::-webkit-scrollbar { width: 8px; }
.ahb-active ::-webkit-scrollbar-track { background: var(--ahb-cream); }
.ahb-active ::-webkit-scrollbar-thumb { background: var(--ahb-green); border-radius: 4px; }
.ahb-active ::-webkit-scrollbar-thumb:hover { background: var(--ahb-green-dark); }

/* ============= ASTRA BREADCRUMBS HIDE ============= */

.ahb-active .ast-breadcrumbs-wrapper { display: none !important; }

/* ============= ASTRA PAGE HEADER HIDE ============= */

.ahb-active .ast-advanced-headers { display: none !important; }
