.comments-section {
    max-width: 1200px;
    width: 100%;
    margin: 2rem auto;
    padding: 2.5rem;
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    border: 1px solid var(--border);
}

.comments-section:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

body.dark-mode .comments-section {
    background: #1a243d;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/*.job-detail-container, .comments-section {
    will-change: transform;
    contain: layout style paint;
}*/

.comments-title {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 2rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid var(--accent);
    position: relative;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.comments-title i {
    color: var(--accent);
}

body.dark-mode .comments-title {
    color: var(--accent);
}

.comments-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 60px;
    height: 2px;
    background: var(--accent);
}

.comment-form {
    background: rgba(30, 58, 138, 0.03);
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 3rem;
}

body.dark-mode .comment-form {
    background: rgba(255, 255, 255, 0.03);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary);
}

body.dark-mode .form-group label {
    color: var(--accent);
}

.form-control {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--light-bg);
    color: var(--text);
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(230, 195, 92, 0.3);
}

body.dark-mode .form-control {
    background: rgba(255, 255, 255, 0.05);
    color: var(--footer-text);
    border-color: rgba(255, 255, 255, 0.1);
}

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

#btn_send_comment {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#btn_send_comment:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--secondary) 0%, #1D4ED8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

#btn_send_comment:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#btn_send_comment i {
    transition: transform 0.3s ease;
}

#btn_send_comment:not(:disabled):hover i {
    transform: translateX(5px);
}

.captcha-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.5);
    padding: 1rem;
    border-radius: 10px;
    flex-wrap: wrap;
}

body.dark-mode .captcha-container {
    background: rgba(255, 255, 255, 0.05);
}

.captcha-container label {
    margin-bottom: 0;
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
}

body.dark-mode .captcha-container label {
    color: var(--accent);
}

.captcha-input {
    flex: 1;
    min-width: 120px;
    padding: 0.8rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--light-bg);
    color: var(--text);
    font-family: 'Tajawal', sans-serif;
    font-size:20px;
    font-weight:bold;
}

.captcha-image {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 5px;
    background: white;
}

body.dark-mode .captcha-image {
    background: #2d3748;
}

#error_comment {
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 8px;
    font-weight: 600;
    display: none;
}

#error_comment.error {
    background-color: #fee;
    color: #c33;
    border: 1px solid #fcc;
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

#postComment .success {
    background-color: #efe;
    color: #363;
    border: 1px solid #cfc;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: 600;
    text-align: center;
    animation: fadeIn 0.5s ease-in-out;
}

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

#btn_send_comment:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .comment-form {
        padding: 0.8rem;
    }
    
    .captcha-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .comments-section {
        width: calc(100% - 1rem);
        padding: 0.8rem;
    }
    
    .comments-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .comments-title {
        font-size: 1.3rem;
    }
}




.comments-list {
    margin-top: 2rem;
    counter-reset: comment-counter;
}

.comment {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem 1.5rem 1.5rem 4rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border-left: 4px solid transparent;
    position: relative;
    counter-increment: comment-counter;
    border: 1px solid var(--border);
}

.comment::before {
    content: counter(comment-counter);
    position: absolute;
    left: 0px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.comment:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-left-color: var(--accent);
}

.comment:hover::before {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

body.dark-mode .comment {
    background: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border);
}

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

.comment-user {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.user-details h4 {
    font-size: 1.1rem;
    color: var(--secondary);
    margin-bottom: 0.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

body.dark-mode .user-details h4 {
    color: var(--accent);
}

.comment-date {
    font-size: 0.85rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

body.dark-mode .comment-date {
    color: var(--muted);
}

.comment-content {
    line-height: 1.7;
    color: var(--text);
    font-size: 1.05rem;
    margin-bottom: 1rem;
    padding: 0.8rem;
    background: rgba(59, 130, 246, 0.03);
    border-radius: 8px;
    border-right: 2px solid var(--secondary);
	
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    max-width: 100% !important;
    overflow-x: hidden !important;	
}

.comment-content a,
.comment-content p {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    max-width: 100% !important;
}

body.dark-mode .comment-content {
    color: var(--footer-text);
    background: rgba(59, 130, 246, 0.08);
    border-right: 2px solid var(--accent);
}

.comment-actions {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.comment-actions .comment-date {
    margin-right: auto;
}

@media (max-width: 768px) {
    .comment {
        padding: 1.2rem 1.2rem 1.2rem 2.5rem;
    }
    
    .comment::before {
        left: 0px;
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }
}

@media (max-width: 480px) {
    .comment {
        padding: 1rem 1rem 1rem 1.8rem;
    }
    
    .comment::before {
        left: 0px;
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .comment-user {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .comment-actions {
        flex-wrap: wrap;
        gap: 1rem;
    }
}
