/*
Theme Name: As-Sirat Al-Mustaqim Institute
Theme URI: https://assiratalmustaqim.com/
Author: StableRakib aka. Rakibuzzaman
Author URI: https://stablerakib.com/
Description: High-performance, accessible, bilingual (EN/BN) international Islamic foundation & Ruqyah Shariah WordPress theme featuring a matte emerald-and-gold design, Customizer controls, 4 native Custom Post Types, and confidential AJAX consultation handling.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: as-sirat-al-mustaqim
Tags: custom-logo, custom-menu, featured-images, right-sidebar, theme-options, translation-ready, accessibility-ready
*/

/* ==========================================================================

Root Design Tokens, Smooth Anchor Offset & Typography
========================================================================== */
:root {
--asam-base: #0a1a14;
--asam-card: #10261e;
--asam-emerald: #0f382c;
--asam-teal: #164e3d;
--asam-gold: #c59b27;
--asam-gold-light: #e4bf5b;
--asam-sand: #fbf9f5;
--asam-sand-dark: #f2ece1;
}

html {
scroll-behavior: smooth;
/* Prevents the sticky header from overlapping anchored section headings */
scroll-padding-top: 5.5rem;
}

body {
font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background-color: var(--asam-sand);
color: #1e293b;
/* overflow-x: clip blocks horizontal scroll while preserving position: sticky */
overflow-x: clip;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

body.font-bengali {
font-family: 'Noto Sans Bengali', 'Plus Jakarta Sans', sans-serif;
}

body.modal-open {
overflow: hidden;
}

/* ==========================================================================
2. WordPress Admin Bar Compatibility (Sticky Header & Sticky Sidebar)
========================================================================== */
body.admin-bar .asam-site-header {
top: 32px;
}

@media screen and (min-width: 1024px) {
body.admin-bar .asam-sidebar {
top: calc(6rem + 32px);
}
}

@media screen and (max-width: 782px) {
body.admin-bar .asam-site-header {
top: 46px;
}
}

@media screen and (max-width: 600px) {
body.admin-bar .asam-site-header {
top: 0;
}
}

/* ==========================================================================
3. Animated Matte Mesh Backgrounds (Optimized Cycle Speeds)
========================================================================== */
.animated-bg-aurora {
background: linear-gradient(135deg, #071912 0%, #0d2c22 45%, #153c30 75%, #081a14 100%);
background-size: 260% 260%;
animation: auroraShift 18s ease infinite;
}

.animated-bg-light {
background: linear-gradient(135deg, #fbf9f5 0%, #f4ede0 40%, #edf4f0 70%, #fbf9f5 100%);
background-size: 260% 260%;
animation: auroraShift 20s ease infinite;
}

.animated-bg-dark-mesh {
background: linear-gradient(135deg, #091c15 0%, #112d23 50%, #0b221a 100%);
background-size: 220% 220%;
animation: auroraShift 16s ease infinite;
}

@keyframes auroraShift {
0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
100% { background-position: 0% 50%; }
}

/* ==========================================================================
4. Subtle Geometric Sacred Pattern Overlays
========================================================================== */
.islamic-pattern-subtle {
background-image:
radial-gradient(#c59b27 0.8px, transparent 0.8px),
radial-gradient(#164e3d 0.8px, #fbf9f5 0.8px);
background-size: 32px 32px;
background-position: 0 0, 16px 16px;
opacity: 0.05;
}

.islamic-pattern-dark {
background-image: radial-gradient(rgba(197, 155, 39, 0.25) 1px, transparent 1px);
background-size: 28px 28px;
}

/* ==========================================================================
5. 3D Lift & Elevated Card Transitions (Fine Pointer Only for Mobile UX)
========================================================================== */
.card-3d-lift {
transition:
transform 0.42s cubic-bezier(0.165, 0.84, 0.44, 1),
box-shadow 0.42s cubic-bezier(0.165, 0.84, 0.44, 1),
border-color 0.3s ease;
}

.card-hover-noticeable {
transition:
transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
box-shadow 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
border-color 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
.card-3d-lift:hover {
transform: translateY(-18px) scale(1.02) perspective(1000px) rotateX(1.8deg);
box-shadow: 0 34px 66px -15px rgba(7, 30, 22, 0.38), 0 0 28px rgba(197, 155, 39, 0.22);
}

.card-hover-noticeable:hover {
	transform: translateY(-10px);
	box-shadow: 0 24px 44px -10px rgba(10, 35, 27, 0.16);
}


}

/* ==========================================================================
6. GPU-Accelerated Infinite Symptoms Marquee (Touch & Drag Ready)
========================================================================== */
.slider-wrapper {
position: relative;
overflow: hidden;
width: 100%;
cursor: grab;
touch-action: pan-y;
mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
-webkit-mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
}

.slider-wrapper:active {
cursor: grabbing;
}

.slider-track {
display: flex;
gap: 1.25rem;
width: max-content;
will-change: transform;
}

@media (min-width: 640px) {
.slider-track {
gap: 1.5rem;
}
}

/* ==========================================================================
7. Floating Action Pulse Rings (--pulse-color Preserves Pure White Icons)
========================================================================== */
@keyframes pulseRing {
0% { transform: scale(0.95); opacity: 0.75; }
65% { transform: scale(1.3); opacity: 0; }
100% { transform: scale(0.95); opacity: 0; }
}

.pulse-ring {
position: relative;
isolation: isolate;
}

.pulse-ring::before {
content: '';
position: absolute;
inset: -4px;
border-radius: 9999px;
background: var(--pulse-color, #10b981);
opacity: 0.4;
animation: pulseRing 2.4s infinite ease-out;
z-index: -1;
pointer-events: none;
}

/* ==========================================================================
8. Typewriter Cursor, Circular Gauge & Media Shimmer
========================================================================== */
@keyframes cursorBlink {
0%, 49% { opacity: 1; }
50%, 100% { opacity: 0; }
}

.typewriter-cursor {
display: inline-block;
width: 3px;
height: 0.95em;
background-color: var(--asam-gold-light);
margin-left: 5px;
vertical-align: -0.1em;
animation: cursorBlink 0.9s infinite;
box-shadow: 0 0 12px rgba(228, 191, 91, 0.8);
}

.progress-ring-circle {
transform: rotate(-90deg);
transform-origin: 50% 50%;
filter: drop-shadow(0 0 8px rgba(228, 191, 91, 0.45));
}

@keyframes meterShimmer {
0%, 100% { filter: drop-shadow(0 0 6px rgba(197, 155, 39, 0.35)); }
50% { filter: drop-shadow(0 0 14px rgba(16, 185, 129, 0.6)); }
}

.meter-active-glow {
animation: meterShimmer 3.2s ease-in-out infinite;
}

@keyframes subtleShimmer {
0% { background-position: -200% 0; }
100% { background-position: 200% 0; }
}

.placeholder-shimmer {
background: linear-gradient(90deg, rgba(16, 38, 30, 0.92) 25%, rgba(22, 78, 61, 0.55) 50%, rgba(16, 38, 30, 0.92) 75%);
background-size: 200% 100%;
animation: subtleShimmer 6s infinite linear;
}

/* ==========================================================================
9. WordPress Editorial Prose & Block Content (.asam-prose)
========================================================================== */
.asam-prose > *:first-child {
margin-top: 0;
}

.asam-prose > *:last-child {
margin-bottom: 0;
}

.asam-prose p {
margin-bottom: 1.25rem;
line-height: 1.8;
}

.asam-prose h2,
.asam-prose h3,
.asam-prose h4 {
font-weight: 800;
color: #0f172a;
line-height: 1.3;
margin-top: 2rem;
margin-bottom: 0.75rem;
}

.asam-prose h2 { font-size: 1.5rem; }
.asam-prose h3 { font-size: 1.25rem; }
.asam-prose h4 { font-size: 1.125rem; }

.asam-prose ul,
.asam-prose ol {
margin-bottom: 1.25rem;
padding-left: 1.5rem;
}

.asam-prose ul { list-style-type: disc; }
.asam-prose ol { list-style-type: decimal; }

.asam-prose li {
margin-bottom: 0.45rem;
line-height: 1.7;
}

.asam-prose a {
color: var(--asam-emerald);
font-weight: 600;
text-decoration: underline;
text-decoration-color: var(--asam-gold);
text-underline-offset: 3px;
transition: color 0.2s ease;
}

.asam-prose a:hover {
color: #b45309;
}

.asam-prose blockquote {
border-left: 4px solid var(--asam-gold);
background: var(--asam-sand);
padding: 1rem 1.25rem;
border-radius: 0 0.75rem 0.75rem 0;
margin: 1.5rem 0;
font-style: italic;
color: #334155;
}

.asam-prose hr {
border: 0;
border-top: 1px solid #e2e8f0;
margin: 2rem 0;
}

.asam-prose code {
background: #f1f5f9;
color: var(--asam-emerald);
padding: 0.15rem 0.4rem;
border-radius: 0.375rem;
font-size: 0.875em;
}

.asam-prose pre {
background: var(--asam-base);
color: #e2e8f0;
padding: 1.15rem;
border-radius: 0.875rem;
overflow-x: auto;
margin: 1.5rem 0;
font-size: 0.875rem;
}

.asam-prose pre code {
background: transparent;
color: inherit;
padding: 0;
}

.asam-prose img,
.asam-prose figure img {
border-radius: 1rem;
height: auto;
max-width: 100%;
}

.asam-prose figcaption {
font-size: 0.75rem;
color: #64748b;
margin-top: 0.5rem;
text-align: center;
}

.asam-prose table {
width: 100%;
border-collapse: collapse;
margin: 1.5rem 0;
font-size: 0.875rem;
display: block;
overflow-x: auto;
}

.asam-prose th,
.asam-prose td {
border: 1px solid #e2e8f0;
padding: 0.65rem 0.85rem;
text-align: left;
}

.asam-prose th {
background: var(--asam-sand);
font-weight: 700;
color: #0f172a;
}

.asam-prose iframe,
.asam-prose video {
max-width: 100%;
border-radius: 1rem;
}

/* ==========================================================================
10. WordPress Menus, Active States, Widgets & Comments Styling
========================================================================== */
.asam-site-header .current-menu-item > a,
.asam-site-header .current_page_item > a {
color: var(--asam-gold-light);
font-weight: 700;
}

.asam-mobile-wp-menu li a {
display: block;
padding: 0.75rem 0;
transition: color 0.2s ease;
}

.asam-mobile-wp-menu li a:hover {
color: var(--asam-gold-light);
}

.asam-widget ul {
list-style: none;
margin: 0;
padding: 0;
}

.asam-widget ul li {
padding: 0.45rem 0;
border-bottom: 1px solid #f1f5f9;
font-size: 0.875rem;
}

.asam-widget ul li:last-child {
border-bottom: 0;
padding-bottom: 0;
}

.asam-widget ul li a {
color: #334155;
font-weight: 500;
transition: color 0.2s ease;
}

.asam-widget ul li a:hover {
color: var(--asam-teal);
}

.asam-widget input[type='search'],
.asam-widget input[type='text'],
.asam-widget select {
width: 100%;
padding: 0.625rem 0.875rem;
border-radius: 0.75rem;
border: 1px solid #cbd5e1;
font-size: 0.875rem;
background-color: #ffffff;
}

.asam-widget input:focus,
.asam-widget select:focus,
.comment-form textarea:focus,
.comment-form input:focus {
outline: none;
border-color: var(--asam-gold);
box-shadow: 0 0 0 2px rgba(197, 155, 39, 0.35);
}

.asam-widget button[type='submit'],
.asam-widget input[type='submit'],
.comment-form input[type='submit'] {
margin-top: 0.5rem;
padding: 0.65rem 1.25rem;
border-radius: 0.75rem;
background: var(--asam-gold);
color: #020617;
font-weight: 700;
font-size: 0.875rem;
cursor: pointer;
border: 0;
transition: background-color 0.2s ease;
}

.asam-widget button[type='submit']:hover,
.asam-widget input[type='submit']:hover,
.comment-form input[type='submit']:hover {
background: var(--asam-gold-light);
}

.comment-list {
list-style: none;
padding: 0;
margin: 1.5rem 0;
}

.comment-list .children {
list-style: none;
padding-left: 1.25rem;
margin-top: 0.75rem;
}

.comment-list .comment-body {
padding: 1.25rem;
border-radius: 1rem;
background: var(--asam-sand);
border: 1px solid #e2e8f0;
margin-bottom: 1rem;
}

.comment-list .comment-meta {
font-size: 0.75rem;
color: #64748b;
margin-bottom: 0.5rem;
}

.comment-list .comment-reply-link {
display: inline-block;
margin-top: 0.5rem;
font-size: 0.75rem;
font-weight: 700;
color: var(--asam-teal);
}

.comment-form p {
margin-bottom: 1rem;
font-size: 0.875rem;
color: #475569;
}

.comment-form textarea,
.comment-form input[type='text'],
.comment-form input[type='email'],
.comment-form input[type='url'] {
width: 100%;
padding: 0.65rem 1rem;
border-radius: 0.75rem;
border: 1px solid #cbd5e1;
font-size: 0.875rem;
margin-top: 0.25rem;
}

/* ==========================================================================
11. WordPress Core Required Classes (Accessibility & Alignment Compliance)
========================================================================== */
.screen-reader-text {
border: 0;
clip: rect(1px, 1px, 1px, 1px);
clip-path: inset(50%);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
word-wrap: normal !important;
}

.screen-reader-text:focus {
background-color: var(--asam-gold);
border-radius: 0.75rem;
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
clip: auto !important;
clip-path: none;
color: #020617;
display: block;
font-size: 0.875rem;
font-weight: 700;
height: auto;
left: 1rem;
line-height: normal;
padding: 0.75rem 1.25rem;
text-decoration: none;
top: 1rem;
width: auto;
z-index: 100000;
}

.alignleft {
float: left;
margin: 0.375rem 1.5rem 1rem 0;
}

.alignright {
float: right;
margin: 0.375rem 0 1rem 1.5rem;
}

.aligncenter {
clear: both;
display: block;
margin: 1.5rem auto;
}

.wp-caption {
max-width: 100%;
margin-bottom: 1.5rem;
}

.wp-caption-text,
.gallery-caption {
font-size: 0.75rem;
color: #64748b;
margin-top: 0.5rem;
text-align: center;
}

.sticky {
display: block;
}

.bypostauthor {
border-left: 3px solid var(--asam-gold);
}

/* ==========================================================================
12. WCAG Reduced Motion Compliance
========================================================================== */
@media (prefers-reduced-motion: reduce) {
html {
scroll-behavior: auto;
}

.animated-bg-aurora,
.animated-bg-light,
.animated-bg-dark-mesh,
.pulse-ring::before,
.typewriter-cursor,
.meter-active-glow,
.placeholder-shimmer,
.animate-ping,
.animate-pulse {
	animation: none !important;
}

.card-3d-lift,
.card-hover-noticeable {
	transition: none !important;
}

.slider-wrapper {
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	mask-image: none;
	-webkit-mask-image: none;
}

.slider-track > * {
	scroll-snap-align: start;
}


}

/* ==========================================================================
13. Print Styles (Clean Printable Masail, Fatwas & Articles)
========================================================================== */
@media print {
.asam-site-header,
.asam-sidebar,
.pulse-ring,
footer.bg-slate-950,
#tallyModal,
#mediaPreviewModal {
display: none !important;
}

body {
	background: #ffffff !important;
	color: #000000 !important;
}

article {
	box-shadow: none !important;
	border-color: #cbd5e1 !important;
}


}