/*
 Theme Name:   Quran Lights
 Theme URI:    https://quranlights.com
 Description:  A premium, high-performance child theme for Quran Lights, built on the Astra framework. Focuses on elegant spiritual aesthetics and smooth Gutenberg animations.
 Author:       Antigravity
 Author URI:   https://google.com
 Template:     astra
 Version:      1.0.0
 Text Domain:  quran-lights
*/

/* --- Design System Variables --- */
:root {
  --ql-primary: #0170be; /* Branded Blue */
  --ql-primary-grad: linear-gradient(135deg, #0170be 0%, #005a9c 100%);
  --ql-primary-light: #005a9c;
  --ql-secondary: #e16209; /* Branded Orange */
  --ql-secondary-soft: #ff8533;
  --ql-accent: #e6f4f1; /* Radiant Mist */
  --ql-text-dark: #1f2937;
  --ql-text-light: #4b5563;
  --ql-surface-glass: rgba(255, 255, 255, 0.8);
  --ql-shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.05);
  --ql-shadow-premium: 0 20px 50px rgba(11, 57, 43, 0.1);
  --ql-radius: 16px;
  --ql-transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Base Enhancements --- */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

a,
.wp-block-button__link {
  text-decoration: none !important;
  box-shadow: none !important;
}

/* --- Premium Animations --- */
@keyframes qlFadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ql-animate-up {
  animation: qlFadeInUp 0.8s ease forwards;
}

/* --- Scroll Reveal Foundation --- */
.ql-reveal {
  opacity: 1 !important; /* Always visible */
  transform: translateY(0);
  transition:
    opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1),
    transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Staggered children reveal */
.ql-reveal-active > * {
  animation: qlFadeInUp 0.8s ease forwards;
}

/* Staggered children reveal */
.ql-reveal-active > * {
  animation: qlFadeInUp 0.6s ease forwards;
}

/* --- Block Styling Overrides (Gutenberg) --- */

/* Buttons */
.wp-block-button__link {
  transition: var(--ql-transition) !important;
  border-radius: 50px !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
  text-transform: uppercase !important;
  font-size: 0.9rem !important;
  padding: 14px 32px !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

.wp-block-button__link:hover {
  background-color: #ffffff !important;
  color: var(--ql-primary) !important;
  border: 1px solid var(--ql-primary) !important;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 20px rgba(1, 112, 190, 0.1) !important;
}

/* Group Blocks (Cards) */
.wp-block-group.ql-card {
  background: white;
  padding: 2.5rem !important;
  border-radius: var(--ql-radius);
  box-shadow: var(--ql-shadow-soft);
  transition: var(--ql-transition);
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.wp-block-group.ql-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--ql-shadow-premium);
}

/* Quote Block */
.wp-block-quote {
  border-left: 4px solid var(--ql-secondary) !important;
  padding-left: 2rem !important;
  font-style: italic;
  color: var(--ql-primary-light);
  background: var(--ql-accent);
  padding: 24px !important;
  border-radius: 0 12px 12px 0;
}

/* Image Block */
.wp-block-image img {
  border-radius: var(--ql-radius);
  transition: var(--ql-transition);
}

.wp-block-image:hover img {
  transform: scale(1.02);
}

/* Lists */
.entry-content ul li {
  position: relative;
  padding-left: 1.5rem;
  list-style: none !important;
  margin-bottom: 0.8rem;
}

.entry-content ul li::before {
  content: "•";
  color: var(--ql-secondary);
  font-weight: bold;
  position: absolute;
  left: 0;
  font-size: 1.2rem;
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--ql-primary);
  font-weight: 700;
  line-height: 1.25;
}

/* --- Header Polish --- */
.main-header-bar {
  backdrop-filter: blur(0px);
  background-color: transparent !important;
  transition: var(--ql-transition) !important;
  border-bottom: 1px solid transparent !important;
  position: fixed !important;
  width: 100%;
  z-index: 9999;
}

.main-header-bar.header-scrolled {
  backdrop-filter: blur(12px);
  background-color: var(--ql-surface-glass) !important;
  border-bottom: 1px solid rgba(11, 57, 43, 0.1) !important;
  padding-top: 5px !important;
  padding-bottom: 5px !important;
}

/* --- Premium Hero & Pattern Logic (New Palette) --- */
.ql-hero-container {
  position: relative;
  background-color: #0170be !important;
  overflow: hidden;
}

.ql-islamic-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.15;
  pointer-events: none;
  background-image: url("http://quranlights.local/wp-content/uploads/2025/05/pattern.jpg");
  background-repeat: repeat;
  background-size: 300px;
}

.ql-hero-title {
  color: #ffffff !important;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.ql-hero-subtitle {
  color: #ffffff !important;
  letter-spacing: 4px;
  opacity: 0.95;
  font-weight: 500;
}

/* --- Subtle Pattern Utility --- */
.ql-pattern-light {
  position: relative;
}

.ql-pattern-light::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.08;
  pointer-events: none;
  background-image: url("http://quranlights.local/wp-content/uploads/2025/05/pattern.jpg");
  background-repeat: repeat;
  background-size: 250px;
  z-index: 0;
}

.ql-pattern-light > * {
  position: relative;
  z-index: 1;
}

/* --- ASTRA HEADER BUTTON MODERNIZATION --- */
.ast-header-button-1 .ast-custom-button-link {
  background-color: #e16209 !important;
  color: #ffffff !important;
  padding: 12px 28px !important;
  border-radius: 9999px !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  font-size: 13px !important;
  transition: all 0.3s ease !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 4px 15px rgba(225, 98, 9, 0.2) !important;
}

/* Hide redundant duplicate link */
.ast-header-button-1 .menu-link {
  display: none !important;
}

.ast-header-button-1 .ast-custom-button-link:hover {
  background-color: #0170be !important;
  transform: translateY(-2px) scale(1.05) !important;
  box-shadow: 0 6px 20px rgba(1, 112, 190, 0.3) !important;
  color: #ffffff !important;
}

.ast-header-button-1 .ast-custom-button {
  background: transparent !important;
  padding: 0 !important;
  color: inherit !important;
}

/* --- PREMIUM ISLAMIC FOOTER --- */
.site-footer {
  background-color: #012946 !important; /* Deep Spiritual Blue */
  color: #ffffff !important;
  position: relative;
  overflow: hidden;
  border-top: 5px solid #e16209; /* Signature Orange Top Border */
  font-family: var(
    --ast-global-font-family-body,
    "Inter",
    sans-serif
  ) !important;
}

/* Subtle Pattern Overlay for Footer */
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("http://quranlights.local/wp-content/uploads/2025/05/pattern.jpg");
  background-repeat: repeat;
  background-size: 200px;
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
}

.site-footer .widget-title,
.site-footer h1,
.site-footer h2,
.site-footer h3,
.site-footer h4 {
  color: #e16209 !important; /* Orange Headings */
  font-family: "Montserrat", sans-serif !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 2px !important;
  font-size: 1.2rem !important;
  margin-bottom: 25px !important;
  position: relative;
  z-index: 1;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.8) !important;
  text-decoration: none !important;
  transition: all 0.3s ease !important;
  font-weight: 500 !important;
}

.site-footer a:hover {
  color: #e16209 !important;
  padding-left: 5px !important;
}

.site-footer .footer-stack {
  position: relative;
  z-index: 1;
}

.site-footer .site-below-footer-wrap {
  background-color: rgba(0, 0, 0, 0.2) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
  padding: 20px 0 !important;
}

/* --- PREMIUM SCROLL TO TOP BUTTON --- */
#ast-scroll-top {
  background-color: #e16209 !important;
  color: #ffffff !important;
  border-radius: 50% !important;
  width: 50px !important;
  height: 50px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 10px 25px rgba(225, 98, 9, 0.4) !important;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  bottom: 30px !important;
  right: 30px !important;
  border: 2px solid rgba(255, 255, 255, 0.2) !important;
  z-index: 9999 !important;

  /* Initially hidden for the 20% scroll logic */
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateY(20px) !important;
}

#ast-scroll-top.ql-scroll-visible {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translateY(0px) !important;
}

#ast-scroll-top .ast-icon svg {
  fill: #ffffff !important;
  width: 20px !important;
  height: 20px !important;
  transition: transform 0.4s ease !important;
}

#ast-scroll-top:hover {
  background-color: #0170be !important;
  transform: translateY(-8px) scale(1.1) !important;
  box-shadow: 0 15px 35px rgba(1, 112, 190, 0.5) !important;
}

#ast-scroll-top:hover .ast-icon svg {
  transform: translateY(-3px);
}

@keyframes ql-float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-5px);
  }
  100% {
    transform: translateY(0px);
  }
}

#ast-scroll-top {
  animation: ql-float 3s ease-in-out infinite;
}

/* --- BLOG LISTING & SINGLE POST ENHANCEMENTS --- */

/* Archive & Blog Hero Title Section */
.ast-archive-description,
.blog-header-section {
  display: block !important;
  padding: 180px 20px 80px !important;
  background-color: #ffffff !important;
  text-align: center;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 60px;
  position: relative;
  overflow: hidden;
}

/* Pattern overlay for Blog Header */
.ast-archive-description::before,
.blog-header-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("http://quranlights.local/wp-content/uploads/2025/05/pattern.jpg");
  background-repeat: repeat;
  background-size: 200px;
  opacity: 0.1;
  pointer-events: none;
  z-index: 0;
}

.ast-archive-title,
.blog-title {
  font-family: "Montserrat", sans-serif !important;
  font-size: 4rem !important;
  font-weight: 950 !important;
  color: #0170be !important;
  text-transform: uppercase;
  letter-spacing: -2px;
  position: relative;
  z-index: 1;
}

/* Blog Post Cards */
.ast-article-post {
  background: #ffffff !important;
  border-radius: 40px !important;
  overflow: hidden !important;
  box-shadow: 0 10px 40px rgba(1, 112, 190, 0.05) !important;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  border: 1px solid #f0f0f0 !important;
  margin-bottom: 50px !important;
  padding: 0 !important;
}

.ast-article-post:hover {
  transform: translateY(-15px);
  box-shadow: 0 30px 60px rgba(1, 112, 190, 0.12) !important;
  border-color: #e16209 !important;
}

.ast-article-post .post-content {
  padding: 40px !important;
}

/* Featured Images Styling */
.ast-article-post .ast-blog-featured-section img {
  border-radius: 0 !important; /* Keep edge-to-edge in card */
  transition: transform 0.8s cubic-bezier(0.2, 0, 0.2, 1) !important;
}

.ast-article-post:hover .ast-blog-featured-section img {
  transform: scale(1.08);
}

/* Typography & Titles */
.entry-title a {
  color: #0170be !important;
  text-decoration: none !important;
  font-weight: 900 !important;
  transition: color 0.3s ease;
}

.entry-title a:hover {
  color: #e16209 !important;
}

/* Read More transformed into a Premium Button */
.ast-article-post .read-more {
  display: inline-block !important;
  margin-top: 25px;
  background-color: #e16209 !important;
  color: #ffffff !important;
  padding: 12px 30px !important;
  border-radius: 9999px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  font-size: 12px !important;
  letter-spacing: 2px !important;
  transition: all 0.3s ease !important;
  text-decoration: none !important;
}

.ast-article-post .read-more:hover {
  background-color: #0170be !important;
  transform: scale(1.05);
  box-shadow: 0 10px 20px rgba(1, 112, 190, 0.2);
}

/* --- SINGLE POST ENHANCEMENTS --- */
.single-post .entry-header {
  text-align: center;
  max-width: 900px;
  margin: 0 auto 60px;
}

.single-post .entry-title {
  font-size: 3.5rem !important;
  line-height: 1.1;
  color: #0170be !important;
}

.single-post .post-thumb img {
  border-radius: 60px !important;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.12) !important;
  margin-bottom: 60px !important;
}

.single-post .entry-content {
  font-size: 20px;
  line-height: 1.9;
  color: #333333;
  max-width: 800px;
  margin: 0 auto;
}

/* --- BLOG & PAGINATION STYLING --- */
.ql-pagination .nav-links {
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
}

.ql-pagination .page-numbers {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: 50%;
  color: #0170be !important;
  font-weight: 900;
  text-decoration: none !important;
  box-shadow: 0 8px 20px rgba(1, 112, 190, 0.08);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-size: 14px;
}

.ql-pagination .page-numbers.current,
.ql-pagination .page-numbers:hover {
  background: #e16209 !important;
  color: #ffffff !important;
  transform: scale(1.15) translateY(-5px);
  box-shadow: 0 12px 25px rgba(225, 98, 9, 0.3);
}

.ql-pagination .prev,
.ql-pagination .next {
  width: auto !important;
  padding: 0 25px !important;
  border-radius: 9999px !important;
}

.post-meta-category a {
  color: #e16209 !important;
  text-decoration: none !important;
  font-weight: 900;
}

.post-meta-category a:hover {
  color: #0170be !important;
}

/* --- PRICING TAB SWITCHER --- */
.ql-tab-btn.active {
  box-shadow: 0 10px 20px rgba(1, 112, 190, 0.2) !important;
  transform: scale(1.05) !important;
}

.ql-tab-content.hidden {
  display: none !important;
}

.ql-tab-content {
  animation: ql-fade-in 0.5s ease;
}

@keyframes ql-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- COMPREHENSIVE RESPONSIVE SYSTEM --- */

/* Tablet & Smaller Screens (< 1024px) */
@media (max-width: 1024px) {
  /* Responsive Padding Reset */
  [style*="padding-top:180px"] {
    padding-top: 130px !important;
  }

  /* Typography Scaling */
  h1,
  .text-7xl,
  .text-8xl {
    font-size: clamp(3rem, 10vw, 4.5rem) !important;
    line-height: 1.1 !important;
  }

  h2,
  .text-6xl {
    font-size: clamp(2.5rem, 8vw, 3.5rem) !important;
  }

  /* Mobile Spacing */
  .py-40,
  .py-32,
  .py-28 {
    padding-top: 60px !important;
    padding-bottom: 60px !important;
  }
}

/* Mobile Specific (< 768px) */
@media (max-width: 767px) {
  /* Grid Resets */
  .grid-cols-2,
  .lg:grid-cols-2 {
    grid-template-columns: 1fr !important;
  }

  /* Content Centering */
  .text-left {
    text-align: center !important;
  }

  .mx-0 {
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Pricing Card Reset */
  .ql-tab-btn {
    padding: 12px 15px !important;
    font-size: 10px !important;
  }
}

/* --- PREMIUM MOBILE MENU STYLING --- */

/* Hamburger Button */
.menu-toggle,
.ast-mobile-menu-buttons .menu-toggle {
  background-color: #0170be !important;
  color: #ffffff !important;
  border-radius: 12px !important;
  padding: 10px !important;
}

/* Header Background on Mobile */
.ast-mobile-header-wrap .main-header-bar {
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(10px);
}

/* Navigation Links in Mobile Menu */
.ast-header-break-point .main-header-menu .menu-item a {
  color: #0170be !important;
  font-family: "Montserrat", sans-serif !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  font-size: 14px !important;
  letter-spacing: 1px !important;
  padding: 20px !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.ast-header-break-point .main-header-menu .menu-item a:hover {
  color: #e16209 !important;
  padding-left: 25px !important; /* Dynamic hover effect */
}

/* Mobile Menu Branding */
#ast-mobile-header .site-branding img {
  max-width: 180px !important;
}

/* Fix for Button in Mobile Menu */
.ast-mobile-header-content .ast-builder-button-wrap .ast-custom-button-link {
  display: inline-flex !important;
  width: auto !important;
  margin: 20px !important;
}
