/*
=================================
PIXCRYPT CSS V29.0 - ENHANCED EDITION
- Fixed password toggle icon styling
- Enhanced password strength meter with animations
- Improved visual hierarchy
- Added smooth transitions
- Better mobile responsiveness
=================================
*/

/* 1. ROOT VARIABLES & THEME DEFINITIONS */
:root {
    --palette-blue: #00d4ff;
    --palette-purple: #6c5ce7;
    --palette-green: #00ff88;
    --gradient-primary: linear-gradient(135deg, var(--palette-blue) 0%, var(--palette-purple) 100%);
    --color-step-1: #3498db; --color-step-2: #9b59b6; --color-step-3: #2ecc71;
    --color-feature-1: #e74c3c; --color-feature-2: #f1c40f; --color-feature-3: #1abc9c;
    --color-feature-4: #e67e22; --color-feature-5: #34495e; --color-feature-6: #27ae60;
    --color-error: #e74c3c;
    --color-success: #2ecc71;
    --color-strength-0: #e74c3c;
    --color-strength-1: #e67e22;
    --color-strength-2: #f1c40f;
    --color-strength-3: #2196f3;
    --color-strength-4: #2ecc71;
}

html[data-theme='dark'] {
    --primary-color: var(--palette-blue);
    --accent-color: var(--palette-green);
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --border-color: #333333;
    --header-bg: rgba(10, 10, 10, 0.85);
    --shadow-color: rgba(0, 212, 255, 0.1);
}

html[data-theme='light'] {
    --primary-color: var(--palette-purple);
    --accent-color: #00c269;
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f7;
    --bg-tertiary: #e9e9ed;
    --text-primary: #1d1d1f;
    --text-secondary: #515154;
    --border-color: #d2d2d7;
    --header-bg: rgba(255, 255, 255, 0.85);
    --shadow-color: rgba(108, 92, 231, 0.1);
}

/* 2. BASE STYLES */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { 
    scroll-behavior: smooth; 
    /* --- (FIX) Force-disable transforms/filters that break .modal --- */
    /* This is the fix for the /aes article modal bug */
    transform: none !important;
    filter: none !important;
}
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.7;
    transition: background-color 0.3s ease, color 0.3s ease;
    
    /* --- (FIX) Force-disable transforms/filters that break .modal --- */
    /* This is the fix for the /aes article modal bug */
    transform: none !important;
    filter: none !important;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
h1 { font-size: 2.5rem; } h2 { font-size: 2rem; } h3 { font-size: 1.5rem; }
h1, h2, h3, h4, h5 { margin-bottom: 1rem; font-weight: 700; line-height: 1.3; }
h5 { font-size: 1.1rem; }
p { margin-bottom: 1.5rem; color: var(--text-secondary); max-width: 65ch; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.75rem; padding: 12px 24px; border: none; border-radius: 8px; font-size: 1rem; font-weight: 600; text-decoration: none; cursor: pointer; transition: all 0.3s ease; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--gradient-primary); color: white; }
.btn-secondary { background: transparent; color: var(--text-primary); border: 2px solid var(--border-color); }
.btn-secondary:hover { background: var(--bg-tertiary); border-color: var(--primary-color); }
.btn-large { padding: 16px 32px; font-size: 1.1rem; }
.btn-full { width: 100%; }
.highlight { background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.section-title { text-align: center; margin-bottom: 1rem; background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.section-subtitle { text-align: center; font-size: 1.2rem; color: var(--text-secondary); margin-bottom: 4rem; max-width: 50ch; margin-left: auto; margin-right: auto; }

/* 3. HEADER & NAVIGATION */
.header { position: fixed; top: 0; left: 0; right: 0; background: var(--header-bg); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border-color); z-index: 1000; transition: background-color 0.3s ease, border-color 0.3s ease; }
.nav { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.nav-brand { display: flex; align-items: center; gap: 0.5rem; font-size: 1.5rem; font-weight: 900; color: var(--primary-color); text-decoration: none; }
.nav-actions { display: flex; align-items: center; gap: 1rem; } /* (FIX) Was 'none', changed to 'flex' */
.theme-toggle { background: none; border: none; cursor: pointer; color: var(--text-secondary); padding: 0.5rem; display: flex; align-items: center; justify-content: center; transition: color 0.3s ease; }
.theme-toggle:hover { color: var(--text-primary); }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
html[data-theme='light'] .theme-toggle .icon-sun { display: block; }
html[data-theme='light'] .theme-toggle .icon-moon { display: none; }
#desktop-try-now-btn { display: none; }
.nav-toggle { display: block; cursor: pointer; z-index: 1100; color: var(--text-primary); }
.nav-menu { position: fixed; top: 0; right: -100%; width: 100%; height: 100vh; background: var(--bg-secondary); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2.5rem; transition: right 0.4s ease-in-out, background-color 0.3s ease; z-index: 1050; padding: 2rem; }
.nav-menu.show-menu { right: 0; }
.nav-list { list-style: none; display: flex; flex-direction: column; align-items: center; gap: 2rem; padding: 0; }
.nav-link { font-size: 1.5rem; color: var(--text-secondary); text-decoration: none; transition: color 0.3s ease; }
.nav-link:hover { color: var(--text-primary); }
#mobile-try-now-btn { display: block; margin-top: 2rem; }
@media (min-width: 769px) {
    .nav-menu { position: static; height: auto; width: auto; background: none; flex-direction: row; gap: 2rem; display: flex !important; padding: 0; }
    .nav-list { flex-direction: row; gap: 2rem; }
    .nav-link { font-size: 1rem; }
    .nav-toggle { display: none; }
    .nav-actions { display: flex; }
    #desktop-try-now-btn { display: inline-flex; }
    #mobile-try-now-btn { display: none; }
}

/* 4. MAIN CONTENT SECTIONS */
main { padding-top: 70px; }
.hero { padding: 80px 0; }
.hero-content { display: grid; grid-template-columns: 1fr; gap: 4rem; align-items: center; text-align: center; }
.hero-cta { display: flex; flex-direction: column; gap: 1rem; align-items: center; margin-top: 2rem; }
.hero-visual { margin-top: 3rem; }
.encrypt-demo { display: flex; flex-direction: column; align-items: center; gap: 1rem; padding: 2rem; background: var(--bg-tertiary); border-radius: 16px; border: 1px solid var(--border-color); transition: background-color 0.3s ease, border-color 0.3s ease; }
.image-placeholder, .encrypted-result { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 1.5rem; border-radius: 12px; border: 2px dashed var(--border-color); min-width: 150px; transition: border-color 0.3s ease; }
.lock-icon { display: flex; align-items: center; justify-content: center; width: 60px; height: 60px; background: var(--gradient-primary); border-radius: 50%; color: white; }
.arrow { transform: rotate(90deg); color: var(--primary-color); }
@media (min-width: 769px) {
    h1 { font-size: 3.5rem; }
    .hero-content { grid-template-columns: 1fr 1fr; text-align: left; }
    .hero-cta { flex-direction: row; }
    .encrypt-demo { flex-direction: row; gap: 1.5rem; }
    .arrow { transform: rotate(0); }
}
section { padding: 80px 0; }
.how-it-works { background: var(--bg-secondary); transition: background-color 0.3s ease; }
.steps, .features-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.step, .feature { text-align: center; padding: 2rem; background: var(--bg-primary); border-radius: 16px; border: 1px solid var(--border-color); transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease; opacity: 0; transform: translateY(30px); }
.step.animate-in, .feature.animate-in { opacity: 1; transform: translateY(0); }
.step-icon, .feature-icon { display: flex; align-items: center; justify-content: center; width: 60px; height: 60px; margin: 0 auto 1.5rem; color: white; transition: background-color 0.3s ease; }
.step-icon { border-radius: 50%; }
.feature-icon { border-radius: 12px; }
.step-1 .step-icon { background-color: var(--color-step-1); }
.step-2 .step-icon { background-color: var(--color-step-2); }
.step-3 .step-icon { background-color: var(--color-step-3); }
.feature-1 .feature-icon { background-color: var(--color-feature-1); }
.feature-2 .feature-icon { background-color: var(--color-feature-2); }
.feature-3 .feature-icon { background-color: var(--color-feature-3); }
.feature-4 .feature-icon { background-color: var(--color-feature-4); }
.feature-5 .feature-icon { background-color: var(--color-feature-5); }
.feature-6 .feature-icon { background-color: var(--color-feature-6); }
@media (min-width: 769px) {
    .steps { grid-template-columns: repeat(3, 1fr); }
    .features-grid { grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); }
    .feature { text-align: left; }
    .feature-icon { margin: 0; margin-bottom: 1.5rem; }
    .step:hover, .feature:hover { transform: translateY(-5px); }
    .step-1:hover { box-shadow: 0 10px 30px -10px var(--color-step-1); }
    .step-2:hover { box-shadow: 0 10px 30px -10px var(--color-step-2); }
    .step-3:hover { box-shadow: 0 10px 30px -10px var(--color-step-3); }
    .feature-1:hover { box-shadow: 0 10px 30px -10px var(--color-feature-1); }
    .feature-2:hover { box-shadow: 0 10px 30px -10px var(--color-feature-2); }
    .feature-3:hover { box-shadow: 0 10px 30px -10px var(--color-feature-3); }
    .feature-4:hover { box-shadow: 0 10px 30px -10px var(--color-feature-4); }
    .feature-5:hover { box-shadow: 0 10px 30px -10px var(--color-feature-5); }
    .feature-6:hover { box-shadow: 0 10px 30px -10px var(--color-feature-6); }
}

/* 4.5. TRUST BAR SECTION (NEW) */
.trust-bar { padding: 5rem 0 2rem 0; background-color: var(--bg-primary); border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); padding-bottom: 80px; }
.trust-bar-title { text-align: center; background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; font-size: 2rem; font-weight: 700; margin-bottom: 3rem; }
.trust-bar-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: start; }
.trust-item { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 16px; padding: 2rem; transition: all 0.3s ease; text-align: left; display: flex; align-items: center; gap: 1.5rem; }
.trust-item:hover { transform: translateY(-5px); }
.trust-bar-grid .trust-item:nth-child(1):hover { border-color: var(--color-step-1); box-shadow: 0 5px 30px 0px var(--color-step-1); }
.trust-bar-grid .trust-item:nth-child(2):hover { border-color: var(--color-step-2); box-shadow: 0 5px 30px 0px var(--color-step-2); }
.trust-bar-grid .trust-item:nth-child(3):hover { border-color: var(--color-step-3); box-shadow: 0 5px 30px 0px var(--color-step-3); }
.trust-item svg { width: 40px; height: 40px; margin-bottom: 0; flex-shrink: 0; transition: color 0.3s ease; }
.trust-bar-grid .trust-item:nth-child(1) svg { color: var(--color-step-1); }
.trust-bar-grid .trust-item:nth-child(2) svg { color: var(--color-step-2); }
.trust-bar-grid .trust-item:nth-child(3) svg { color: var(--color-step-3); }
.trust-item h5 { font-size: 1.1rem; color: var(--text-primary); margin-bottom: 0.25rem; font-weight: 600; }
.trust-item p { font-size: 0.9rem; color: var(--text-secondary); margin: 0; max-width: 100%; line-height: 1.4; }
.trust-item div { display: flex; flex-direction: column; }
@media (min-width: 769px) {
    .trust-bar { padding-top: 5rem; padding-bottom: 5rem; }
    .trust-bar-grid { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
    .trust-item { padding: 2rem; text-align: center; display: block; }
    .trust-item svg { margin: 0 auto 1rem auto; }
    .trust-item h5 { margin-bottom: 0.5rem; }
    .trust-item p { margin: 0 auto; }
}
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { margin-bottom: 1rem; background: var(--bg-secondary); border-radius: 12px; border: 1px solid var(--border-color); overflow: hidden; transition: background-color 0.3s ease, border-color 0.3s ease; }
.faq-question { display: flex; align-items: center; justify-content: space-between; padding: 1.5rem; cursor: pointer; }
.faq-question i { transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1); }
.faq-item.active .faq-question i { transform: rotate(180deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s cubic-bezier(0.25, 0.1, 0.25, 1), padding 0.4s cubic-bezier(0.25, 0.1, 0.25, 1); }
.faq-item.active .faq-answer { max-height: 200px; padding: 0 1.5rem 1.5rem; }
.final-cta { background: var(--bg-secondary); text-align: center; transition: background-color 0.3s ease; }
.final-cta p { margin-left: auto; margin-right: auto; }

/* 5. FOOTER */
.footer { background: var(--bg-primary); border-top: 1px solid var(--border-color); padding: 4rem 0 2rem; position: relative; transition: background-color 0.3s ease, border-color 0.3s ease; }
.footer-content { display: grid; grid-template-columns: 1fr; gap: 3rem; margin-bottom: 3rem; text-align: center; }
.footer-brand .brand { display: flex; align-items: center; justify-content: center; gap: 0.5rem; font-size: 1.5rem; font-weight: 900; color: var(--primary-color); text-decoration: none; margin-bottom: 1rem; }
.footer-brand p { margin-left: auto; margin-right: auto; }
.footer-links { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.link-group h4 { margin-bottom: 1rem; color: var(--text-primary); }
.link-group a { display: block; color: var(--text-secondary); text-decoration: none; margin-bottom: 0.5rem; transition: color 0.3s ease; padding: 0.25rem 0; }
.link-group a:hover { color: var(--primary-color); }
.footer-bottom { display: flex; flex-direction: column; align-items: center; gap: 1rem; padding-top: 2rem; border-top: 1px solid var(--border-color); transition: border-color 0.3s ease; }
.social-links { display: flex; gap: 1.5rem; }
.social-links a { color: var(--text-secondary); transition: color 0.3s ease; }
.social-links a:hover { color: var(--primary-color); }
@media (min-width: 769px) {
    .footer-content { grid-template-columns: 2fr 3fr; text-align: left; gap: 5rem; }
    .footer-links { grid-template-columns: repeat(3, 1fr); }
    .footer-bottom { flex-direction: row; justify-content: space-between; }
}

/* 6. MODAL & TABS */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.7); z-index: 2000; align-items: center; justify-content: center; padding: 20px; }
.modal.show { display: flex; }
.modal-content { background: var(--bg-primary); border-radius: 16px; border: 1px solid var(--border-color); width: 100%; max-width: 600px; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); transition: background-color 0.3s ease, border-color 0.3s ease; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 2rem; border-bottom: 1px solid var(--border-color); transition: border-color 0.3s ease; }
.modal-tabs { display: flex; gap: 1rem; flex-wrap: wrap; }
.tab-link { background: none; border: none; color: var(--text-secondary); padding: 0.5rem 1rem; cursor: pointer; font-weight: 600; border-bottom: 2px solid transparent; transition: color 0.3s ease, border-color 0.3s ease; }
.tab-link.active { color: var(--primary-color); border-bottom-color: var(--primary-color); }
.close { background: none; border: none; color: var(--text-secondary); cursor: pointer; font-size: 1.5rem; padding: 0; transition: color 0.3s ease; }
.close:hover { color: var(--text-primary); }
.modal-body { padding: 2rem; }
.tab-content { display: none; }

/* 7. FORMS & INPUTS - ENHANCED */
.form-group { margin-bottom: 1.5rem; position: relative; }
.form-label { position: absolute; top: 0.75rem; left: 1rem; font-size: 0.875rem; color: var(--text-secondary); pointer-events: none; transition: all 0.3s ease; }
.form-label-static { display: block; font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 0.5rem; font-weight: 600; }
.form-input { width: 100%; padding: 1rem; border: 2px solid var(--border-color); border-radius: 8px; background: var(--bg-secondary); color: var(--text-primary); font-family: inherit; font-size: 1rem; transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease; }
.form-input:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1); }
.form-input:focus ~ .form-label, 
.form-input:not(:placeholder-shown):valid ~ .form-label,
.form-input:not(:placeholder-shown):not(:focus) ~ .form-label { 
    top: -0.75rem; 
    left: 0.75rem; 
    background: var(--bg-primary); 
    padding: 0 0.25rem; 
    font-size: 0.75rem; 
    color: var(--primary-color); 
}
.text-input { resize: vertical; min-height: 120px; font-family: 'Courier New', monospace; }
.password-wrapper { position: relative; margin-bottom: 0; }
.password-wrapper .form-input { padding-right: 3.5rem; }
.password-wrapper .password-toggle-icon { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); cursor: pointer; color: var(--text-secondary); background: transparent; border: none; display: flex; align-items: center; justify-content: center; padding: 0.5rem; transition: all 0.3s ease; z-index: 10; border-radius: 6px; width: 36px; height: 36px; }
.password-wrapper .password-toggle-icon:hover { color: var(--primary-color); background: var(--bg-tertiary); transform: translateY(-50%) scale(1.05); }
.password-wrapper .password-toggle-icon:active { transform: translateY(-50%) scale(0.95); }
.password-wrapper .password-toggle-icon i { width: 20px; height: 20px; }
.real-password-input { display: none; }
.visible-password-input { display: block; }

/* 8. FILE UPLOAD & LIST */
.upload-area { border: 2px dashed var(--border-color); border-radius: 12px; padding: 3rem 2rem; cursor: pointer; text-align: center; transition: border-color 0.3s ease, background-color 0.3s ease; margin-bottom: 1.5rem; }
.upload-area:hover { border-color: var(--primary-color); background: var(--bg-tertiary); }
.upload-area.dragover { border-color: var(--primary-color); background: var(--bg-tertiary); }
.upload-area i { font-size: 2rem; color: var(--primary-color); margin-bottom: 0.5rem; }
.upload-area h3 { font-size: 1.2rem; margin-bottom: 0.25rem; }
.upload-area p { margin: 0; font-size: 0.9rem; }
#file-list, #decrypt-file-list { margin-bottom: 1.5rem; border: 1px solid var(--border-color); border-radius: 8px; padding: 1rem; background: var(--bg-secondary); max-height: 300px; overflow-y: auto; }
.file-item { display: flex; align-items: center; gap: 1rem; padding: 0.75rem; border-bottom: 1px solid var(--border-color); }
.file-item:last-child { border-bottom: none; }
.file-preview { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; }
.file-preview-generic { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: var(--bg-tertiary); border-radius: 4px; color: var(--primary-color); }
.file-name { flex: 1; font-weight: 600; font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-status { font-size: 0.85rem; color: var(--primary-color); }
.file-remove-icon { cursor: pointer; color: var(--text-secondary); transition: color 0.3s ease; }
.file-remove-icon:hover { color: var(--color-error); }
.progress-bar-container { height: 8px; background: var(--bg-tertiary); border-radius: 4px; margin-bottom: 1.5rem; overflow: hidden; }
.progress-bar { height: 100%; width: 0%; background: var(--gradient-primary); transition: width 0.3s ease; }

/* 9. RESULT SCREEN */
.result-screen { text-align: center; }
.success-icon i { font-size: 3rem; color: var(--color-success); margin-bottom: 1rem; }
.result-screen h3 { margin-bottom: 0.5rem; }
.result-screen p { margin-bottom: 1.5rem; }
.encrypted-text-box { position: relative; margin-bottom: 1.5rem; }
#copy-encrypted-text-btn { margin-top: 10px; }
.decrypt-preview-container { max-height: 300px; overflow-y: auto; border: 1px solid var(--border-color); border-radius: 8px; padding: 1rem; margin-bottom: 1.5rem; background: var(--bg-secondary); display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
.preview-item { display: flex; flex-direction: column; align-items: center; padding: 1rem; background: var(--bg-tertiary); border-radius: 8px; border: 1px solid var(--border-color); transition: all 0.3s ease; }
.preview-item:hover { border-color: var(--primary-color); transform: translateY(-2px); box-shadow: 0 4px 12px var(--shadow-color); }
.preview-image { width: 100%; max-width: 120px; height: 120px; object-fit: cover; border-radius: 8px; margin-bottom: 0.5rem; }
.preview-text { font-size: 0.85rem; color: var(--text-secondary); font-family: 'Courier New', monospace; padding: 0.5rem; background: var(--bg-primary); border-radius: 4px; max-height: 100px; overflow-y: auto; word-break: break-all; width: 100%; }
.preview-name { font-size: 0.85rem; color: var(--text-primary); font-weight: 600; text-align: center; margin-top: 0.5rem; word-break: break-word; max-width: 100%; }

/* 9.5. TESTIMONIALS SECTION (NEW) */
.testimonials { background: var(--bg-secondary); transition: background-color 0.3s ease; }
.testimonials .section-title { text-align: center; }
.testimonials .section-subtitle { text-align: center; margin-left: auto; margin-right: auto; }
.testimonials-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; margin-top: 4rem; }
.testimonial-card { background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: 16px; padding: 2rem; transition: all 0.3s ease; box-shadow: 0 4px 15px var(--shadow-color); text-align: left; }
.testimonial-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px var(--shadow-color); border-color: var(--primary-color); }
.testimonial-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; justify-content: flex-start; }
.testimonial-avatar { width: 60px; height: 60px; border-radius: 50%; border: 2px solid var(--primary-color); padding: 2px; object-fit: cover; background-color: var(--bg-tertiary); }
.testimonial-name { margin: 0; font-size: 1.1rem; color: var(--text-primary); font-weight: 700; }
.testimonial-title { margin: 0; font-size: 0.9rem; color: var(--primary-color); font-weight: 600; }
.testimonial-body { font-size: 1rem; color: var(--text-secondary); line-height: 1.7; margin: 0; font-style: italic; padding-left: 1.5rem; border-left: 3px solid var(--palette-blue); position: relative; text-align: left; padding-right: 0; border-right: none; }
.testimonial-body::before { content: '“'; position: absolute; left: -10px; right: auto; top: -10px; font-size: 3rem; color: var(--primary-color); opacity: 0.2; font-family: Georgia, serif; }
@media (min-width: 769px) {
    .testimonials-grid { grid-template-columns: repeat(3, 1fr); }
}

/* 10. BACK TO TOP */
.back-to-top { position: fixed; bottom: 20px; right: 20px; background: var(--primary-color); color: white; width: 45px; height: 45px; border-radius: 50%; display: none; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); z-index: 999; transition: opacity 0.3s ease, transform 0.3s ease; }
.back-to-top.show { display: flex; }
.back-to-top:hover { opacity: 0.8; transform: translateY(-3px); }
.text-encrypt-container { animation: fadeIn 0.3s ease; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 11. MEDIA QUERIES (تم الدمج) */
@media (max-width: 992px) {
    .hero-content { flex-direction: column; }
    .hero-text { text-align: center; }
    .hero-cta { justify-content: center; }
    .footer-content { grid-template-columns: 1fr; text-align: center; }
    .footer-brand .brand { justify-content: center; }
    .footer-links { grid-template-columns: 1fr; }
    .testimonials-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .container { padding: 0 1rem; }
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    .nav-menu { right: -100%; }
    .nav-menu.show-menu { right: 0; }
    .hero { padding: 50px 0; }
    .hero-cta { flex-direction: column; }
    .encrypt-demo { transform: scale(0.9); }
    .footer-bottom { flex-direction: column; gap: 1rem; }
    .form-group-grid { grid-template-columns: 1fr; gap: 1rem; }
    .decrypt-preview-container { grid-template-columns: 1fr; }
    .testimonial-body { font-size: 0.95rem; }
    .blog-grid { grid-template-columns: 1fr; }
    .post-title { font-size: 2rem; line-height: 1.3; }
    .post-content { max-width: 100%; margin: 0; padding: 0; }
    .post-content h2 { font-size: 1.8rem; }
    .post-content h3 { font-size: 1.4rem; }
    .post-content p.lead { font-size: 1.1rem; }
    .modal-body { padding: 1.5rem; }
    .password-wrapper .form-input { padding-right: 3.5rem; font-size: 16px; }
    .form-group { margin-bottom: 1rem; }
    .password-wrapper .password-toggle-icon { right: 0.75rem; width: 32px; height: 32px; }
}
@media (max-width: 480px) {
    .hero h1 { font-size: 1.8rem; }
    .hero-subtitle { font-size: 1rem; }
    .encrypt-demo { display: none; }
    .modal-body { padding: 1rem; }
}

/* 12. CUSTOM SCROLLBAR */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-color); }

/* 13. BLOG PAGE STYLES (NEW) */
.blog-header { padding-top: 4rem; padding-bottom: 2rem; text-align: center; background-color: var(--bg-secondary); border-bottom: 1px solid var(--border-color); }
.blog-grid-container { padding: 4rem 0; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 2rem; }
.blog-card { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 16px; overflow: hidden; transition: all 0.3s ease; text-decoration: none; display: flex; flex-direction: column; }
.blog-card:hover { transform: translateY(-5px); }
.blog-card-image { width: 100%; height: 200px; object-fit: cover; background: var(--bg-tertiary); border-bottom: 1px solid var(--border-color); flex-shrink: 0; /* (FIX) Prevents image from collapsing */ }
.blog-card-content { padding: 1.5rem; display: flex; flex-direction: column; flex-grow: 1; }
.blog-card-tag { display: inline-block; align-self: flex-start; background: var(--primary-color); color: white; padding: 0.25rem 0.75rem; border-radius: 20px; font-size: 0.8rem; font-weight: 600; margin-bottom: 1rem; text-transform: uppercase; }
.blog-card-title { font-size: 1.3rem; color: var(--text-primary); margin-bottom: 0.75rem; text-decoration: none; line-height: 1.4; }
.blog-card-excerpt { font-size: 0.95rem; color: var(--text-secondary); margin-bottom: 1.5rem; flex-grow: 1; }
.blog-card-link { font-weight: 600; color: var(--primary-color); text-decoration: none; display: inline-flex; align-items: center; gap: 0.5rem; margin-top: auto; }
.blog-card-link:hover { text-decoration: underline; }
.blog-grid .blog-card:nth-child(1) .blog-card-tag { background-color: var(--color-step-1); }
.blog-grid .blog-card:nth-child(1) .blog-card-link { color: var(--color-step-1); }
.blog-grid .blog-card:nth-child(1):hover { border-color: var(--color-step-1); box-shadow: 0 5px 30px 0px var(--color-step-1); }
.blog-grid .blog-card:nth-child(2) .blog-card-tag { background-color: var(--color-step-2); }
.blog-grid .blog-card:nth-child(2) .blog-card-link { color: var(--color-step-2); }
.blog-grid .blog-card:nth-child(2):hover { border-color: var(--color-step-2); box-shadow: 0 5px 30px 0px var(--color-step-2); }
.blog-grid .blog-card:nth-child(3) .blog-card-tag { background-color: var(--color-step-3); }
.blog-grid .blog-card:nth-child(3) .blog-card-link { color: var(--color-step-3); }
.blog-grid .blog-card:nth-child(3):hover { border-color: var(--color-step-3); box-shadow: 0 5px 30px 0px var(--color-step-3); }
.blog-grid .blog-card:nth-child(4) .blog-card-tag { background-color: var(--color-feature-1); }
.blog-grid .blog-card:nth-child(4) .blog-card-link { color: var(--color-feature-1); }
.blog-grid .blog-card:nth-child(4):hover { border-color: var(--color-feature-1); box-shadow: 0 5px 30px 0px var(--color-feature-1); }
.blog-grid .blog-card:nth-child(5) .blog-card-tag { background-color: var(--color-feature-2); }
.blog-grid .blog-card:nth-child(5) .blog-card-link { color: var(--color-feature-2); }
.blog-grid .blog-card:nth-child(5):hover { border-color: var(--color-feature-2); box-shadow: 0 5px 30px 0px var(--color-feature-2); }
.blog-grid .blog-card:nth-child(6) .blog-card-tag { background-color: var(--color-feature-4); }
.blog-grid .blog-card:nth-child(6) .blog-card-link { color: var(--color-feature-4); }
.blog-grid .blog-card:nth-child(6):hover { border-color: var(--color-feature-4); box-shadow: 0 5px 30px 0px var(--color-feature-4); }

/* 14. BLOG POST STYLES (NEW) */
.post-title { font-size: 3rem; text-align: center; background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 1rem; }
.post-meta { text-align: center; font-size: 1rem; color: var(--text-secondary); margin-bottom: 2rem; }
.post-hero-image { width: 100%; height: auto; max-height: 500px; object-fit: cover; border-radius: 16px; margin-bottom: 3rem; border: 1px solid var(--border-color); }
.post-content-container { padding: 3rem 0; }
.post-content {
    max-width: 800px; 
    margin: 0 auto;
    /* --- (FINAL FIX for /aes article) --- */
    /* This forces the long number string to wrap and prevents layout break */
    overflow-wrap: break-word;
    word-break: break-word; /* For CJK/etc, but good fallback */
}
.post-content p.lead { font-size: 1.25rem; font-weight: 400; color: var(--text-secondary); border-left: 4px solid var(--primary-color); padding-left: 1.5rem; margin-bottom: 2rem; }
.post-content h2 { font-size: 2rem; margin-top: 3rem; margin-bottom: 1.5rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--border-color); }
.post-content h3 { font-size: 1.5rem; margin-top: 2.5rem; margin-bottom: 1rem; color: var(--primary-color); }
.post-content ul, .post-content ol { margin-bottom: 1.5rem; padding-left: 2rem; }
.post-content li { margin-bottom: 0.75rem; line-height: 1.8; }
.post-content a { color: var(--primary-color); text-decoration: none; font-weight: 600; transition: all 0.2s ease; }
.post-content a:hover { text-decoration: underline; opacity: 0.8; }
.post-content blockquote { margin: 2rem 0; padding: 1.5rem; background: var(--bg-secondary); border-left: 5px solid var(--color-step-1); border-radius: 0 8px 8px 0; font-size: 1.1rem; font-style: italic; color: var(--text-primary); }
.post-content blockquote strong { color: var(--text-primary); }
.post-content hr { border: 0; height: 1px; background: var(--border-color); margin: 3rem 0; }
.post-cta { background: var(--bg-secondary); padding: 3rem; border-radius: 16px; text-align: center; margin-top: 4rem; border: 1px solid var(--border-color); }
.post-cta h2 { border-bottom: none; margin-top: 0; }
.table-container { overflow-x: auto; margin: 2rem 0; border: 1px solid var(--border-color); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; min-width: 700px; }
th, td { padding: 1rem 1.5rem; text-align: left; border-bottom: 1px solid var(--border-color); }
thead th { background: var(--bg-secondary); font-size: 1rem; color: var(--text-primary); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background-color: var(--bg-tertiary); }

/* 15. PASSWORD STRENGTH METER (FIX) */
#password-strength-bar-container,
#text-password-strength-bar-container {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 1rem;
}
#password-strength-bar,
#text-password-strength-bar {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
}
#password-strength-text,
#text-password-strength-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    height: 1.2em; /* Reserve space */
    transition: color 0.3s ease;
}
/* Strength Colors */
.progress-bar.strength-0 { background-color: var(--color-strength-0); }
.progress-bar.strength-1 { background-color: var(--color-strength-1); }
.progress-bar.strength-2 { background-color: var(--color-strength-2); }
.progress-bar.strength-3 { background-color: var(--color-strength-3); }
.progress-bar.strength-4 { background-color: var(--color-strength-4); }
.strength-text-0 { color: var(--color-strength-0) !important; }
.strength-text-1 { color: var(--color-strength-1) !important; }
.strength-text-2 { color: var(--color-strength-2) !important; }
.strength-text-3 { color: var(--color-strength-3) !important; }
.strength-text-4 { color: var(--color-strength-4) !important; }

/* 16. FORM GRID & GENERATE BUTTON (FIX) */
.form-group-grid {
    display: grid;
    grid-template-columns: 1fr; /* Default to 1 column on mobile */
    gap: 1.5rem;
}
.form-group-col {
    display: flex;
    flex-direction: column;
}
.btn-generate-pass {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 0.75rem; /* Space from password field */
}
.btn-generate-pass:hover {
    background: var(--bg-primary);
    color: var(--primary-color);
    border-color: var(--primary-color);
}
.btn-generate-pass i {
    width: 16px;
    height: 16px;
}
/* 2-column grid on desktop */
@media (min-width: 768px) {
    .form-group-grid {
        grid-template-columns: 1fr 1fr;
        align-items: flex-start; /* Align columns to the top */
    }
    .form-group-col {
        /* On desktop, the button might be next to or below */
    }
}

