/* ==========================================================================
   CSS for Zabir Sohail Personal Website - Complete with Dark Mode
   Modern Design Elements with Clean Practices
========================================================================== */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS Variables - Light Theme */
:root {
    /* Colors */
    --primary-gold: #DAA520;
    --dark-gold: #B8860B;
    --deep-green: #006B3C;
    --light-green: #228B22;
    --cream: #FDF5E6;
    --dark-cream: #F5E6D3;
    --deep-blue: #003366;
    --text-dark: #2C3E50;
    --text-light: #7F8C8D;
    --white: #FFFFFF;
    --shadow: rgba(0, 0, 0, 0.1);
    --border-color: #E0E0E0;
    
    /* Background colors */
    --bg-primary: #FFFFFF;
    --bg-secondary: #FDF5E6;
    --bg-tertiary: #F5E6D3;
    
    /* Typography */
    --font-arabic: 'Amiri', 'Scheherazade New', serif;
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Layout */
    --container-max: 1200px;
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --header-height: 80px;
}

/* Dark Theme Variables */
body.dark-mode {
    --primary-gold: #FFD700;
    --dark-gold: #DAA520;
    --deep-green: #00C853;
    --light-green: #4CAF50;
    --cream: #1a1a1a;
    --dark-cream: #2d2d2d;
    --deep-blue: #4169E1;
    --text-dark: #E0E0E0;
    --text-light: #B0B0B0;
    --white: #2d2d2d;
    --shadow: rgba(255, 255, 255, 0.1);
    --border-color: #404040;
    --bg-primary: #2d2d2d;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #333333;
}

/* Base Body Styles */
body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--cream);
    overflow-x: hidden;
    transition: var(--transition);
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1rem;
}

/* Arabic Text Styling */
.arabic-text {
    font-family: var(--font-arabic);
    font-size: 1.5em;
    font-weight: 700;
    text-align: center;
    direction: rtl;
    color: var(--deep-green);
    margin-bottom: 0.5rem;
    line-height: 1.8;
}

/* Navigation Styles */
.navbar {
    background: var(--bg-primary);
    box-shadow: 0 2px 10px var(--shadow);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 3px solid var(--primary-gold);
    transition: var(--transition);
    height: var(--header-height);
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    height: 100%;
}

.nav-logo {
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
    padding: 0.5rem;
    border-radius: var(--border-radius);
}

.nav-logo:hover {
    transform: scale(1.05);
    background: rgba(218, 165, 32, 0.1);
}

.nav-logo h2 {
    color: var(--deep-green);
    font-family: var(--font-arabic);
    font-size: 1.8rem;
    margin-bottom: 0;
    transition: var(--transition);
}

.logo-subtitle {
    font-size: 0.9rem;
    color: var(--text-light);
    display: block;
    text-align: center;
    margin-top: 0.2rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
}

.nav-link:hover,
.nav-link.active:not(.login-btn) {
    color: var(--deep-green);
    background: rgba(218, 165, 32, 0.1);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: var(--primary-gold);
    border-radius: 2px;
}

.login-btn {
    background: var(--primary-gold);
    color: var(--white) !important;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(218, 165, 32, 0.3);
}

.login-btn:hover {
    background: var(--dark-gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(218, 165, 32, 0.4);
}

/* Theme Toggle */
.theme-controls {
    display: flex;
    align-items: center;
    margin-left: 1rem;
}

.theme-toggle {
    background: var(--primary-gold);
    border: none;
    color: var(--white);
    padding: 0.8rem;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(218, 165, 32, 0.3);
}

.theme-toggle:hover {
    background: var(--dark-gold);
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 4px 12px rgba(218, 165, 32, 0.4);
}

.theme-toggle i {
    font-size: 1.1rem;
    transition: var(--transition);
}

/* Mobile Navigation */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.hamburger:hover {
    background: rgba(218, 165, 32, 0.1);
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--deep-green);
    margin: 3px 0;
    transition: var(--transition);
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, var(--cream), var(--dark-cream));
    margin-top: var(--header-height);
    overflow: hidden;
}

.islamic-pattern-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    background-image:
        radial-gradient(circle at 25% 25%, var(--primary-gold) 2px, transparent 2px),
        radial-gradient(circle at 75% 75%, var(--deep-green) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: 0 0, 25px 25px;
    animation: patternMove 20s ease-in-out infinite;
}

@keyframes patternMove {
    0%, 100% { transform: translateX(0) translateY(0); }
    50% { transform: translateX(10px) translateY(10px); }
}

.hero-content {
    text-align: center;
    z-index: 2;
    padding: 2rem;
    max-width: 800px;
}

.calligraphy-container {
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.5s forwards;
}

.main-calligraphy {
    font-family: var(--font-arabic);
    font-size: clamp(2rem, 5vw, 4rem);
    color: var(--deep-green);
    margin-bottom: 1rem;
    direction: rtl;
    font-weight: 700;
    text-shadow: 2px 2px 4px var(--shadow);
    line-height: 1.4;
}

.calligraphy-translation {
    font-style: italic;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.welcome-message {
    opacity: 0;
    animation: fadeInUp 1s ease-out 1s forwards;
}

.welcome-message h2 {
    color: var(--primary-gold);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.welcome-message p {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Geometric Ornament */
.geometric-ornament {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 120px;
    border: 3px solid var(--primary-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeIn 1s ease-out 2s forwards, rotate 20s linear infinite;
}

.geometric-ornament::before {
    content: '';
    width: 80px;
    height: 80px;
    border: 2px solid var(--deep-green);
    border-radius: 50%;
    animation: rotate 15s linear infinite reverse;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

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

@keyframes rotate {
    from { transform: translateX(-50%) rotate(0deg); }
    to { transform: translateX(-50%) rotate(360deg); }
}

/* Quote Section */
.quote-section {
    padding: 4rem 0;
    background: var(--bg-primary);
}

.quote-card {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px var(--shadow);
    border: 2px solid var(--primary-gold);
    position: relative;
    overflow: hidden;
}

.quote-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(218, 165, 32, 0.05), transparent);
    animation: shimmer 8s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    50% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.arabic-quote {
    font-family: var(--font-arabic);
    font-size: 2rem;
    color: var(--deep-green);
    margin-bottom: 1rem;
    direction: rtl;
    font-weight: 700;
    line-height: 1.6;
    position: relative;
    z-index: 2;
}

.quote-translation {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-style: italic;
    position: relative;
    z-index: 2;
}

.quote-reference {
    color: var(--primary-gold);
    font-weight: 600;
    position: relative;
    z-index: 2;
}

/* Page Header Styles */
.page-header {
    text-align: center;
    padding: 6rem 0 3rem;
    margin-top: var(--header-height);
}

.page-header h1 {
    font-size: 3rem;
    color: var(--deep-green);
    margin-bottom: 1rem;
    font-weight: 700;
}

.page-header p {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 1rem auto 0;
}

.header-ornament {
    width: 80px;
    height: 3px;
    background: var(--primary-gold);
    margin: 1rem auto;
    position: relative;
    border-radius: 2px;
}

.header-ornament::before,
.header-ornament::after {
    content: '';
    position: absolute;
    top: -3px;
    width: 9px;
    height: 9px;
    background: var(--deep-green);
    border-radius: 50%;
}

.header-ornament::before {
    left: -12px;
}

.header-ornament::after {
    right: -12px;
}

/* About Page Styles */
.about-section {
    padding: 2rem 0 4rem;
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-card {
    background: var(--bg-primary);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px var(--shadow);
    border-left: 5px solid var(--primary-gold);
    position: relative;
    overflow: hidden;
}

.about-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(218, 165, 32, 0.1), transparent);
    border-radius: 50%;
}

.about-text h2 {
    color: var(--deep-green);
    margin-bottom: 1.5rem;
    font-family: var(--font-arabic);
    font-size: 2rem;
}

.about-text h3 {
    color: var(--primary-gold);
    margin: 2rem 0 1rem;
    font-size: 1.5rem;
}

.about-text p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: var(--text-dark);
    text-align: justify;
}

.about-text ul {
    margin: 1rem 0 2rem 2rem;
}

.about-text li {
    margin-bottom: 0.8rem;
    color: var(--text-dark);
    position: relative;
}

.about-text li::marker {
    color: var(--primary-gold);
}

.about-quote {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--deep-green);
    margin-top: 2rem;
    text-align: center;
    position: relative;
}

.about-quote .arabic-text {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.about-quote .translation {
    font-style: italic;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.about-quote .reference {
    color: var(--primary-gold);
    font-weight: 600;
}

/* Contact Page Styles */
/* Updated Contact Page Styles with Islamic Gradients */
.contact-section {
    padding: 2rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(218, 165, 32, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 107, 60, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.contact-content {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.contact-form-container {
    background: var(--bg-primary);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: 0 15px 35px var(--shadow);
    position: relative;
    overflow: hidden;
    border: 3px solid transparent;
    background: 
        linear-gradient(var(--bg-primary), var(--bg-primary)) padding-box,
        linear-gradient(135deg, 
            var(--primary-gold) 0%, 
            var(--deep-green) 25%, 
            var(--primary-gold) 50%, 
            var(--deep-green) 75%, 
            var(--primary-gold) 100%
        ) border-box;
}

.contact-form-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        conic-gradient(
            from 0deg at 50% 50%,
            transparent 0deg,
            rgba(218, 165, 32, 0.1) 60deg,
            rgba(0, 107, 60, 0.1) 120deg,
            rgba(218, 165, 32, 0.1) 180deg,
            rgba(0, 107, 60, 0.1) 240deg,
            rgba(218, 165, 32, 0.1) 300deg,
            transparent 360deg
        );
    animation: islamicRotate 30s linear infinite;
    z-index: -1;
}

@keyframes islamicRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.islamic-form-decoration {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 150px;
    height: 150px;
    background: 
        radial-gradient(
            circle,
            rgba(218, 165, 32, 0.15) 0%,
            rgba(0, 107, 60, 0.1) 40%,
            transparent 70%
        );
    border-radius: 50%;
    z-index: 1;
}

.islamic-form-decoration::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    width: 110px;
    height: 110px;
    border: 2px solid var(--primary-gold);
    border-radius: 50%;
    opacity: 0.3;
    animation: islamicPulse 4s ease-in-out infinite;
}

.islamic-form-decoration::after {
    content: '';
    position: absolute;
    top: 40px;
    left: 40px;
    width: 70px;
    height: 70px;
    background: 
        linear-gradient(45deg, 
            rgba(218, 165, 32, 0.2), 
            rgba(0, 107, 60, 0.2)
        );
    border-radius: 50%;
    animation: islamicPulse 4s ease-in-out infinite reverse;
}

@keyframes islamicPulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.6; }
}

.contact-form {
    position: relative;
    z-index: 2;
}

.form-group {
    margin-bottom: 2.5rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    color: var(--deep-green);
    font-weight: 600;
    font-size: 1.1rem;
    position: relative;
    padding-left: 1rem;
}

.form-group label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background: var(--primary-gold);
    border-radius: 50%;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1.2rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: var(--font-primary);
    transition: var(--transition);
    background: var(--bg-secondary);
    color: var(--text-dark);
    position: relative;
    z-index: 1;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-gold);
    background: var(--bg-primary);
    box-shadow: 
        0 0 0 3px rgba(218, 165, 32, 0.1),
        0 0 20px rgba(0, 107, 60, 0.1);
    transform: translateY(-2px);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-light);
    opacity: 0.7;
}

.islamic-input-decoration {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: 
        linear-gradient(90deg, 
            var(--primary-gold) 0%, 
            var(--deep-green) 50%, 
            var(--primary-gold) 100%
        );
    transition: var(--transition);
    border-radius: 2px;
}

.form-group:focus-within .islamic-input-decoration {
    width: 100%;
}

.islamic-submit-btn {
    background: 
        linear-gradient(135deg, 
            var(--primary-gold) 0%, 
            var(--deep-green) 25%, 
            var(--primary-gold) 50%, 
            var(--deep-green) 75%, 
            var(--primary-gold) 100%
        );
    background-size: 300% 300%;
    color: var(--white);
    border: none;
    padding: 1.2rem 3rem;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 2rem auto 0;
    box-shadow: 
        0 8px 25px rgba(218, 165, 32, 0.3),
        0 0 0 1px rgba(0, 107, 60, 0.1);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: islamicGradientShift 6s ease-in-out infinite;
}

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

.islamic-submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 12px 35px rgba(218, 165, 32, 0.4),
        0 0 30px rgba(0, 107, 60, 0.2);
    animation-duration: 2s;
}

.islamic-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, 
            transparent, 
            rgba(255, 255, 255, 0.2), 
            transparent
        );
    transition: var(--transition);
}

.islamic-submit-btn:hover::before {
    left: 100%;
}

.islamic-submit-btn i {
    transition: var(--transition);
}

.islamic-submit-btn:hover i {
    transform: translateX(5px);
}

.contact-quote {
    margin-top: 3rem;
    text-align: center;
    padding: 2.5rem;
    background: 
        linear-gradient(135deg, 
            var(--bg-secondary) 0%, 
            rgba(218, 165, 32, 0.05) 50%, 
            var(--bg-secondary) 100%
        );
    border-radius: var(--border-radius);
    border-left: 5px solid var(--deep-green);
    border-right: 5px solid var(--primary-gold);
    position: relative;
    overflow: hidden;
}

.contact-quote::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(218, 165, 32, 0.03) 10px,
            rgba(218, 165, 32, 0.03) 20px
        );
    pointer-events: none;
}

.contact-quote .arabic-text {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 4px var(--shadow);
}

.contact-quote .translation {
    font-style: italic;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    position: relative;
    z-index: 2;
    font-weight: 500;
}

.contact-quote .reference {
    color: var(--primary-gold);
    font-weight: 600;
    position: relative;
    z-index: 2;
    font-size: 1rem;
}

/* Mobile Responsive Updates for Contact */
@media (max-width: 768px) {
    .contact-form-container {
        padding: 2rem 1.5rem;
        margin: 0 1rem;
    }
    
    .islamic-form-decoration {
        width: 100px;
        height: 100px;
        top: -5px;
        right: -5px;
    }
    
    .islamic-form-decoration::before {
        top: 15px;
        left: 15px;
        width: 70px;
        height: 70px;
    }
    
    .islamic-form-decoration::after {
        top: 25px;
        left: 25px;
        width: 50px;
        height: 50px;
    }
    
    .islamic-submit-btn {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    .contact-quote {
        margin: 2rem 1rem 0;
        padding: 2rem 1.5rem;
    }
    
    .contact-quote .arabic-text {
        font-size: 1.5rem;
    }
    
    .contact-quote .translation {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .contact-form-container {
        padding: 1.5rem 1rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 1rem;
    }
    
    .islamic-submit-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .contact-quote .arabic-text {
        font-size: 1.3rem;
    }
}

/* Dark mode adjustments for Islamic gradients */
body.dark-mode .contact-form-container {
    background: 
        linear-gradient(var(--bg-primary), var(--bg-primary)) padding-box,
        linear-gradient(135deg, 
            #FFD700 0%, 
            #00C853 25%, 
            #FFD700 50%, 
            #00C853 75%, 
            #FFD700 100%
        ) border-box;
}

body.dark-mode .islamic-submit-btn {
    background: 
        linear-gradient(135deg, 
            #FFD700 0%, 
            #00C853 25%, 
            #FFD700 50%, 
            #00C853 75%, 
            #FFD700 100%
        );
    background-size: 300% 300%;
}

body.dark-mode .contact-quote {
    background: 
        linear-gradient(135deg, 
            var(--bg-secondary) 0%, 
            rgba(255, 215, 0, 0.05) 50%, 
            var(--bg-secondary) 100%
        );
}

/* Contact: Rich Text Editor additions (minimal and consistent with existing theme) */
.rte-toolbar {
  display: flex;
  gap: 0.5rem;
  margin: 0 0 0.6rem 0;
  flex-wrap: wrap;
}

.rte-btn {
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  color: var(--text-dark);
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}
.rte-btn:hover {
  background: rgba(218, 165, 32, 0.08);
  border-color: var(--primary-gold);
  transform: translateY(-1px);
}

/* RTE toolbar active state */
.rte-btn.active {
  border-color: var(--primary-gold);
  background: rgba(218, 165, 32, 0.15);
  color: var(--deep-green);
}


.rte-editor {
  min-height: 180px;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1rem 1.2rem;
  color: var(--text-dark);
  transition: var(--transition);
  outline: none;
  line-height: 1.7;
  word-break: break-word;
}
.rte-editor:focus {
  border-color: var(--primary-gold);
  background: var(--bg-primary);
  box-shadow:
    0 0 0 3px rgba(218, 165, 32, 0.1),
    0 0 20px rgba(0, 107, 60, 0.1);
  transform: translateY(-2px);
}
.rte-editor.rte-empty::before {
  content: attr(data-placeholder);
  color: var(--text-light);
  opacity: 0.7;
}

.rte-editor code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  background: rgba(0,0,0,0.06);
  padding: 0.1rem 0.3rem;
  border-radius: 6px;
}

/* File hint text */
.file-hint {
  display: inline-block;
  margin-top: 0.4rem;
  color: var(--text-light);
}

/* Ensure the contact page message area is LTR while preserving site RTL headings where used */
.contact-form [dir="ltr"] {
  direction: ltr;
  text-align: left;
}

/* Success page buttons alignment */
.contact-section .contact-form-container a.islamic-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.6rem;
}



/* Blog Page Styles */
.blog-section {
    padding: 2rem 0 4rem;
}

.blog-filters {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    color: var(--text-dark);
    font-weight: 600;
}

.filter-group select {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-primary);
    color: var(--text-dark);
    font-size: 1rem;
    transition: var(--transition);
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary-gold);
}

.blog-posts {
    display: grid;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.blog-post {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 6px 20px var(--shadow);
    transition: var(--transition);
    border-left: 4px solid var(--primary-gold);
}

.blog-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow);
}

.post-image {
    height: 250px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.post-image img:hover {
    transform: scale(1.05);
}

.post-content {
    padding: 2rem;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.post-date {
    color: var(--text-light);
    font-size: 0.9rem;
}

.post-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    background: var(--primary-gold);
    color: var(--white);
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.post-content h2 {
    color: var(--deep-green);
    margin-bottom: 1rem;
    font-size: 1.8rem;
    line-height: 1.3;
}

.post-content p {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.read-more {
    color: var(--primary-gold);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.read-more:hover {
    color: var(--dark-gold);
    text-decoration: underline;
}

/* Login Page Styles */
.login-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 1rem 2rem;
    background: linear-gradient(135deg, var(--cream), var(--dark-cream));
    margin-top: var(--header-height);
}

.login-container {
    max-width: 500px;
    width: 100%;
    position: relative;
}

.login-decoration {
    position: absolute;
    width: 120px;
    height: 120px;
    border: 3px solid var(--primary-gold);
    border-radius: 50%;
    opacity: 0.3;
    animation: float 6s ease-in-out infinite;
}

.login-decoration:first-child {
    top: -30px;
    left: -30px;
    animation-delay: 0s;
}

.login-decoration:last-child {
    bottom: -30px;
    right: -30px;
    border-color: var(--deep-green);
    animation-delay: 3s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.login-card {
    background: var(--bg-primary);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 50px var(--shadow);
    text-align: center;
    position: relative;
    z-index: 2;
    border: 3px solid var(--primary-gold);
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(218, 165, 32, 0.05), transparent, rgba(0, 107, 60, 0.05));
    z-index: -1;
}

.login-header h1 {
    color: var(--deep-green);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.login-header .arabic-text {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.login-content p {
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.6;
    font-size: 1.1rem;
}

.auth-btn {
    background: linear-gradient(45deg, var(--primary-gold), var(--dark-gold));
    color: var(--white);
    border: none;
    padding: 1.2rem 2.5rem;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 0 auto 2rem;
    box-shadow: 0 6px 20px rgba(218, 165, 32, 0.3);
}

.auth-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(218, 165, 32, 0.4);
}

.login-quote {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--deep-green);
    margin-top: 1rem;
}

/* Dashboard Page Styles */
.dashboard-section {
    padding: 2rem 0 4rem;
}

.dashboard-header {
    text-align: center;
    padding: 6rem 0 3rem;
    margin-top: var(--header-height);
}

.dashboard-header h1 {
    font-size: 2.5rem;
    color: var(--deep-green);
    margin-bottom: 0.5rem;
}

.dashboard-header .arabic-text {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.dashboard-content {
    max-width: 1200px;
    margin: 0 auto;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.dashboard-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 6px 20px var(--shadow);
    border-top: 4px solid var(--primary-gold);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow);
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(218, 165, 32, 0.1), transparent);
    border-radius: 50%;
}

.dashboard-card h2 {
    color: var(--deep-green);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    position: relative;
    z-index: 2;
}

.welcome-card {
    grid-column: 1 / -1;
}

.personal-message p {
    line-height: 1.7;
    color: var(--text-dark);
    margin-bottom: 2rem;
    text-align: justify;
    position: relative;
    z-index: 2;
}

.message-quote {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    border-left: 4px solid var(--deep-green);
    position: relative;
    z-index: 2;
}

.user-content {
    display: grid;
    gap: 1rem;
    position: relative;
    z-index: 2;
}

.content-item {
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
}

.content-item:hover {
    background: var(--bg-tertiary);
}

.content-item h3 {
    color: var(--deep-green);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.content-item p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.content-btn {
    background: var(--primary-gold);
    color: var(--white);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
    font-weight: 500;
}

.content-btn:hover {
    background: var(--dark-gold);
    transform: translateY(-2px);
}

/* Footer Styles */
.footer {
    background: var(--deep-green);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

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

.footer-section h3 {
    color: var(--primary-gold);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.footer-section p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--primary-gold);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary-gold);
    color: var(--white);
    border-radius: 50%;
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--dark-gold);
    transform: translateY(-2px);
}

.footer-login-btn {
    display: inline-block;
    background: var(--primary-gold);
    color: var(--white);
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 600;
}

.footer-login-btn:hover {
    background: var(--dark-gold);
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid rgba(218, 165, 32, 0.3);
    padding-top: 2rem;
    text-align: center;
}

.footer-quote {
    margin-top: 1rem;
}

.footer-quote .arabic-text {
    color: var(--primary-gold);
    font-size: 1.2rem;
}

/* Utility Classes */
.fade-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.loading {
    opacity: 0.5;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-gold);
    color: var(--white);
    padding: 8px;
    text-decoration: none;
    border-radius: 0 0 4px 4px;
    z-index: 10000;
    transition: var(--transition);
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
}

/* Focus styles for accessibility */
button:focus,
input:focus,
textarea:focus,
select:focus,
a:focus {
    outline: 2px solid var(--primary-gold);
    outline-offset: 2px;
}

/* Dashboard Protection Loading Overlay */
#auth-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--cream);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-dark);
}

.auth-loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--primary-gold);
    border-top: 4px solid transparent;
    border-radius: 50%;
    animation: auth-spin 1s linear infinite;
    margin: 0 auto 2rem;
}

@keyframes auth-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.dashboard-section.fade-in {
    animation: dashboardFadeIn 0.5s ease-out forwards;
}

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

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: var(--header-height);
        flex-direction: column;
        background-color: var(--bg-primary);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px var(--shadow);
        padding: 2rem 0;
        gap: 1rem;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .theme-controls {
        margin-left: 0.5rem;
    }
    
    .hero-content {
        padding: 1rem;
    }
    
    .main-calligraphy {
        font-size: 2.5rem;
    }
    
    .welcome-message h2 {
        font-size: 2rem;
    }
    
    .page-header h1 {
        font-size: 2.5rem;
    }
    
    .blog-filters {
        flex-direction: column;
        align-items: center;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .nav-container {
        padding: 0.5rem;
    }
    
    .about-card,
    .contact-form-container,
    .login-card {
        padding: 2rem 1.5rem;
    }
    
    .main-calligraphy {
        font-size: 2rem;
    }
    
    .welcome-message h2 {
        font-size: 1.8rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .quote-card {
        padding: 2rem 1.5rem;
    }
    
    .arabic-quote {
        font-size: 1.5rem;
    }
}

/* High contrast mode support */
@media (prefers-contrast: more) {
    :root {
        --shadow: rgba(0, 0, 0, 0.3);
    }
    
    body.dark-mode {
        --shadow: rgba(255, 255, 255, 0.3);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    .navbar,
    .footer,
    .theme-toggle,
    .hamburger,
    .auth-btn,
    .login-btn {
        display: none;
    }
    
    .page-header {
        margin-top: 0;
        padding-top: 2rem;
    }
    
    .hero-section {
        margin-top: 0;
    }
    
    * {
        color: black !important;
        background: white !important;
    }
}

/* ==========================================================================
   Blog Post Styles
========================================================================== */

/* Post Header Styles */
.post-header {
    text-align: center;
    padding: 8rem 0 3rem;
    margin-top: var(--header-height);
    background: linear-gradient(135deg, var(--cream), var(--dark-cream));
    position: relative;
    overflow: hidden;
}

.post-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 30% 30%, rgba(218, 165, 32, 0.05), transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(0, 107, 60, 0.05), transparent 50%);
    pointer-events: none;
}

.post-breadcrumb {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    position: relative;
    z-index: 2;
}

.post-breadcrumb a {
    color: var(--primary-gold);
    text-decoration: none;
    transition: var(--transition);
}

.post-breadcrumb a:hover {
    color: var(--dark-gold);
}

.post-breadcrumb span {
    margin: 0 0.5rem;
}

.post-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--deep-green);
    margin-bottom: 2rem;
    font-weight: 700;
    line-height: 1.2;
    position: relative;
    z-index: 2;
}

.post-meta-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
}

.post-date,
.post-read-time {
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.post-tags-header {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Post Image Section */
.post-image-section {
    padding: 2rem 0;
    background: var(--bg-primary);
}

.post-featured-image {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 20px 50px var(--shadow);
}

.post-featured-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        45deg,
        rgba(218, 165, 32, 0.1),
        transparent,
        rgba(0, 107, 60, 0.1)
    );
    pointer-events: none;
}

/* Post Content Section */
.post-content-section {
    padding: 4rem 0;
    background: var(--bg-primary);
}

.post-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.post-quote {
    background: var(--bg-secondary);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    margin: 3rem 0;
    border-left: 5px solid var(--deep-green);
    border-right: 5px solid var(--primary-gold);
    position: relative;
    box-shadow: 0 10px 30px var(--shadow);
}

.post-quote::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background:
        linear-gradient(45deg,
            rgba(218, 165, 32, 0.1),
            transparent,
            rgba(0, 107, 60, 0.1)
        );
    border-radius: var(--border-radius);
    z-index: -1;
}

.post-quote .arabic-text {
    font-size: 2rem;
    color: var(--deep-green);
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px var(--shadow);
}

.post-quote .translation {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-style: italic;
    font-weight: 500;
}

.post-quote .reference {
    color: var(--primary-gold);
    font-weight: 600;
}

.post-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.post-intro {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--deep-green);
    margin-bottom: 2rem;
    line-height: 1.6;
    padding: 1.5rem;
    background: rgba(218, 165, 32, 0.05);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-gold);
}

.post-text h2 {
    font-size: 2rem;
    color: var(--deep-green);
    margin: 3rem 0 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.post-text h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-gold), var(--deep-green));
    border-radius: 2px;
}

.post-text h3 {
    font-size: 1.5rem;
    color: var(--primary-gold);
    margin: 2rem 0 1rem;
}

.post-text p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.post-blockquote {
    background: var(--bg-secondary);
    padding: 2rem;
    border-left: 4px solid var(--primary-gold);
    border-radius: var(--border-radius);
    margin: 2rem 0;
    position: relative;
}

.post-blockquote::before {
    content: '"';
    font-size: 4rem;
    color: var(--primary-gold);
    position: absolute;
    top: -10px;
    left: 20px;
    font-family: Georgia, serif;
}

.post-blockquote p {
    font-style: italic;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.post-blockquote cite {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 600;
    text-align: right;
    display: block;
}

.post-list {
    margin: 2rem 0;
    padding-left: 0;
    list-style: none;
}

.post-list li {
    margin-bottom: 1rem;
    padding-left: 2rem;
    position: relative;
    line-height: 1.6;
}

.post-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.8rem;
    width: 8px;
    height: 8px;
    background: var(--primary-gold);
    border-radius: 50%;
}

.post-list li strong {
    color: var(--deep-green);
}

/* Post Footer Styles */
/* Post Footer Styles - Updated */
.post-footer {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 3px solid transparent;
    border-image: linear-gradient(90deg, var(--primary-gold), var(--deep-green)) 1;
}

.post-navigation-full {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: stretch;
}

.nav-prev,
.nav-next {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--text-dark);
    transition: var(--transition);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 2px solid var(--border-color);
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
    min-height: 120px;
}

.nav-prev::before,
.nav-next::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        rgba(218, 165, 32, 0.1),
        rgba(0, 107, 60, 0.1)
    );
    transition: var(--transition);
    z-index: 1;
}

.nav-prev:hover::before,
.nav-next:hover::before {
    left: 0;
}

.nav-prev:hover,
.nav-next:hover {
    border-color: var(--primary-gold);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--shadow);
}

.nav-content {
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

.nav-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-title {
    font-weight: 600;
    color: var(--deep-green);
    font-size: 1.1rem;
    line-height: 1.3;
}

.nav-prev i,
.nav-next i {
    font-size: 1.5rem;
    color: var(--primary-gold);
    transition: var(--transition);
    position: relative;
    z-index: 2;
}

.nav-prev:hover i {
    transform: translateX(-5px);
}

.nav-next:hover i {
    transform: translateX(5px);
}

/* First/Last Post Placeholder */
.nav-prev-placeholder,
.nav-next-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 2px dashed var(--border-color);
    background: rgba(218, 165, 32, 0.05);
    min-height: 120px;
}

.nav-first-post,
.nav-last-post {
    color: var(--text-light);
    font-style: italic;
    text-align: center;
    font-size: 0.9rem;
}

/* Mobile Responsive for Blog Posts */
@media (max-width: 768px) {
    .post-header {
        padding: 6rem 0 2rem;
    }

    .post-title {
        font-size: 2.5rem;
    }

    .post-meta-header {
        flex-direction: column;
        gap: 1rem;
    }

    .post-featured-image img {
        height: 250px;
    }

    .post-content {
        margin: 0 1rem;
    }

    .post-quote {
        padding: 2rem 1.5rem;
        margin: 2rem 0;
    }

    .post-quote .arabic-text {
        font-size: 1.5rem;
    }

    .post-intro {
        padding: 1rem;
        font-size: 1.1rem;
    }

    .post-text h2 {
        font-size: 1.8rem;
    }

    .post-footer {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .post-navigation-full {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .nav-prev,
    .nav-next {
        padding: 1.5rem;
        min-height: 100px;
    }

    .nav-title {
        font-size: 1rem;
    }

    .nav-prev i,
    .nav-next i {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .post-header {
        padding: 5rem 0 2rem;
    }

    .post-title {
        font-size: 2rem;
    }

    .post-content {
        margin: 0 0.5rem;
    }

    .post-quote {
        padding: 1.5rem 1rem;
    }

    .post-quote .arabic-text {
        font-size: 1.3rem;
    }

    .post-text {
        font-size: 1rem;
    }

    .post-intro {
        font-size: 1rem;
    }

    .post-text h2 {
        font-size: 1.5rem;
    }

    .nav-prev,
    .nav-next {
        padding: 1rem;
        gap: 0.8rem;
        min-height: 80px;
    }

    .nav-title {
        font-size: 0.9rem;
    }

    .nav-label {
        font-size: 0.8rem;
    }

    .nav-prev i,
    .nav-next i {
        font-size: 1.1rem;
    }
}

/* Print Styles for Blog Posts */
@media print {
    .post-header,
    .post-image-section {
        margin-top: 0;
        padding-top: 2rem;
    }

    .post-featured-image {
        box-shadow: none;
    }

    .post-navigation-full {
        display: none;
    }
}

/* Enhanced post navigation for dark mode */
body.dark-mode .nav-prev,
body.dark-mode .nav-next {
    background: var(--bg-tertiary);
    border-color: #404040;
}

body.dark-mode .nav-prev:hover,
body.dark-mode .nav-next:hover {
    border-color: #FFD700;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.2);
}

body.dark-mode .nav-prev::before,
body.dark-mode .nav-next::before {
    background: linear-gradient(90deg,
        rgba(255, 215, 0, 0.1),
        rgba(0, 200, 83, 0.1)
    );
}

body.dark-mode .nav-prev-placeholder,
body.dark-mode .nav-next-placeholder {
    background: rgba(255, 215, 0, 0.05);
    border-color: #404040;
}

/* ==========================================================================
   Shayari Page Styles - Add to end of existing CSS file
========================================================================== */

/* Shayari Page Header */
.shayari-header {
    background: linear-gradient(135deg,
        var(--cream) 0%,
        rgba(218, 165, 32, 0.1) 50%,
        var(--dark-cream) 100%
    );
    position: relative;
    overflow: hidden;
}

.shayari-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 25% 25%, rgba(218, 165, 32, 0.1), transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(0, 107, 60, 0.1), transparent 50%);
    pointer-events: none;
    animation: poetryPattern 20s ease-in-out infinite;
}

@keyframes poetryPattern {
    0%, 100% { transform: translateX(0) translateY(0) rotate(0deg); }
    33% { transform: translateX(20px) translateY(-10px) rotate(1deg); }
    66% { transform: translateX(-15px) translateY(15px) rotate(-1deg); }
}

.shayari-header h1 {
    font-family: var(--font-arabic);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    color: var(--deep-green);
    margin-bottom: 0.5rem;
    direction: rtl;
    text-shadow: 2px 2px 4px var(--shadow);
    position: relative;
    z-index: 2;
}

.header-subtitle {
    font-size: 1.3rem;
    color: var(--primary-gold);
    font-style: italic;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.header-description {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 800px;
    margin: 1rem auto 0;
    line-height: 1.6;
    position: relative;
    z-index: 2;
}

.shayari-breadcrumb {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    position: relative;
    z-index: 2;
}

.shayari-breadcrumb a {
    color: var(--primary-gold);
    text-decoration: none;
    transition: var(--transition);
}

.shayari-breadcrumb a:hover {
    color: var(--dark-gold);
}

.shayari-breadcrumb span {
    margin: 0 0.5rem;
}

/* Poet Introduction Section */
.poet-intro-section {
    padding: 3rem 0;
    background: var(--bg-primary);
}

.poet-intro-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2rem;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-secondary);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px var(--shadow);
    border-left: 4px solid var(--primary-gold);
    position: relative;
    overflow: hidden;
}

.poet-intro-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background:
        conic-gradient(
            from 45deg,
            transparent,
            rgba(218, 165, 32, 0.05),
            transparent,
            rgba(0, 107, 60, 0.05),
            transparent
        );
    animation: poeticRotation 30s linear infinite;
    z-index: 1;
}

@keyframes poeticRotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.poet-image {
    position: relative;
    z-index: 2;
}

.poet-avatar {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--primary-gold), var(--deep-green));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--white);
    box-shadow: 0 8px 25px rgba(218, 165, 32, 0.3);
    position: relative;
}

.poet-avatar::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-gold), var(--deep-green));
    z-index: -1;
    animation: poeticGlow 3s ease-in-out infinite;
}

@keyframes poeticGlow {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

.poet-info {
    position: relative;
    z-index: 2;
}

.poet-info h2 {
    color: var(--deep-green);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-arabic);
}

.poet-years {
    color: var(--primary-gold);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.poet-description {
    color: var(--text-dark);
    line-height: 1.7;
    font-size: 1rem;
    text-align: justify;
}

/* Shayari Collection Section */
.shayari-collection-section {
    padding: 4rem 0;
    background: var(--cream);
    position: relative;
}

.collection-header {
    text-align: center;
    margin-bottom: 3rem;
}

.collection-header h2 {
    font-family: var(--font-arabic);
    font-size: 2.5rem;
    color: var(--deep-green);
    margin-bottom: 1rem;
    direction: rtl;
}

.collection-ornament {
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-gold), var(--deep-green));
    margin: 0 auto;
    border-radius: 2px;
    position: relative;
}

.collection-ornament::before,
.collection-ornament::after {
    content: '';
    position: absolute;
    top: -4px;
    width: 12px;
    height: 12px;
    background: var(--deep-green);
    border-radius: 50%;
}

.collection-ornament::before {
    left: -16px;
}

.collection-ornament::after {
    right: -16px;
    background: var(--primary-gold);
}

/* Shayari Grid */
.shayari-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

/* Shayari Cards */
.shayari-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: 0 8px 25px var(--shadow);
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
    cursor: pointer;
}

.shayari-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.shayari-card::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 2px;
    background: linear-gradient(135deg,
        var(--primary-gold) 0%,
        var(--deep-green) 50%,
        var(--primary-gold) 100%
    );
    border-radius: inherit;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: xor;
    z-index: -1;
    opacity: 0;
    transition: var(--transition);
}

.shayari-card:hover::before {
    opacity: 1;
}

.shayari-card.hover-effect {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px var(--shadow);
}

.shayari-number {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-gold), var(--deep-green));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(218, 165, 32, 0.4);
    z-index: 2;
}

.shayari-content {
    position: relative;
    z-index: 1;
}

/* Urdu Text Styling */
.urdu-text {
    font-family: var(--font-arabic);
    font-size: 1.6rem;
    line-height: 2.2;
    color: var(--deep-green);
    text-align: right;
    direction: rtl;
    margin-bottom: 1.5rem;
    font-weight: 600;
    text-shadow: 1px 1px 2px var(--shadow);
}

/* Translation Styling */
.translation {
    font-size: 1.1rem;
    color: var(--text-dark);
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    text-align: left;
    padding-left: 1rem;
    border-left: 3px solid var(--primary-gold);
    background: rgba(218, 165, 32, 0.05);
    padding: 1rem;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

/* Theme Tags */
.theme-tag {
    display: inline-block;
    background: linear-gradient(45deg, var(--primary-gold), var(--dark-gold));
    color: var(--white);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(218, 165, 32, 0.3);
}

/* Poetry Reflection Section */
.poetry-reflection {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 3rem;
    border: 3px solid var(--primary-gold);
    position: relative;
    overflow: hidden;
    margin-top: 2rem;
}

.poetry-reflection::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 15px,
            rgba(218, 165, 32, 0.03) 15px,
            rgba(218, 165, 32, 0.03) 30px
        );
    pointer-events: none;
}

.reflection-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.reflection-content h3 {
    font-family: var(--font-arabic);
    font-size: 1.8rem;
    color: var(--deep-green);
    margin-bottom: 1.5rem;
    direction: rtl;
}

.reflection-content p {
    color: var(--text-dark);
    line-height: 1.7;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    text-align: justify;
}

.reflection-quote {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--deep-green);
    margin-top: 1.5rem;
}

.reflection-quote .urdu-text {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.reflection-quote .translation {
    background: none;
    border: none;
    padding: 0;
    margin-bottom: 0.5rem;
    text-align: center;
}

.reflection-quote .author {
    color: var(--primary-gold);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Mobile Responsive Design for Shayari */
@media (max-width: 768px) {
    .shayari-header h1 {
        font-size: 2.5rem;
    }

    .poet-intro-card {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 2rem;
    }

    .poet-avatar {
        margin: 0 auto;
    }

    .shayari-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .shayari-card {
        padding: 1.5rem;
    }

    .urdu-text {
        font-size: 1.4rem;
        line-height: 2;
    }

    .translation {
        font-size: 1rem;
        padding: 0.8rem;
    }

    .poetry-reflection {
        padding: 2rem 1.5rem;
    }

    .reflection-content h3 {
        font-size: 1.5rem;
    }

    .reflection-content p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .shayari-header {
        padding: 5rem 0 2rem;
    }

    .shayari-header h1 {
        font-size: 2rem;
    }

    .header-subtitle {
        font-size: 1.1rem;
    }

    .shayari-card {
        padding: 1rem;
    }

    .shayari-number {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }

    .urdu-text {
        font-size: 1.2rem;
        line-height: 1.8;
    }

    .translation {
        font-size: 0.9rem;
    }

    .theme-tag {
        font-size: 0.7rem;
        padding: 0.3rem 0.8rem;
    }
}

/* Dark Mode Adjustments for Shayari */
body.dark-mode .shayari-header::before {
    background:
        radial-gradient(circle at 25% 25%, rgba(255, 215, 0, 0.1), transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(0, 200, 83, 0.1), transparent 50%);
}

body.dark-mode .poet-intro-card::before {
    background:
        conic-gradient(
            from 45deg,
            transparent,
            rgba(255, 215, 0, 0.05),
            transparent,
            rgba(0, 200, 83, 0.05),
            transparent
        );
}

body.dark-mode .shayari-card::before {
    background: linear-gradient(135deg,
        #FFD700 0%,
        #00C853 50%,
        #FFD700 100%
    );
}

body.dark-mode .theme-tag {
    background: linear-gradient(45deg, #FFD700, #DAA520);
}

/* Print Styles for Shayari */
@media print {
    .shayari-header,
    .poet-intro-section {
        margin-top: 0;
        padding-top: 1rem;
    }

    .shayari-grid {
        grid-template-columns: 1fr;
    }

    .shayari-card {
        break-inside: avoid;
        margin-bottom: 2rem;
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .urdu-text,
    .translation {
        color: black !important;
    }
}

/* Animation for page fade-in */
.shayari-collection-section.fade-in {
    animation: shayariFadeIn 0.8s ease-out forwards;
}

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

/* Accessibility improvements */
.shayari-card:focus {
    outline: 3px solid var(--primary-gold);
    outline-offset: 2px;
}

.urdu-text {
    word-spacing: 0.2em;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .urdu-text {
        text-shadow: none;
        font-weight: 700;
    }

    .theme-tag {
        border: 2px solid var(--text-dark);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .poetryPattern,
    .poeticRotation,
    .poeticGlow,
    .shayariFadeIn {
        animation: none !important;
    }

    .shayari-card {
        transition: none !important;
    }
}

/* [NEW] Session timer in header */
.session-timer-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: 1rem;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: rgba(218, 165, 32, 0.12);
  border: 1px solid var(--primary-gold);
}

.session-label {
  font-size: 0.85rem;
  color: var(--text-dark);
}

.session-timer {
  font-weight: 700;
  color: var(--deep-green);
  min-width: 42px;
  text-align: center;
}

/* Dark mode tweaks */
body.dark-mode .session-timer-wrap {
  background: rgba(255, 215, 0, 0.12);
}
body.dark-mode .session-label {
  color: var(--text-dark);
}
body.dark-mode .session-timer {
  color: var(--primary-gold);
}

