/* Voice Page Styles */

/* Voice Hero Section */
.voice-hero {
    background: linear-gradient(135deg, #088bd4 0%, #0056b3 100%);
    color: white;
    padding: 140px 0 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.voice-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.1)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.1)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.voice-hero-content {
    position: relative;
    z-index: 2;
}

.voice-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    margin-top: 1rem;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    }
    to {
        text-shadow: 0 0 30px rgba(255, 255, 255, 0.8), 0 0 40px rgba(255, 255, 255, 0.6);
    }
}

.voice-subtitle {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.voice-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.voice-stats .stat {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.voice-stats .stat:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.voice-stats .stat i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: white;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.7; }
}

.voice-stats .stat span {
    display: block;
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

.voice-stats .stat h3 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    color: white;
}

/* Main Content Area */
.voice-main {
    padding: 4rem 0;
    background: #f8f9fa;
    min-height: 60vh;
}

/* View Toggle */
.view-toggle {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.toggle-btn {
    background: white;
    border: 2px solid #088bd4;
    color: #088bd4;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(8, 139, 212, 0.1);
}

.toggle-btn:hover {
    background: #088bd4;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(8, 139, 212, 0.2);
}

.toggle-btn.active {
    background: #088bd4;
    color: white;
    box-shadow: 0 6px 20px rgba(8, 139, 212, 0.3);
}

.toggle-btn i {
    font-size: 1.1rem;
}

/* View Content */
.view-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.view-content.active {
    display: block;
}

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

/* Writings Feed */
.writings-feed {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.writing-post {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(8, 139, 212, 0.1);
}

.writing-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #088bd4, #0056b3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.author-details h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.author-title {
    color: #666;
    font-size: 0.9rem;
    display: block;
    margin-top: 0.2rem;
}

.post-date {
    color: #999;
    font-size: 0.8rem;
    display: block;
    margin-top: 0.2rem;
}

.post-actions .action-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.post-actions .action-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.post-content {
    margin-bottom: 1.5rem;
}

.post-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.post-text {
    color: #555;
    line-height: 1.6;
    font-size: 1rem;
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    transition: all 0.3s ease;
}

.post-text.shortened {
    max-height: 8em;
    overflow: hidden;
    position: relative;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    white-space: normal;
}

.post-text:not(.shortened) {
    max-height: none;
    -webkit-line-clamp: unset;
    text-overflow: clip;
    white-space: pre-wrap;
}

.read-more-btn {
    background: none;
    border: none;
    color: #088bd4;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-family: 'Cairo', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 2px solid transparent;
}

.read-more-btn:hover {
    color: #0056b3;
    background: rgba(8, 139, 212, 0.1);
    border-color: #088bd4;
    transform: translateY(-1px);
}

.read-more-btn:active {
    transform: translateY(0);
}

.read-more-btn .read-more-text,
.read-more-btn .read-less-text {
    transition: all 0.3s ease;
}

/* تأثير انتقالي للنص */
.post-text {
    transition: all 0.3s ease;
    line-height: 1.6;
}

/* إزالة التأثير الضبابي */
.post-text:not(.expanded)::after {
    display: none;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.post-stats {
    display: flex;
    gap: 1.5rem;
    color: #666;
    font-size: 0.9rem;
}

.post-buttons {
    display: flex;
    gap: 1rem;
}

.post-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.post-btn:hover {
    background: #f0f0f0;
    color: #088bd4;
}

.post-btn.liked {
    color: #e74c3c;
}

.post-btn.liked i {
    animation: heartBeat 0.3s ease;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Submission Form */
.submission-container {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

.submission-form {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(8, 139, 212, 0.1);
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-header h3 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.form-header p {
    color: #666;
    font-size: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    font-family: 'Cairo', sans-serif;
    color: #333 !important;
    background: white !important;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #088bd4;
    box-shadow: 0 0 0 3px rgba(8, 139, 212, 0.1);
    color: #333 !important;
    background: white !important;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #999 !important;
}

.form-group input:focus::placeholder,
.form-group textarea:focus::placeholder {
    color: #999 !important;
}

/* إصلاح إضافي لون النص */
.form-group input,
.form-group select,
.form-group textarea,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.form-group input:active,
.form-group select:active,
.form-group textarea:active {
    color: #333 !important;
    background-color: white !important;
    -webkit-text-fill-color: #333 !important;
    -webkit-appearance: none;
    appearance: none;
}

/* إصلاح للـ autofill */
.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover,
.form-group input:-webkit-autofill:focus,
.form-group input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
    -webkit-text-fill-color: #333 !important;
    background-color: white !important;
}

/* تنسيق خاص للـ select dropdown */
.form-group select option {
    color: #333;
    background: white;
}

.form-group select {
    color: #333 !important;
    background: white !important;
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.image-upload {
    position: relative;
    border: 2px dashed #e0e0e0;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    transition: border-color 0.3s ease, background 0.3s ease;
    cursor: pointer;
}

.image-upload:hover {
    border-color: #088bd4;
    background: rgba(8, 139, 212, 0.05);
}

.image-upload input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-placeholder {
    color: #666;
}

.upload-placeholder i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #088bd4;
}

.upload-placeholder span {
    display: block;
    font-size: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Cairo', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, #088bd4, #0056b3);
    color: white;
    box-shadow: 0 4px 15px rgba(8, 139, 212, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(8, 139, 212, 0.4);
}

.btn-secondary {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #e0e0e0;
}

.btn-secondary:hover {
    background: #e9ecef;
    color: #333;
}

/* Guidelines */
.submission-guidelines {
    background: linear-gradient(135deg, #088bd4, #0056b3);
    color: white;
    padding: 2rem;
    border-radius: 20px;
    position: sticky;
    top: 2rem;
}

.submission-guidelines h3 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

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

.submission-guidelines li {
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    line-height: 1.5;
}

.submission-guidelines i {
    color: #ffd700;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .voice-title {
        font-size: 2.5rem;
        margin-top: 0.5rem;
    }
    
    .voice-hero {
        padding: 120px 0 60px 0;
    }
    
    .voice-stats {
        gap: 1rem;
        flex-direction: row;
        justify-content: center;
        flex-wrap: nowrap;
    }
    
    .voice-stats .stat {
        padding: 1rem;
        min-width: 100px;
        flex: 1;
        max-width: 120px;
    }
    
    .voice-stats .stat i {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .voice-stats .stat span {
        font-size: 0.7rem;
        margin-bottom: 0.3rem;
    }
    
    .voice-stats .stat h3 {
        font-size: 1.2rem;
    }
    
    .view-toggle {
        flex-direction: column;
        align-items: center;
    }
    
    .toggle-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .submission-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .post-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .post-buttons {
        width: 100%;
    }
    
    .writing-post {
        padding: 1.5rem;
    }
    
    .submission-form {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .voice-hero {
        padding: 100px 0 50px 0;
    }
    
    .voice-title {
        font-size: 2rem;
        margin-top: 0.5rem;
    }
    
    .voice-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .voice-stats {
        gap: 0.5rem;
        padding: 0 10px;
    }
    
    .voice-stats .stat {
        padding: 0.8rem 0.5rem;
        min-width: 80px;
        max-width: 100px;
        border-radius: 10px;
    }
    
    .voice-stats .stat i {
        font-size: 1.2rem;
        margin-bottom: 0.3rem;
    }
    
    .voice-stats .stat span {
        font-size: 0.6rem;
        margin-bottom: 0.2rem;
        line-height: 1.2;
    }
    
    .voice-stats .stat h3 {
        font-size: 1rem;
        margin: 0;
    }
    
    .writing-post {
        padding: 1rem;
        margin: 0 10px;
    }
    
    .post-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .author-info {
        flex-direction: column;
        text-align: center;
    }
    
    .post-actions {
        align-self: flex-end;
    }
}

/* Active Navigation */
.nav-link.active {
    color: #088bd4;
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #088bd4;
}

/* Animation for form submission */
@keyframes formSubmit {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.form-submitting {
    animation: formSubmit 0.3s ease;
}

/* Success message styling */
.success-message {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    border: 1px solid #c3e6cb;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    border: 1px solid #f5c6cb;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* تنسيق خاص للشاشات الكبيرة */
@media (min-width: 768px) {
    .review-modal-content {
        max-width: 350px;
        max-height: 70vh;
    }
    
    .review-modal-header {
        padding: 1rem 1.2rem;
    }
    
    .review-modal-header h3 {
        font-size: 1rem;
    }
    
    .review-modal-body {
        padding: 1.2rem;
    }
    
    .review-modal-body .form-group {
        margin-bottom: 0.8rem;
    }
    
    .review-modal-body label {
        font-size: 0.85rem;
        margin-bottom: 0.3rem;
    }
    
    .review-modal-body input,
    .review-modal-body textarea {
        padding: 0.6rem 0.7rem;
        font-size: 0.85rem;
    }
    
    .rating-stars i {
        font-size: 1.4rem;
    }
    
    .form-actions {
        margin-top: 1.2rem;
        gap: 0.6rem;
    }
    
    .form-actions .btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
}

/* تنسيق للشاشات المتوسطة */
@media (min-width: 768px) and (max-width: 1024px) {
    .voice-stats {
        gap: 1.5rem;
        flex-wrap: nowrap;
    }
    
    .voice-stats .stat {
        padding: 1.2rem;
        min-width: 120px;
        flex: 1;
    }
    
    .voice-stats .stat i {
        font-size: 2rem;
    }
    
    .voice-stats .stat span {
        font-size: 0.8rem;
    }
    
    .voice-stats .stat h3 {
        font-size: 1.5rem;
    }
}

/* Contact Section */

/* Loading and Empty States */
.loading-writings {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.loading-writings i {
    font-size: 2rem;
    color: #088bd4;
    margin-bottom: 1rem;
    display: block;
}

.loading-writings p {
    margin: 0;
    font-size: 1.1rem;
}

.empty-writings {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.empty-writings i {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 1rem;
    display: block;
}

.empty-writings h3 {
    margin-bottom: 0.5rem;
    color: #495057;
}

.empty-writings p {
    margin-bottom: 2rem;
    font-size: 1rem;
}

.empty-writings .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
} 