/**
 * Al-Azhar Message Theme - Main Stylesheet
 * Version: 1.0.0
 */

/* ==========================================================================
   1. RESET & BASE
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--alazhar-font-ar-body);
    font-size: var(--alazhar-base-size, 16px);
    line-height: 1.6;
    color: var(--alazhar-text);
    background-color: var(--alazhar-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

img {
    vertical-align: middle;
}

a {
    color: var(--alazhar-primary);
    text-decoration: none;
    transition: color var(--alazhar-transition);
}

a:hover,
a:focus {
    color: var(--alazhar-cta);
}

a:focus-visible {
    outline: 2px solid var(--alazhar-cta);
    outline-offset: 2px;
    border-radius: 2px;
}

button {
    font-family: inherit;
    cursor: pointer;
}

/* ==========================================================================
   2. TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--alazhar-font-ar-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--alazhar-secondary);
    margin: 0 0 1rem;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.375rem, 3vw, 2rem); }
h4 { font-size: clamp(1.125rem, 2.5vw, 1.5rem); }
h5 { font-size: clamp(1rem, 2vw, 1.25rem); }
h6 { font-size: 1rem; }

p { margin: 0 0 1rem; }

/* For latin text within body */
:lang(en) {
    font-family: var(--alazhar-font-en-body);
}

:lang(en) h1,
:lang(en) h2,
:lang(en) h3,
:lang(en) h4,
:lang(en) h5,
:lang(en) h6 {
    font-family: var(--alazhar-font-en-heading);
}

/* ==========================================================================
   3. LAYOUT & CONTAINERS
   ========================================================================== */

.alazhar-container {
    width: 100%;
    max-width: var(--alazhar-container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.site {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1;
}

/* ==========================================================================
   4. BUTTONS
   ========================================================================== */

.alazhar-btn,
input[type="submit"],
button[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    border: 0;
    border-radius: var(--alazhar-radius-md);
    cursor: pointer;
    transition: var(--alazhar-transition);
    white-space: nowrap;
    text-align: center;
    user-select: none;
}

.alazhar-btn-primary {
    background: var(--alazhar-primary);
    color: #fff;
}
.alazhar-btn-primary:hover,
.alazhar-btn-primary:focus {
    background: #035a30;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--alazhar-shadow-md);
}

.alazhar-btn-gold {
    background: linear-gradient(135deg, var(--alazhar-cta), #B8941E);
    color: var(--alazhar-secondary);
    box-shadow: 0 4px 14px rgba(234, 179, 8, 0.3);
}
.alazhar-btn-gold:hover,
.alazhar-btn-gold:focus {
    background: linear-gradient(135deg, #E5BD3F, var(--alazhar-cta));
    color: var(--alazhar-secondary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(234, 179, 8, 0.5);
}

.alazhar-btn-outline {
    background: transparent;
    color: var(--alazhar-primary);
    border: 2px solid var(--alazhar-primary);
}
.alazhar-btn-outline:hover,
.alazhar-btn-outline:focus {
    background: var(--alazhar-primary);
    color: #fff;
}

.alazhar-btn-outline-light {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.5);
}
.alazhar-btn-outline-light:hover,
.alazhar-btn-outline-light:focus {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-color: #fff;
}

.alazhar-btn-lg {
    padding: 1.125rem 2.25rem;
    font-size: 1.125rem;
}

.alazhar-btn-sm {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
}

.alazhar-btn-block {
    display: flex;
    width: 100%;
}

/* ==========================================================================
   5. TOP BAR
   ========================================================================== */

.alazhar-top-bar {
    background: var(--alazhar-secondary);
    color: #fff;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.top-bar-left,
.top-bar-right {
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

.top-bar-link {
    color: #fff;
    opacity: 0.85;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    direction: ltr;
}

.top-bar-link:hover {
    color: var(--alazhar-cta);
    opacity: 1;
}

.top-bar-center {
    color: var(--alazhar-cta);
    font-weight: 500;
    flex: 1;
    text-align: center;
}

@media (max-width: 768px) {
    .top-bar-left,
    .top-bar-right {
        display: none;
    }
    .top-bar-center {
        font-size: 0.8rem;
    }
}

/* ==========================================================================
   6. NAVIGATION
   ========================================================================== */

.alazhar-main-nav {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: var(--alazhar-transition);
}

.alazhar-main-nav.sticky-header {
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.site-branding img,
.custom-logo {
    max-height: 60px;
    width: auto;
}

.primary-menu-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
}

.primary-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
    align-items: center;
}

.primary-menu > li > a {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.625rem 1rem;
    color: var(--alazhar-secondary);
    font-weight: 500;
    font-size: 0.9375rem;
    border-radius: var(--alazhar-radius-sm);
    transition: var(--alazhar-transition);
    text-decoration: none;
}

.primary-menu > li > a:hover,
.primary-menu > li.current-menu-item > a {
    color: var(--alazhar-primary);
    background: rgba(107, 33, 168, 0.05);
}

.primary-menu .sub-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 220px;
    background: #fff;
    border-radius: var(--alazhar-radius-md);
    box-shadow: var(--alazhar-shadow-lg);
    padding: 0.5rem;
    list-style: none;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--alazhar-transition);
    z-index: 50;
}

.primary-menu > li {
    position: relative;
}

.primary-menu > li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.primary-menu .sub-menu a {
    display: block;
    padding: 0.625rem 1rem;
    color: var(--alazhar-secondary);
    text-decoration: none;
    border-radius: var(--alazhar-radius-sm);
}

.primary-menu .sub-menu a:hover {
    background: var(--alazhar-bg);
    color: var(--alazhar-primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-whatsapp-link {
    width: 44px;
    height: 44px;
    background: #25D366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    text-decoration: none;
    transition: var(--alazhar-transition);
}

.nav-whatsapp-link:hover {
    background: #1ea952;
    color: #fff;
    transform: scale(1.05);
}

.mobile-menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.hamburger-line {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--alazhar-secondary);
    border-radius: 2px;
    transition: var(--alazhar-transition);
}

@media (max-width: 1024px) {
    .primary-menu-wrapper {
        display: none;
    }
    .mobile-menu-toggle {
        display: flex;
    }
    .nav-cta span {
        display: none;
    }
}

/* ==========================================================================
   7. MOBILE MENU
   ========================================================================== */

.mobile-menu-drawer {
    position: fixed;
    inset: 0;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: var(--alazhar-transition);
}

.mobile-menu-drawer.is-open {
    pointer-events: auto;
    opacity: 1;
}

.mobile-menu-overlay {
    position: absolute;
    inset: 0;
    background: rgba(59, 7, 100, 0.6);
    backdrop-filter: blur(4px);
}

.mobile-menu-inner {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(380px, 90vw);
    background: #fff;
    padding: 1.5rem;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-drawer.is-open .mobile-menu-inner {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--alazhar-border);
    margin-bottom: 1.5rem;
}

.mobile-menu-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--alazhar-secondary);
}

.mobile-menu-close {
    width: 40px;
    height: 40px;
    background: var(--alazhar-bg);
    border: 0;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--alazhar-secondary);
}

.mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-list li {
    border-bottom: 1px solid var(--alazhar-border);
}

.mobile-menu-list a {
    display: block;
    padding: 1rem 0.5rem;
    color: var(--alazhar-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--alazhar-transition);
}

.mobile-menu-list a:hover {
    color: var(--alazhar-primary);
    padding-right: 1rem;
}

.mobile-menu-footer {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--alazhar-border);
}

.mobile-menu-footer .alazhar-btn {
    margin-bottom: 0.75rem;
}

.mobile-social-icon {
    width: 40px;
    height: 40px;
    background: var(--alazhar-bg);
    color: var(--alazhar-primary);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--alazhar-transition);
}

.mobile-social-icon:hover {
    background: var(--alazhar-primary);
    color: #fff;
}

/* ==========================================================================
   8. SECTIONS - HOVER EFFECTS
   ========================================================================== */

.pillar-card:hover,
.course-card:hover,
.testimonial-card:hover,
.teacher-card:hover,
.step-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--alazhar-shadow-lg);
    border-color: var(--alazhar-primary);
}

.course-card:hover img {
    transform: scale(1.08);
}

.alazhar-courses-grid .course-card,
.courses-grid .course-card {
    height: 100%;
}

/* ==========================================================================
   9. FAQ ACCORDION
   ========================================================================== */

.faq-item.is-open .faq-answer {
    max-height: 1000px !important;
}

.faq-item.is-open .faq-icon {
    transform: rotate(45deg);
}

.faq-item:hover {
    border-color: var(--alazhar-primary) !important;
    box-shadow: var(--alazhar-shadow-sm);
}

/* ==========================================================================
   10. FORMS
   ========================================================================== */

.alazhar-form input,
.alazhar-form select,
.alazhar-form textarea {
    font-family: inherit;
    font-size: 1rem;
    transition: border-color var(--alazhar-transition);
}

.alazhar-form input:focus,
.alazhar-form select:focus,
.alazhar-form textarea:focus {
    outline: none;
    border-color: var(--alazhar-primary) !important;
    box-shadow: 0 0 0 3px rgba(107, 33, 168, 0.1);
}

/* ==========================================================================
   11. FLOATING WHATSAPP
   ========================================================================== */

.alazhar-floating-whatsapp {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
    text-decoration: none;
    z-index: 99;
    transition: var(--alazhar-transition);
}

.alazhar-floating-whatsapp:hover {
    transform: scale(1.1) rotate(-10deg);
    color: #fff;
}

.floating-pulse {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 3px solid #25D366;
    opacity: 0;
    animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.7; }
    100% { transform: scale(1.3); opacity: 0; }
}

.floating-whatsapp-tooltip {
    position: absolute;
    left: 100%;
    margin-left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--alazhar-secondary);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: var(--alazhar-transition);
}

.alazhar-floating-whatsapp:hover .floating-whatsapp-tooltip {
    opacity: 1;
}

@media (max-width: 640px) {
    .floating-whatsapp-tooltip {
        display: none;
    }
}

/* ==========================================================================
   12. BACK TO TOP
   ========================================================================== */

.alazhar-back-to-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    background: var(--alazhar-secondary);
    color: #fff;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    box-shadow: var(--alazhar-shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: var(--alazhar-transition);
    z-index: 99;
}

.alazhar-back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
}

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

/* ==========================================================================
   13. BREADCRUMBS
   ========================================================================== */

.alazhar-breadcrumbs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.85);
}

.alazhar-breadcrumbs a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

.alazhar-breadcrumbs a:hover {
    color: var(--alazhar-cta);
}

.alazhar-breadcrumbs .separator {
    opacity: 0.5;
}

/* ==========================================================================
   14. STARS RATING
   ========================================================================== */

.alazhar-stars {
    display: inline-flex;
    gap: 0.125rem;
    color: var(--alazhar-cta);
}

/* ==========================================================================
   15. ANIMATIONS
   ========================================================================== */

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* ==========================================================================
   16. PAGINATION
   ========================================================================== */

.pagination,
.posts-pagination,
.alazhar-pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 3rem;
}

.pagination .page-numbers,
.posts-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 0.75rem;
    background: #fff;
    color: var(--alazhar-secondary);
    border-radius: var(--alazhar-radius-sm);
    text-decoration: none;
    border: 1px solid var(--alazhar-border);
    transition: var(--alazhar-transition);
}

.pagination .page-numbers.current,
.posts-pagination .page-numbers.current {
    background: var(--alazhar-primary);
    color: #fff;
    border-color: var(--alazhar-primary);
}

.pagination .page-numbers:hover,
.posts-pagination .page-numbers:hover {
    background: var(--alazhar-primary);
    color: #fff;
    border-color: var(--alazhar-primary);
}

/* ==========================================================================
   17. LANGUAGE SWITCHER
   ========================================================================== */

.alazhar-language-switcher {
    display: inline-flex;
    align-items: center;
}

.alazhar-language-switcher ul {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.alazhar-language-switcher a {
    color: #fff;
    text-decoration: none;
    opacity: 0.7;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.alazhar-language-switcher a:hover,
.alazhar-language-switcher .active a {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

.lang-toggle {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
}

/* ==========================================================================
   18. RESPONSIVE GRIDS
   ========================================================================== */

.alazhar-courses-grid.columns-2 { grid-template-columns: repeat(2, 1fr); }
.alazhar-courses-grid.columns-3 { grid-template-columns: repeat(3, 1fr); }
.alazhar-courses-grid.columns-4 { grid-template-columns: repeat(4, 1fr); }

.footer-widgets-grid[data-columns="1"] { grid-template-columns: 1fr; }
.footer-widgets-grid[data-columns="2"] { grid-template-columns: repeat(2, 1fr); }
.footer-widgets-grid[data-columns="3"] { grid-template-columns: repeat(3, 1fr); }
.footer-widgets-grid[data-columns="4"] { grid-template-columns: repeat(4, 1fr); }
.footer-widgets-grid { display: grid; gap: 2.5rem; }

@media (max-width: 1024px) {
    .footer-widgets-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .alazhar-courses-grid.columns-3,
    .alazhar-courses-grid.columns-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .footer-widgets-grid { grid-template-columns: 1fr !important; }
    .alazhar-courses-grid,
    .alazhar-courses-grid.columns-2,
    .alazhar-courses-grid.columns-3,
    .alazhar-courses-grid.columns-4 { grid-template-columns: 1fr !important; }
    .pricing-card.featured {
        transform: none !important;
    }
}

/* ==========================================================================
   19. UTILITIES
   ========================================================================== */

.no-results {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--alazhar-text-muted);
}

.alazhar-no-results {
    text-align: center;
    padding: 3rem;
    color: var(--alazhar-text-muted);
    font-size: 1.125rem;
}

/* ==========================================================================
   20. PRINT
   ========================================================================== */

@media print {
    .alazhar-floating-whatsapp,
    .alazhar-back-to-top,
    .mobile-menu-drawer,
    .alazhar-top-bar,
    .mobile-menu-toggle,
    .nav-actions,
    .alazhar-cta-banner {
        display: none !important;
    }
    body {
        background: #fff !important;
        color: #000 !important;
    }
}

/* ==========================================================================
   21. WIDGETS - Sidebar & Footer
   ========================================================================== */

.widget {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #fff;
    border-radius: var(--alazhar-radius-md);
    border: 1px solid var(--alazhar-border);
}

.widget-title {
    color: var(--alazhar-secondary);
    font-size: 1.125rem;
    margin: 0 0 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--alazhar-primary);
}

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

.widget ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--alazhar-border);
}

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

.widget ul a {
    color: var(--alazhar-text);
    text-decoration: none;
    transition: color var(--alazhar-transition);
}

.widget ul a:hover {
    color: var(--alazhar-primary);
}

.alazhar-widget-courses li {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.alazhar-widget-courses li::before {
    content: "\1F4D6";
    font-size: 1rem;
}

.alazhar-social-links {
    display: flex !important;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.alazhar-social-links li {
    border: 0 !important;
    padding: 0 !important;
}

.alazhar-social-links a {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--alazhar-bg);
    color: var(--alazhar-primary);
    border-radius: 50%;
    transition: var(--alazhar-transition);
}

.alazhar-social-links a:hover {
    background: var(--alazhar-primary);
    color: #fff !important;
    transform: translateY(-3px);
}

/* ==========================================================================
   22. POSTS GRID
   ========================================================================== */

.alazhar-post-card {
    transition: var(--alazhar-transition);
}

.alazhar-post-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--alazhar-shadow-lg);
}

.alazhar-post-card .entry-title a {
    color: var(--alazhar-secondary);
    text-decoration: none;
    transition: color var(--alazhar-transition);
}

.alazhar-post-card .entry-title a:hover {
    color: var(--alazhar-primary);
}

/* ==========================================================================
   23. WP CORE BLOCKS
   ========================================================================== */

.wp-block-button .wp-block-button__link {
    background: var(--alazhar-primary);
    color: #fff;
    padding: 0.875rem 1.75rem;
    border-radius: var(--alazhar-radius-md);
    font-weight: 600;
    transition: var(--alazhar-transition);
}

.wp-block-button .wp-block-button__link:hover {
    background: var(--alazhar-cta);
    color: var(--alazhar-secondary);
}

.wp-block-quote {
    border-right: 4px solid var(--alazhar-cta);
    padding: 1rem 1.5rem;
    background: var(--alazhar-bg);
    border-radius: var(--alazhar-radius-md);
    margin: 1.5rem 0;
}

.wp-block-quote cite {
    color: var(--alazhar-text-muted);
    font-style: normal;
    margin-top: 0.5rem;
    display: block;
}

.wp-block-cover {
    border-radius: var(--alazhar-radius-md);
    overflow: hidden;
}

.wp-block-image img {
    border-radius: var(--alazhar-radius-md);
}

.wp-block-separator {
    border: 0;
    border-top: 1px solid var(--alazhar-border);
    margin: 2rem 0;
}

.wp-block-separator.is-style-dots {
    border: 0;
    text-align: center;
}

.wp-block-separator.is-style-dots::before {
    content: "···";
    color: var(--alazhar-cta);
    font-size: 2rem;
    letter-spacing: 1rem;
}

/* ==========================================================================
   24. ELEMENTOR OVERRIDES
   ========================================================================== */

.elementor-page .site-main {
    padding-top: 0;
    padding-bottom: 0;
}

.elementor-widget-alazhar_course_card,
.elementor-widget-alazhar_testimonials,
.elementor-widget-alazhar_pricing {
    padding: 1rem;
}

/* ==========================================================================
   25. LEAD CAPTURE FORMS
   ========================================================================== */

.alazhar-lead-form {
    max-width: 480px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: var(--alazhar-radius-lg);
    backdrop-filter: blur(10px);
}

.alazhar-lead-form h3 {
    color: var(--alazhar-secondary);
    margin-bottom: 1rem;
    text-align: center;
}

/* ==========================================================================
   26. LOADER / SPINNER
   ========================================================================== */

.alazhar-loading {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 5px solid rgba(107, 33, 168, 0.1);
    border-radius: 50%;
    border-top-color: var(--alazhar-primary);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   27. NOTIFICATION TOAST
   ========================================================================== */

.alazhar-toast {
    position: fixed;
    bottom: 6rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--alazhar-secondary);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: var(--alazhar-radius-md);
    box-shadow: var(--alazhar-shadow-lg);
    z-index: 99999;
    opacity: 0;
    transition: var(--alazhar-transition);
    max-width: 90%;
}

.alazhar-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.alazhar-toast.success {
    background: var(--alazhar-success);
}

.alazhar-toast.error {
    background: var(--alazhar-danger);
}

/* ==========================================================================
   28. PROGRESS BAR
   ========================================================================== */

.alazhar-progress {
    background: var(--alazhar-bg);
    border-radius: 9999px;
    height: 8px;
    overflow: hidden;
    margin: 1rem 0;
}

.alazhar-progress-bar {
    background: linear-gradient(90deg, var(--alazhar-primary), var(--alazhar-cta));
    height: 100%;
    border-radius: 9999px;
    transition: width 0.6s ease;
}

/* ==========================================================================
   29. DECORATIVE ISLAMIC PATTERN
   ========================================================================== */

.islamic-pattern-bg {
    background-image:
        radial-gradient(circle at 25% 25%, rgba(234, 179, 8, 0.1) 2px, transparent 2px),
        radial-gradient(circle at 75% 75%, rgba(234, 179, 8, 0.1) 2px, transparent 2px);
    background-size: 60px 60px;
}

.ornamental-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.ornamental-divider::before,
.ornamental-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--alazhar-cta), transparent);
}

.ornamental-divider-icon {
    color: var(--alazhar-cta);
    font-size: 1.5rem;
}

/* ==========================================================================
   30. EQUAL HEIGHT GRID FIX
   ========================================================================== */

.alazhar-courses-grid,
.courses-grid,
.testimonials-grid,
.pricing-grid,
.steps-grid,
.why-us-grid {
    align-items: stretch;
}

.alazhar-courses-grid > *,
.courses-grid > *,
.testimonials-grid > *,
.pricing-grid > *,
.steps-grid > *,
.why-us-grid > * {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* ==========================================================================
   31. SCROLLBAR STYLING
   ========================================================================== */

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--alazhar-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--alazhar-primary);
    border-radius: 6px;
    border: 2px solid var(--alazhar-bg);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--alazhar-secondary);
}

/* ==========================================================================
   32. SELECTION
   ========================================================================== */

::selection {
    background: var(--alazhar-cta);
    color: var(--alazhar-secondary);
}

::-moz-selection {
    background: var(--alazhar-cta);
    color: var(--alazhar-secondary);
}

/* ==========================================================================
   33. RESPONSIVE FIXES
   ========================================================================== */

@media (max-width: 768px) {
    .alazhar-btn-lg {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .hero-ctas {
        flex-direction: column;
        width: 100%;
    }

    .hero-ctas .alazhar-btn {
        width: 100%;
    }

    .alazhar-container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.75rem !important; }
    h2 { font-size: 1.5rem !important; }
    h3 { font-size: 1.25rem !important; }

    .top-bar-center {
        font-size: 0.75rem;
    }

    .nav-actions .nav-cta {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .nav-actions .nav-cta span {
        display: none;
    }
}

/* ==========================================================================
   34. DARK MODE SUPPORT (Optional)
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    .dark-mode-enabled {
        --alazhar-bg: #0F1419;
        --alazhar-text: #E5E7EB;
        --alazhar-text-muted: #9CA3AF;
        --alazhar-border: #1F2937;
    }
}

/* ==========================================================================
   ELEMENTOR-RELATED ADDITIONS
   ========================================================================== */

/* Hide page hero on Elementor pages */
.alazhar-elementor-active .page-hero,
.alazhar-elementor-active .page-header {
    display: none;
}

/* Elementor content wrapper */
.alazhar-elementor-content {
    width: 100%;
}

/* Full-width container for Elementor */
.alazhar-elementor-full-width {
    max-width: 100%;
    width: 100%;
}

/* When using Elementor inside a page-template */
.elementor-template-canvas body,
body.alazhar-no-header-footer {
    background: #fff;
}

/* Avoid theme conflicts in editor */
.elementor-editor-active .alazhar-floating-whatsapp,
.elementor-editor-active .alazhar-back-to-top,
.elementor-editor-active #alazhar-cookie-notice {
    display: none !important;
}

/* ============================================
   PORTAL AUTH BUTTONS (Header)
   ============================================ */
.alazhar-portal-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.portal-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    line-height: 1;
    white-space: nowrap;
}

.portal-btn-outline {
    background: transparent;
    color: #6B21A8;
    border: 2px solid #6B21A8;
}

.portal-btn-outline:hover {
    background: #6B21A8;
    color: #fff;
    transform: translateY(-1px);
}

.portal-btn-primary {
    background: linear-gradient(135deg, #6B21A8, #7E22CE);
    color: #fff;
    border: 2px solid transparent;
    box-shadow: 0 2px 8px rgba(107, 33, 168, 0.25);
}

.portal-btn-primary:hover {
    background: linear-gradient(135deg, #7E22CE, #6B21A8);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(107, 33, 168, 0.4);
}

/* User Menu Dropdown */
.portal-user-menu {
    position: relative;
}

.portal-user-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: #f5f5f5;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    color: #3B0764;
    transition: all 0.2s ease;
}

.portal-user-toggle:hover {
    background: #eef2f7;
    border-color: #6B21A8;
}

.portal-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.portal-user-name {
    font-weight: 600;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.role-badge {
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
}

.role-teacher {
    background: #EAB308;
    color: #3B0764;
}

.role-student {
    background: #6B21A8;
    color: #fff;
}

.portal-user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline-end: 0;
    min-width: 240px;
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 0.5rem;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
}

.portal-user-menu.open .portal-user-dropdown,
.portal-user-menu:hover .portal-user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.portal-user-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1rem;
    color: #3B0764;
    text-decoration: none;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    transition: background 0.15s ease;
}

.portal-user-dropdown a:hover {
    background: #f5f5f5;
    color: #6B21A8;
}

.portal-user-dropdown a i {
    width: 18px;
    text-align: center;
    color: #6B7280;
}

.portal-user-dropdown a:hover i {
    color: #6B21A8;
}

.portal-dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 0.4rem 0;
}

.portal-logout {
    color: #dc2626 !important;
}

.portal-logout i {
    color: #dc2626 !important;
}

/* Hero Portal CTA */
.hero-portal-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-portal-cta .portal-btn {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
}

.hero-portal-cta .portal-btn-outline {
    color: #fff;
    border-color: #fff;
}

.hero-portal-cta .portal-btn-outline:hover {
    background: #fff;
    color: #6B21A8;
}

/* Responsive */
@media (max-width: 768px) {
    .alazhar-portal-buttons .portal-btn span {
        display: none;
    }
    .alazhar-portal-buttons .portal-btn {
        padding: 0.5rem 0.7rem;
    }
    .portal-user-name {
        display: none;
    }
    .portal-user-menu .role-badge {
        display: none;
    }
}

/* ============================================
   TEACHER DASHBOARD SECTION
   ============================================ */
.teacher-dashboard-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

@media (max-width: 992px) {
    .teacher-dashboard-wrapper {
        grid-template-columns: 1fr;
    }
}

.teacher-sidebar {
    background: #fff;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.teacher-sidebar .avatar-wrapper {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 1rem;
}

.teacher-sidebar .avatar-wrapper img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #EAB308;
}

.teacher-sidebar .teacher-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #3B0764;
    margin-top: 0.7rem;
    margin-bottom: 0.25rem;
}

.teacher-sidebar .teacher-role {
    color: #EAB308;
    font-size: 0.85rem;
    font-weight: 600;
}

.teacher-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.teacher-nav a {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.8rem 1rem;
    border-radius: 0.6rem;
    color: #4B5563;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.teacher-nav a:hover {
    background: #f0fdf4;
    color: #6B21A8;
}

.teacher-nav a.active {
    background: linear-gradient(135deg, #6B21A8, #7E22CE);
    color: #fff;
    box-shadow: 0 4px 12px rgba(107, 33, 168, 0.3);
}

.teacher-nav a i {
    width: 20px;
    text-align: center;
}

.teacher-main {
    background: #fff;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.teacher-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.teacher-stat-card {
    background: linear-gradient(135deg, #FFFBEB, #f0f0f0);
    border-radius: 0.75rem;
    padding: 1.25rem;
    border-inline-start: 4px solid #6B21A8;
}

.teacher-stat-card .stat-icon {
    font-size: 1.75rem;
    color: #6B21A8;
    margin-bottom: 0.5rem;
}

.teacher-stat-card .stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: #3B0764;
    line-height: 1;
}

.teacher-stat-card .stat-label {
    color: #6B7280;
    font-size: 0.85rem;
    margin-top: 0.4rem;
}

/* Article/Tip Card Editor */
.alazhar-editor-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.alazhar-editor-form label {
    font-weight: 600;
    color: #3B0764;
    display: block;
    margin-bottom: 0.35rem;
}

.alazhar-editor-form input[type="text"],
.alazhar-editor-form input[type="url"],
.alazhar-editor-form textarea,
.alazhar-editor-form select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.6rem;
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
    transition: border-color 0.2s;
}

.alazhar-editor-form input:focus,
.alazhar-editor-form textarea:focus,
.alazhar-editor-form select:focus {
    outline: none;
    border-color: #6B21A8;
    box-shadow: 0 0 0 3px rgba(107, 33, 168, 0.1);
}

.alazhar-editor-form textarea {
    min-height: 200px;
    resize: vertical;
}

.alazhar-content-list {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
}

.content-item {
    background: #FFFBEB;
    border-radius: 0.75rem;
    padding: 1.25rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: center;
    border: 1px solid #e5e7eb;
}

.content-item h3 {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    color: #3B0764;
}

.content-item .content-meta {
    font-size: 0.85rem;
    color: #6B7280;
}

.content-item .content-actions {
    display: flex;
    gap: 0.5rem;
}

.content-item .btn-icon {
    padding: 0.5rem 0.75rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    cursor: pointer;
    color: #4B5563;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.content-item .btn-icon:hover {
    background: #6B21A8;
    color: #fff;
    border-color: #6B21A8;
}

.content-item .btn-icon.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
}

.status-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-publish { background: #d1fae5; color: #065f46; }
.status-draft { background: #fef3c7; color: #92400e; }
.status-pending { background: #dbeafe; color: #1e40af; }

/* ============================================
   PORTAL CTA SECTION (Bottom of Homepage)
   ============================================ */
.alazhar-portal-cta-section {
    position: relative;
    padding: 6rem 1rem;
    background: linear-gradient(135deg, #6B21A8 0%, #3B0764 100%);
    color: #fff;
    overflow: hidden;
}

.portal-cta-bg-decoration {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 1;
}

.portal-cta-bg-1 {
    top: -30%;
    inset-inline-end: -15%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(234, 179, 8, 0.4) 0%, transparent 70%);
}

.portal-cta-bg-2 {
    bottom: -30%;
    inset-inline-start: -15%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(107, 33, 168, 0.5) 0%, transparent 70%);
}

.portal-cta-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.portal-cta-header {
    text-align: center;
    margin-bottom: 4rem;
}

.portal-cta-title {
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 800;
    color: #fff;
    margin: 0 0 1rem;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.portal-cta-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Cards Container */
.portal-cta-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
    max-width: 950px;
    margin: 0 auto;
}

.portal-cta-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 1.5rem;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.portal-cta-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, #EAB308, transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.portal-cta-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border-color: rgba(234, 179, 8, 0.4);
}

.portal-cta-card:hover::before {
    opacity: 1;
}

.portal-cta-card-teacher {
    background: rgba(234, 179, 8, 0.12);
    border-color: rgba(234, 179, 8, 0.25);
}

/* Icon Circle */
.portal-cta-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.4s ease;
}

.portal-cta-card:hover .portal-cta-icon {
    transform: scale(1.1) rotate(-5deg);
}

.portal-cta-icon-student {
    background: linear-gradient(135deg, #EAB308, #FCD34D);
    color: #3B0764;
}

.portal-cta-icon-teacher {
    background: linear-gradient(135deg, #FFFFFF, #F0F0F0);
    color: #6B21A8;
}

.portal-cta-icon svg {
    width: 48px;
    height: 48px;
    stroke-width: 2.2;
}

/* Card Text */
.portal-cta-card-title {
    color: #fff;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 1rem;
}

.portal-cta-card-desc {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 0.98rem;
}

/* Features List */
.portal-cta-features {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    text-align: start;
}

.portal-cta-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.95rem;
    font-weight: 500;
}

.feature-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-radius: 50%;
    background: rgba(234, 179, 8, 0.25);
    color: #EAB308;
}

.feature-check svg {
    width: 14px;
    height: 14px;
}

/* Buttons */
.portal-cta-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.portal-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 1.75rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.25s ease;
    border: 2px solid transparent;
    cursor: pointer;
    line-height: 1;
    font-family: inherit;
}

.portal-cta-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.portal-cta-btn-primary {
    background: linear-gradient(135deg, #EAB308, #FCD34D);
    color: #3B0764;
    box-shadow: 0 8px 20px rgba(234, 179, 8, 0.35);
}

.portal-cta-btn-primary:hover {
    background: linear-gradient(135deg, #FCD34D, #EAB308);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(234, 179, 8, 0.5);
    color: #3B0764;
}

.portal-cta-btn-gold {
    background: #fff;
    color: #6B21A8;
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.2);
}

.portal-cta-btn-gold:hover {
    background: #FCD34D;
    color: #3B0764;
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(234, 179, 8, 0.4);
}

.portal-cta-btn-ghost {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
}

.portal-cta-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #fff;
    color: #fff;
    transform: translateY(-3px);
}

.portal-cta-btn-large {
    padding: 1.1rem 2.5rem;
    font-size: 1.15rem;
}

.portal-cta-btn-large svg {
    width: 22px;
    height: 22px;
}

/* Welcome (logged in) */
.portal-cta-welcome {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.portal-cta-welcome .portal-cta-btn {
    margin-top: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .alazhar-portal-cta-section {
        padding: 4rem 1rem;
    }
    .portal-cta-header {
        margin-bottom: 2.5rem;
    }
    .portal-cta-cards {
        gap: 1.5rem;
    }
    .portal-cta-card {
        padding: 2rem 1.5rem;
    }
    .portal-cta-card-title {
        font-size: 1.4rem;
    }
    .portal-cta-buttons {
        flex-direction: column;
        width: 100%;
    }
    .portal-cta-buttons .portal-cta-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   ICON FIXES (Header Portal Buttons)
   ============================================ */
/* Ensure Font Awesome icons render even if font fails */
.portal-btn i, 
.portal-user-dropdown a i,
.portal-user-toggle i,
.teacher-nav a i,
.content-item .btn-icon i {
    display: inline-block;
    font-style: normal !important;
    line-height: 1;
    min-width: 16px;
    text-align: center;
}

/* Fallback: if FA icon fails to render, show a bullet */
.portal-btn i:empty::before,
.portal-user-dropdown a i:empty::before {
    content: "●";
    color: currentColor;
    font-size: 0.7em;
}

/* ============================================
   PRICING PAGE
   ============================================ */
.alazhar-pricing-section {
    padding: 5rem 1rem;
    background: linear-gradient(135deg, #FFFBEB 0%, #f0f4f0 100%);
    min-height: 80vh;
}

.pricing-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.pricing-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: #3B0764;
    margin: 0 0 1rem;
}

.pricing-subtitle {
    font-size: 1.2rem;
    color: #6B7280;
    margin: 0 0 2rem;
}

.billing-toggle {
    display: inline-flex;
    background: #fff;
    border-radius: 999px;
    padding: 0.4rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    gap: 0.3rem;
}

.toggle-btn {
    background: transparent;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    color: #6B7280;
    transition: all 0.25s ease;
    font-family: inherit;
    position: relative;
}

.toggle-btn:hover { color: #6B21A8; }

.toggle-btn.active {
    background: linear-gradient(135deg, #6B21A8, #7E22CE);
    color: #fff;
    box-shadow: 0 4px 12px rgba(107, 33, 168, 0.3);
}

.save-badge {
    display: inline-block;
    margin-inline-start: 0.4rem;
    background: #EAB308;
    color: #3B0764;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 800;
}

/* Pricing Grid */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.pricing-card {
    background: #fff;
    border-radius: 1.5rem;
    padding: 2.5rem 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 2px solid transparent;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    display: flex;
    flex-direction: column;
}

.pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
    border-color: rgba(107, 33, 168, 0.2);
}

.pricing-card.featured {
    background: linear-gradient(135deg, #6B21A8, #3B0764);
    color: #fff;
    transform: scale(1.05);
    border-color: #EAB308;
    box-shadow: 0 15px 40px rgba(107, 33, 168, 0.3);
}

.pricing-card.featured:hover {
    transform: scale(1.05) translateY(-8px);
}

.pricing-card.featured .plan-name,
.pricing-card.featured .plan-price {
    color: #fff;
}

.pricing-card.featured .plan-desc,
.pricing-card.featured .plan-features li {
    color: rgba(255, 255, 255, 0.9);
}

.pricing-badge {
    position: absolute;
    top: -15px;
    inset-inline-end: 20px;
    background: linear-gradient(135deg, #EAB308, #FCD34D);
    color: #3B0764;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(234, 179, 8, 0.35);
}

.pricing-card-header {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 1.5rem;
}

.pricing-card.featured .pricing-card-header {
    border-bottom-color: rgba(255, 255, 255, 0.15);
}

.plan-icon,
.plan-icon-default {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    color: #6B21A8;
}

.pricing-card.featured .plan-icon-default {
    background: rgba(234, 179, 8, 0.2);
    color: #EAB308;
}

.plan-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #3B0764;
    margin: 0 0 0.5rem;
}

.plan-desc {
    color: #6B7280;
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.5;
}

.plan-price {
    text-align: center;
    padding: 1.5rem 0;
    color: #3B0764;
}

.plan-price .currency {
    font-size: 1.5rem;
    vertical-align: super;
    color: #EAB308;
    font-weight: 700;
}

.plan-price .amount {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, #6B21A8, #EAB308);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pricing-card.featured .plan-price .amount {
    background: linear-gradient(135deg, #EAB308, #FCD34D);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.plan-price .period {
    font-size: 1rem;
    color: #6B7280;
    margin-inline-start: 0.3rem;
}

.trial-info {
    text-align: center;
    background: #fef3c7;
    color: #92400e;
    padding: 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.pricing-card.featured .trial-info {
    background: rgba(234, 179, 8, 0.2);
    color: #EAB308;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    flex: 1;
}

.plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.6rem 0;
    color: #374151;
    font-size: 0.95rem;
}

.plan-features li svg {
    flex-shrink: 0;
    color: #10B981;
    margin-top: 3px;
}

.pricing-card.featured .plan-features li svg {
    color: #EAB308;
}

.plan-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #6B21A8, #7E22CE);
    color: #fff;
    border: none;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
    margin-top: auto;
    box-shadow: 0 4px 15px rgba(107, 33, 168, 0.25);
}

.plan-cta-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(107, 33, 168, 0.4);
}

.plan-cta-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.pricing-card.featured .plan-cta-btn {
    background: linear-gradient(135deg, #EAB308, #FCD34D);
    color: #3B0764;
    box-shadow: 0 4px 15px rgba(234, 179, 8, 0.35);
}

.pricing-card.featured .plan-cta-btn:hover:not(:disabled) {
    box-shadow: 0 8px 25px rgba(234, 179, 8, 0.55);
}

/* Payment methods */
.payment-methods {
    text-align: center;
    margin-top: 4rem;
    padding: 2rem;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.payment-methods p {
    color: #6B7280;
    font-weight: 600;
    margin: 0 0 1rem;
}

.payment-icons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.pay-icon {
    background: linear-gradient(135deg, #f5f5f5, #ebebeb);
    color: #4B5563;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 0.9rem;
    border: 1px solid #e5e7eb;
}

.secure-note {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #10B981;
    font-size: 0.9rem;
    margin: 0 !important;
}

/* Pricing FAQ */
.pricing-faq {
    max-width: 800px;
    margin: 4rem auto 0;
}

.pricing-faq h2 {
    text-align: center;
    color: #3B0764;
    margin-bottom: 2rem;
}

.faq-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: #fff;
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

.faq-item summary {
    font-weight: 600;
    color: #3B0764;
    cursor: pointer;
    list-style: none;
    position: relative;
    padding-inline-end: 2rem;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    position: absolute;
    inset-inline-end: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: #6B21A8;
    font-weight: 300;
    transition: transform 0.2s;
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-item p {
    margin: 1rem 0 0;
    color: #4B5563;
    line-height: 1.7;
}

/* No plans */
.no-plans-msg {
    text-align: center;
    padding: 5rem 2rem;
    color: #6B7280;
}

.no-plans-msg svg {
    color: #e5e7eb;
    margin-bottom: 1.5rem;
}

/* ============================================
   SUBSCRIPTION SUCCESS / CANCEL PAGES
   ============================================ */
.alazhar-subscription-result-section {
    padding: 5rem 1rem;
    min-height: 80vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #FFFBEB, #f0f4f0);
}

.result-card {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    border-radius: 1.5rem;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.result-icon {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.result-icon.success {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
    animation: bounceIn 0.6s ease;
}

.result-icon.cancel {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
}

@keyframes bounceIn {
    0% { transform: scale(0); }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.result-title {
    font-size: 2rem;
    color: #3B0764;
    margin: 0 0 1rem;
}

.result-message {
    color: #6B7280;
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.subscription-details {
    background: #FFFBEB;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: start;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: #6B7280;
    font-weight: 600;
}

.detail-value {
    color: #3B0764;
    font-weight: 700;
}

.status-active {
    color: #10B981 !important;
}

.result-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.result-actions .alazhar-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    border-radius: 0.6rem;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.2s;
}

.alazhar-btn-primary {
    background: linear-gradient(135deg, #6B21A8, #7E22CE);
    color: #fff;
    border: 2px solid transparent;
}

.alazhar-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 33, 168, 0.35);
    color: #fff;
}

.alazhar-btn-outline {
    background: transparent;
    color: #6B21A8;
    border: 2px solid #6B21A8;
}

.alazhar-btn-outline:hover {
    background: #6B21A8;
    color: #fff;
}

.next-steps {
    text-align: start;
    background: #f0fdf4;
    border-radius: 0.75rem;
    padding: 1.5rem;
    border-inline-start: 4px solid #10B981;
}

.next-steps h3 {
    color: #065f46;
    margin: 0 0 1rem;
}

.next-steps ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.next-steps li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0;
    color: #374151;
}

.next-steps li svg {
    color: #10B981;
}

.support-note {
    color: #6B7280;
    margin-top: 2rem;
}

.support-note a {
    color: #6B21A8;
    font-weight: 700;
}

/* ============================================
   BILLING PAGE
   ============================================ */
.alazhar-billing-section {
    padding: 3rem 1rem;
    min-height: 60vh;
}

.billing-header h1 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 2rem;
    color: #3B0764;
    margin-bottom: 2rem;
}

.subscription-card {
    background: #fff;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    margin-bottom: 2rem;
}

.subscription-card.active {
    border-inline-start: 5px solid #10B981;
}

.subscription-card.cancelled {
    border-inline-start: 5px solid #dc2626;
}

.subscription-card.no-sub {
    text-align: center;
    padding: 3rem 2rem;
}

.no-sub-icon {
    color: #d1d5db;
    margin-bottom: 1rem;
}

.sub-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.sub-card-header h2 {
    margin: 0 0 0.5rem;
    color: #3B0764;
}

.status-pill {
    display: inline-block;
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
}

.status-pill.status-active {
    background: #d1fae5;
    color: #065f46;
}

.status-pill.status-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.sub-price {
    text-align: end;
}

.sub-price .amount {
    font-size: 2rem;
    font-weight: 800;
    color: #6B21A8;
}

.sub-price .period {
    color: #6B7280;
}

.renewal-info {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #f0fdf4;
    color: #065f46;
    padding: 0.6rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.sub-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Payment History */
.payment-history {
    background: #fff;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    margin-top: 2rem;
}

.payment-history h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #3B0764;
    margin: 0 0 1.5rem;
}

.payment-table {
    overflow-x: auto;
}

.payment-table table {
    width: 100%;
    border-collapse: collapse;
}

.payment-table th {
    background: #f9fafb;
    padding: 1rem;
    text-align: start;
    font-weight: 700;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}

.payment-table td {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    color: #4B5563;
}

.payment-table code {
    background: #f3f4f6;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #6B7280;
}

@media (max-width: 768px) {
    .pricing-card.featured {
        transform: scale(1);
    }
    .pricing-card.featured:hover {
        transform: translateY(-8px);
    }
    .result-actions {
        flex-direction: column;
    }
    .result-actions .alazhar-btn {
        width: 100%;
        justify-content: center;
    }
}
